

In Windows Explorer navigate to: app/build/outputs/arr and you should find your android archive that you can drop into Unity. Then open the AndroidManifest.xml file under app/manifests….ĭelete the unneeded android:icon, android:roundIcon and android:theme items…. so best to remove that potential issue now). It’s not needed in Android Libraries (and it can cause issue, which took me a while to figure out using the Android Device Monitor and looking through logfiles. Next, open up the styles.xml file in res/values and comment out the whole AppTheme section (or delete it). Now add a simple static method with a String return type…. Now right click on your Java Namespace and create a new Java Class, we’re just going to create the traditional hello world…

This is easily fixed by removing the applicationId line from the defaultConfig section….

If you try to sync gradle at this point it complains…. arr Android Archive file rather than a full Android application… This will ensure that Android Studio creates a. Locate the “adle” file under “Gradle Scripts”. This is what you should see once you’ve hit the finish button and Android Studio has created the project… We need to create a plugin without any activities… I normally use Unity on GearVR so I can safely choose API 22 as my minimum SDK – change this if you need to but remember what you set as you’ll need to set the same in Unity in Part 2 …. I’ll hopefully be adding some more parts to the tutorial later that show how to update Unity Textures from Java/Android. (I’ve called my project “TextureHelper” but you can call yours whatever you wish. If you need C++ support, check that checkbox :-)…. Give your project a name and choose a location to save it. Open Android Studio a choose File -> New -> New Project.If not, you probably want to start here.įire up Android Studio and Create a new project…

I’m assuming you have a real Android device attached via USB or you are using the emulator and are used to building Unity Projects to your device.I’m assuming you already have Android Studio and the relevant SDK’s installed? If not you might want to start here and here.I’m assuming that you already have Unit圓D installed, if not, get it from here (Choose the most up to date version): Unity Downloads.Update: Download Code for this Assumptions: Please let me know if there are better ways of doing any this 🙂 I’ve created a number of Android / Java plugins for Unity using Android Studio so thought I’d document the process.
