Search
  • Madhu Kalva

Unity: Android build errors compilation

Updated: Jan 16

For all my games, I use:

  • MoPob mediation to monetize.

  • Unity Easy Mobile Pro asset to integrate MoPub ADs/mediation and to implement other generic features like app rating etc,.

For reference I am using Unity 2019.4.17f1.


Time to time I see few errors while building for Android. So, in this bog post I am compiling fixes for my future reference and to help for other devs who face these.




No Java runtime present, requesting install.


After you install Unity for the first time, some times it throws this error.


From https://github.com/firebase/quickstart-unity/issues/849 post: "So first, I know this sounds really odd, but I've seen issues in MacOS in the past that are resolved simply by toggling the "JDK Installed with Unity" button. As in on or off doesn't matter, just that it changes. Try unchecking that and hitting build (without restarting Unity). If that works, that is one bug to start tracking and can help you get unstuck."

I tried toggle & untoggle couple of times and it fixed No Java runtime present, requesting install. issue.



Error: unexpected element <queries> found in <manifest>


To fix this use gradle version that included queries in it, which seems to be above 3.4.3. So use this

classpath 'com.android.tools.build:gradle:3.4.3'

instead of

classpath 'com.android.tools.build:gradle:3.4.0'

From this link https://answers.unity.com/questions/1784106/applovinmax-inmobi-adapter-failes-the-build-with-g.html





Error while merging dex archives: The number of method references in a .dex file cannot exceed 64K.


To fix this enable multidex via launcherTemplate.gradle

  • multiDexEnabled true

  • implementation 'androidx.multidex:multidex:2.0.1'

Reference: https://forum.unity.com/threads/cant-build-with-multidex-enabled.773348/





Your Android setup is not correct. See Settings in Facebook menu.


Just uncheck recommended Android SDK from Unity preferences and browse Android SDK to the exact same one Unity already using will fix this issue.


Reference: https://forum.unity.com/threads/fixed-ucb-team-android-builds-with-the-facebook-sdk-are-failing-17th-march.461561/?_ga=2.228307998.221903671.1610293567-802375710.1601661615




You uploaded a debuggable APK or Android App Bundle.

Sometimes when I upload android build that is built with Unity throws this error: You uploaded a debuggable APK or Android App Bundle. For security reasons you need to disable debugging before it can be published in Google Play. Learn more about debuggable APKs and Android App Bundles.

If you are using FacebookSDK which comes with Google Play services, it can be that in injects a Debuggable=true key in the Manifest, for whatever reason.


you can fix it by going to Assets -> Android -> AndroidManifest.xml

In there find 'android:debuggable="true"' and set it to false.


Reference : https://forum.unity.com/threads/2019-3-you-uploaded-a-debuggable-apk.757094/



Google Play Console Error: This release is not compliant with the Google Play 64-bit requirement.


To fix this Go to Player Settings -> Other Setting -> Under Configuration

  • Select IL2CPP for Scripting Background.

  • Now you will see ARM64 under Target Architecture and check it.

  • Regenerate build and it shouldn't throw above error anymore.


23 views0 comments

Recent Posts

See All

Unity Editor errors compilation

Error: 'UIElements' does not exist in the namespace 'UnityEngine.Experimental' When I import Unity Recorder from Window - > Package Manager it is throwing following errors: Assets/Unity Recorder/Edito

Unity Paid Assets compilation for Hyper Casual Games

Puppet Master: https://assetstore.unity.com/packages/tools/physics/puppetmaster-48977 FInal IK: https://assetstore.unity.com/packages/tools/animation/final-ik-14290 KenShape: Draw in 2D, set the depth

Unity Free Assets compilation for Hyper Casual Games

In this post I will keep track of interesting assets that can be used for hyper casual games. This is for my own reference and to help other developers as well. Another assets compilation for hyper ca

  • facebook (2)
  • instagram (5)