There are several ways to handle this issue. Due to the way the references are generated, the limit could be hit with just a couple of large plug-ins. This usually happens when the number of plug-ins or plug-in resources is too high. If your console messages says “Too many references”, it means that the number of fields and methods exceeded the DEX limit of 64k. Check the console output for the list of duplicate entries, and fix the plug-ins. This results in duplicate classes when Unity tries to build a DEX (Dalvik Executable Format) file from all the compiled Java plug-ins. The most likely cause for this issue is that you have a Java plug-in added twice. Unable to convert classes into DEX format
See the Android Manifest documentation for more details on Android manifests. The most likely cause for this issue is that one of your plug-ins has a manifest that is incompatible with the main Unity manifest.Ĭheck the console message for more details on which attributes are conflicting, and fix the manifests accordingly. Fix the error in your plug-ins by either adding the missing resources/settings or removing the duplicate plug-ins.
This issue is most often caused by missing resources or duplicate resources in your Android plug-ins.Ĭheck the console message for more details - it should contain the IDs of the resources that are missing or duplicates. More info See in Glossary during Android build.
Asset packages are a handy way of sharing and re-using Unity projects and collections of assets. AAPT is used to build the intermediate Asset packages A collection of files and data from Unity projects, or elements of projects, which are compressed and stored in one file, similar to Zip files, with the. This error occurs when the Android Asset Packaging Tool (AAPT) fails. If the list contains your device with the device label, build your Project in Unity again. Check the device’s screen for the corresponding dialog. If the list contains entries with the unauthorized label, you may need to authorize your computer on your device and give it permission to debug it. For more details, refer to the Android SDK/NDK Setup documentation. You can use an ADB to deploy an Android package (APK) manually after building.
If the output list is empty and you are using Windows, you may need to install the driver for ADB An Android Debug Bridge (ADB). Run the adb devices command from the platform-tools directory of your Android SDK installation and check the output. For more details, refer to the Android SDK/NDK Setup page. Make sure that your device has USB Debugging enabled in the Developer options. Make sure that your device is actually connected to your computer - check the USB cable and the sockets. If Unity cannot find an Android device connected to the system, check the following: The video player is its own activity, and therefore regular game activity will be destroyed if the video player is activated. The game crashes after a couple of seconds when playing videoĮnsure Settings > Developer Options > Don’t keep activities isn’t enabled on the device. Consult the official Android Developer Logcat Command-Line Tool documentation for more information. Use adb logcat to get the crash report from your device.
Allows you can access features like OS calls and third-party code libraries that would otherwise not be available to Unity. Remove any native plug-ins A platform-specific native code library that is created outside of Unity for use in Unity. Your application crashes immediately after launch This section outlines the most common scenarios and relavant troubleshooting advice. More info See in Glossary or incorrect Project settings A broad collection of settings which allow you to configure how Physics, Audio, Networking, Graphics, Input and many other areas of your project behave. NET assemblies created with tools like Visual Studio) and Native plug-ins (platform-specific native code libraries). There are two kinds of plug-ins you can use in Unity: Managed plug-ins (managed. Problems are often related to plug-ins A set of code created outside of Unity that creates functionality in Unity.
While developing for Android using Unity, you could encounter a number of issues.