Java.exe Exited With Code 2 In Android App Built In Vs 2015
Solution 1:
Finally I got answer after 48 hours of struggle. Simply what I did was change the package name from com.myexample.droid to com.myexample.mainapplication in AndroidMainfeast.Xml File at the line<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.myexample.mainapplication" android:versionName="1.0" android:installLocation="auto" android:versionCode="9">
, that did trick to me. Good luck to every one. To be clear please have a look this link "trouble writing output: Too many field references: 70185; max is 65536. You may try using --multi-dex option." when building Android project.
and read this information
- Do away with the need for library projects. Package everything into one monolithic structure.
- Split the project files into multiple dex files.
1 goes against fundamental software principles of software development – code needs to be developed as re-usable libraries.
2 is a good long-term solution but is more complex.
The solution: A reasonable medium term solution emerged after understanding more closely. The significance of Package name within the manifest tag in the AndroidManifest.xml file is that it is used as a fully qualifying name to identify Android resources. It does not have anything to do with the package name for the java classes themselves.
I followed the same process and changed it and got successful build neither enabling MultiDex nor doing ProGuard. Remember my MaxHeapSize is 1G.
Solution 2:
It worked for me after I updated the Google Services packages (nuget).
Solution 3:
For me, changing false from True to false solved the issue
Solution 4:
For me, changing false inside android.csproj from True to false solved the issue
Post a Comment for "Java.exe Exited With Code 2 In Android App Built In Vs 2015"