Issue
I'm following the tutorial at https://nicholasgorman.wordpress.com/2017/03/19/unity-to-android-wear/ and have gotten to the step where I need to import the Unity export as a module. Android Studio detects the modules but will not let me hit finish. I've tried changing the target API version in Unity and changing the name of the imported module but it still does not work. Right now the project is at a minimum API level of 23 (Android 6.0), targeting API level 30 (the highest installed). I've made sure to tick "export project" before exporting in Unity. My goal is to build this game as a test to see what I can do on my new Galaxy Watch 4.
How the Import Module screen looks
I can open the project in Android Studio no problem, but I'm not well-versed enough in it to convert that to a Wear OS project. The problem is importing it into a fresh Wear OS project.
Solution
I figured it out. The tutorial I'm using is old (as well as most other resources for doing something similar).
All I had to do was open the exported Unity Android project in Android Studio and add <uses-feature android:name="android.hardware.type.watch" />
to the unityLibrary AndroidManifest.xml file the line after the opening manifest
tag.
I also changed the Android Gradle and Gradle versions to 7.0.2. Not sure if this is required but if anyone reading has issues try doing this first.
Answered By - ILikePiez
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.