1

I recently updated the Xamarin.Android.Support libraries from 24.2.1 to 25.3.1, so I was able to get Push Notifications to work on Android. While that made the Push Notifications work, it has now introduced an issue that only occurs when I build the project in Release mode, with ProGuard enabled.

The final error is the very generic

"java.exe" exited with code 1.

The most meaningful I can extract from the Output window (when the Output setting has been set to Diagnostics) is

Exception in thread "main" java.lang.StackOverflowError (TaskId:289)
1>      at proguard.util.OrMatcher.matches(OrMatcher.java:46) (TaskId:289)
// This line is repeated 1024 times.

I can't really revert back to the previous Support libraries, because I need Push Notifications to work.

Has anyone has similar issues, or is my only option to simply disable ProGuard, and live with the larger APK size?

Edit: Uploaded a Diagnostics build log: https://pastebin.com/Mu9K8rbX (Couldn't include everything, pastebin has a limit on 512kb)

Falgantil
  • 1,290
  • 12
  • 27
  • try manually updating proguard, have a look at this post: http://stackoverflow.com/questions/39514518/xamarin-android-proguard-unsupported-class-version-number-52-0/39514706#39514706 – Milen May 03 '17 at 12:54
  • Already tried that, updated it to the newest, still same result. – Falgantil May 03 '17 at 12:59
  • Can you upload a diagnostic build output? Also your current proguard config if you have one. Two ideas from the get go: 1. Increase your Java heap 2. Proguard is running in a loop until OOM. – Jon Douglas May 03 '17 at 14:58
  • You may just need to create/update your proguard.cfg file so it keeps any android support libraries. You can check out this post for a better example of what I mean: http://stackoverflow.com/questions/43393942/proguard-java-exe-exited-with-code-1-after-adding-modernhttpclient/43555029#43555029 – Nick Peppers May 03 '17 at 17:20
  • Changing my proguard config file according to the answer you linked, didn't work. Same issue. I uploaded a diagnostics build log. – Falgantil May 04 '17 at 07:54
  • 1
    Does the root of your proguard directory still contain your proguard-android-optimize.txt, proguard-android.txt, proguard-project.txt files after you copied over the latest proguard? – Nick Peppers May 04 '17 at 17:47
  • This may in fact very much have been the issue. After I copied those txt files back in there with the new version, and added a custom Proguard config file to my solution, it worked! Thanks! – Falgantil May 05 '17 at 11:51

0 Answers0