This article will teach you how to build directly on a device and how to export your project to Android Studio. Please refer to this article to learn how to build your game on a device via Xcode.
When you generated a SkillzDelegate game object by pressing Skillz -> Generate Delegate, this also generated your Android Manifest and Build.gradle file which are stored in Assets/Plugins/Android. Feel free to customize these files based on your needs.
When building an Android Studio project or building an apk directly to a device, you’ll need to change the permissions folder of Unity’s gradle version so that our Android Build Process can update your gradle version temporarily. In order to do this, open your terminal and perform the following command:
sudo chmod -R 757 /Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/gradle
Export to Android Studio
If you choose to export to Android Studio, make sure to click on Export Project.
Then, in Android Studio, go to File -> New -> Import Project and select the exported directory. Your Android studio project will still contain the Android Manifest and build.gradle files that were inside Assets/Plugins/Android of your Unity project. Perform any changes you wish to make and you should now be able to build on a device.
Important: AndroidManifest Requirements
- The application needs to set the attribute
falseor completely remove the attribute.
- The main activity's
launchModeshould be assigned as
- The main activity should have the following
We’re always here to help. Contact email@example.com if you run into any issues.