Ошибка java.exe при компиляции приложения xamarin-android - PullRequest
0 голосов
/ 29 апреля 2018

я занимаюсь разработкой приложения, внезапно я получил ошибку сборки,

Я также пытался увеличить размер кучи для Java, но ничего не работает, кто-нибудь может мне помочь поставить?

Вот лог ....

>      > `C:\Program Files\Java\jdk1.8.0_131\\bin\java.exe -jar C:\Users\DELL\AppData\Local\Xamarin\MonoForAndroid\AndroidSDK\build-tools\25.0.1\\lib\dx.jar
> --no-strict --dex --output=obj\Debug\android\bin obj\Debug\android\bin\classes "C:\Program Files (x86)\Reference
> Assemblies\Microsoft\Framework\MonoAndroid\v7.0\mono.android.jar"
> obj\Debug\__library_projects__\Telerik.Xamarin.Android.Common\library_project_imports\bin\Common.jar
> obj\Debug\__library_projects__\Telerik.Xamarin.Android.Data\library_project_imports\bin\Data.jar
> obj\Debug\__library_projects__\Telerik.Xamarin.Android.Gauges\library_project_imports\bin\Gauges.jar
> obj\Debug\__library_projects__\Telerik.Xamarin.Android.Input\library_project_imports\bin\Input.jar obj\Debug\__library_projects__\Telerik.Xamarin.Android.List\library_project_imports\bin\List.jar
> obj\Debug\__library_projects__\Telerik.Xamarin.Android.Primitives\library_project_imports\bin\Primitives.jar
> obj\Debug\__library_projects__\TwilioClient.Android\library_project_imports\bin\classes.jar
> obj\Debug\__library_projects__\TwilioClient.Android\library_project_imports\libs\org.apache.http.legacy.jar
> obj\Debug\__library_projects__\Xamarin.Android.Support.Animated.Vector.Drawable\library_project_imports\bin\classes.jar
> obj\Debug\__library_projects__\Xamarin.Android.Support.Compat\library_project_imports\bin\classes.jar
> obj\Debug\__library_projects__\Xamarin.Android.Support.Core.UI\library_project_imports\bin\classes.jar
> obj\Debug\__library_projects__\Xamarin.Android.Support.Core.Utils\library_project_imports\bin\classes.jar
> obj\Debug\__library_projects__\Xamarin.Android.Support.Design\library_project_imports\bin\classes.jar
> obj\Debug\__library_projects__\Xamarin.Android.Support.Fragment\library_project_imports\bin\classes.jar
> obj\Debug\__library_projects__\Xamarin.Android.Support.Media.Compat\library_project_imports\bin\classes.jar
> obj\Debug\__library_projects__\Xamarin.Android.Support.Transition\library_project_imports\bin\classes.jar
> obj\Debug\__library_projects__\Xamarin.Android.Support.v4\library_project_imports\bin\classes.jar
> obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\bin\classes.jar
> obj\Debug\__library_projects__\Xamarin.Android.Support.v7.RecyclerView\library_project_imports\bin\classes.jar
> obj\Debug\__library_projects__\Xamarin.Android.Support.Vector.Drawable\library_project_imports\bin\classes.jar
> C:\Users\DELL\AppData\Local\Xamarin\Xamarin.Android.Support.CustomTabs\23.3.0.0\embedded\classes.jar
> 
>         1>  
>         1>  trouble writing output: Too many field references: 65539; max is 65536.
>         1>  You may try using --multi-dex option.
>         1>  References by package:
>         1>       2 android.accounts
>         1>      27 android.app
>         1>      24 android.content.pm
>         1>      10 android.content.res
>         1>      45 android.graphics
>         1>       2 mono.android.speech
>         1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2068,3):
> error MSB6006: "java.exe" exited with code 2.
>         1>    DexOutputs: 
>         1>      obj\Debug\android\bin\classes.dex
>         1>Done executing task "CompileToDalvik" -- FAILED.
>         1>Done building target "_CompileToDalvikWithDx" in project "TestVoipApp.csproj" -- FAILED.
>         1>
>         1>Build FAILED.`

есть предложения?

1 Ответ

0 голосов
/ 29 апреля 2018

Включите MultiDex

Xamarin.Android -> Перейти к свойствам -> AndroidOptions -> Включить MultiDex

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...