Получение java.exe с кодом 2 при сборке приложения - PullRequest
0 голосов
/ 06 октября 2019

Я обновил версию Android SDK API с 27 до 28 и начал получать "java.exe" exited with code 2 при компиляции сборки.

Вывод:

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2667,3): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="SQLitePCLRaw.batteries_v2" culture="neutral" publicKeyToken="8226ea5df37bcae9" /><bindingRedirect oldVersion="0.0.0.0-1.1.13.388" newVersion="1.1.13.388" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="SQLitePCLRaw.core" culture="neutral" publicKeyToken="1488e028ca7ab535" /><bindingRedirect oldVersion="0.0.0.0-1.1.13.388" newVersion="1.1.13.388" /></dependentAssembly></assemblyBinding>
1>CREATEMULTIDEXMAINDEXCLASSLIST : warning : can't write resource [META-INF/LICENSE.txt] (Duplicate zip entry [__reference__commons-io-2.4.jar:META-INF/LICENSE.txt])
1>CREATEMULTIDEXMAINDEXCLASSLIST : warning : can't write resource [META-INF/NOTICE.txt] (Duplicate zip entry [__reference__commons-io-2.4.jar:META-INF/NOTICE.txt])
1>CREATEMULTIDEXMAINDEXCLASSLIST : warning : can't write resource [META-INF/LICENSE.txt] (Duplicate zip entry [__reference__commons-lang-2.6.jar:META-INF/LICENSE.txt])
1>CREATEMULTIDEXMAINDEXCLASSLIST : warning : can't write resource [META-INF/NOTICE.txt] (Duplicate zip entry [__reference__commons-lang-2.6.jar:META-INF/NOTICE.txt])
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2610,3): error MSB6006: "java.exe" exited with code 2.

Я не могу найтиосновная причина.

Редактировать

У меня включена мультидекс в моем приложении, но у меня все та же проблема.

1 Ответ

0 голосов
/ 05 ноября 2019

Я нашел ответ на свой вопрос. Ответ не велик, но он работает. Я использовал Visual Studio 2017, и у него были некоторые проблемы с Android 9. Я обновил его до Visual Studio 2019, и приложение начало работать правильно.

...