“java.exe” exited with code 2 Xamarin.Android project

后端 未结 14 2102
生来不讨喜
生来不讨喜 2020-12-05 04:38

so I have my Xamarin.Android project which contains several libraries. When I try to build I receive an error which says \"java.exe\" exited with code 2.

After some

14条回答
  •  攒了一身酷
    2020-12-05 04:59

    After finding this question and @Daniel_97s answer I was able to solve this error only by adding multidex to the project without changing MainDexClasses.bat:

    1. Check the option in Project Options:

    1. Add MultiDexApplication to Android Manifest:

      
      

    Note I was getting this error code 2 on Visual Studio for Mac and on Windows the same app was building successfully. (why?)

提交回复
热议问题