Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
After update project to xamarin.android.Wear 220.127.116.11 doesn't build.
Error java.exe exited with code 1
Could you please provide diagnostic build output?
Have you set the $(JavaMaximumHeapSize) property?
Created attachment 13522 [details]
Same problem using xamarin.android.Wear 18.104.22.168
$(JavaMaximumHeapSize) --> 1G
Thank you for the build output. From it, we can see:
> C:\Program Files (x86)\Java\jdk1.7.0_79\\bin\java.exe -jar C:\Users\development\AppData\Local\Android\android-sdk\tools\proguard\lib\proguard.jar -include C:\Users\development\AppData\Local\Android\android-sdk\tools\proguard\proguard-android.txt -include obj\Release\proguard\proguard_xamarin.cfg -include obj\Release\proguard\proguard_project_references.cfg -include obj\Release\proguard\proguard_project_primary.cfg "-injars 'obj\Release\proguard\__proguard_input__.jar';'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v5.0\mono.android.jar';'obj\Release\__library_projects__\Xamarin.Android.Wearable\library_project_imports\classes.jar';'C:\Users\development\AppData\Local\Xamarin\Android.Support.v4\22.214.171.124\embedded\classes.jar';'C:\Users\development\AppData\Local\Xamarin\Android.Support.v4\126.96.36.199\embedded\libs\internal_impl-23.0.1.jar';'C:\Users\development\AppData\Local\Xamarin\Android.Support.v7.RecyclerView\188.8.131.52\embedded\classes.jar';'C:\Users\development\AppData\Local\Xamarin\Android.Wearable\1.3.0\embedded\classes.jar'" "-libraryjars 'C:\Users\development\AppData\Local\Android\android-sdk\platforms\android-22\android.jar'" -outjars "obj\Release\proguard\__proguard_output__.jar"
> Note: duplicate definition of program class [android.support.wearable.BuildConfig]
> PROGUARD : warning : can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [classes.jar:META-INF/MANIFEST.MF])
> java.io.IOException: Can't write [C:\Users\development\Documents\Visual Studio 2013\Projects\adasoft\flashapp\Client\Mobile\View\Android\trunk\Wearable\obj\Release\proguard\__proguard_output__.jar] (Can't read [C:\Users\development\AppData\Local\Xamarin\Android.Wearable\1.3.0\embedded\classes.jar] (Duplicate zip entry [classes.jar:android/support/wearable/BuildConfig.class]))
> at proguard.OutputWriter.writeOutput(OutputWriter.java:264)
> at proguard.OutputWriter.execute(OutputWriter.java:160)
> at proguard.ProGuard.writeOutput(ProGuard.java:372)
> at proguard.ProGuard.execute(ProGuard.java:153)
> at proguard.ProGuard.main(ProGuard.java:492)
It looks like Proguard execution is reporting errors and failing, which is something that setting $(JavaMaximumHeapSize) won't help with.
It looks like a .jar is being included multiple times, causing the same types to be included multiple times.
In particular, from the java.exe proguard.jar command-line, these looks potentially duplicative:
Especially since the first "Note: duplicate definition" message is *after* processing the latter classes.jar.
Please double-check your project and ensure you're not including the same .jar file and/or the same Java types multiple times.
This project compiles correctly before update to xamarin.android.Wear 184.108.40.206
It fails when I upgrade.
I disabled proguard but I can't compile.
> I disabled proguard but I can't compile.
That said, since proguard is getting multiple copies of the "same" .jar file, dx would as well (or *should*...), and thus *packaging* would hit a similar problem.
This should be fixed in 220.127.116.11, please update to that nuget package, delete your bin/ and obj/ folders, and rebuild.
I reinstall nuget package and still fails.
Could you please upload a repro? I can't reproduce the failure here.
I made some test, and finally I can compile the Wear extension.
I remove ProGuard from Wear extension.
Why cannot use ProGuard?
Not sure, I would need to see a reproducible sample solution with the issue to have any further suggestions/ideas.