Forum Xamarin.Android

Xamarin Android Binding Library Project fails using Proguard and Linker

batmacibatmaci DEMember ✭✭✭✭✭
edited March 27 in Xamarin.Android

I have created a android binding library using Samsung Accessory Sdk jar file. Everything works fine when I use Without linking or Sdk Assemblies only. But using full linking it fails with error MSB6006: "java.exe" exited with code 1. Thats typical proguard error but I couldnt figure out what could be the exact issue although I enabled diagnostic logs and logs doesnt say anything. There SO post like below suggesting Proguard settings for Samsung Accessory Sdk.
I tried all but unfortunately none of them worked for me. It is probably because I used Binding Library and it has some exception.

https://stackoverflow.com/questions/24872517/proguard-issue-with-saagentsamsung-accessory-java-lang-nosuchmethodexception

Can anyone help here? I attached repro below.

Answers

  • JarvanJarvan Member, Xamarin Team Xamurai
    edited March 27

    Everything works fine when I use Without linking or Sdk Assemblies only. But using full linking it fails with error MSB6006 ... It is probably because I used Binding Library and it has some exception.

    This may be caused by the 'Binding Library' because when setting linking to Sdk and User Assemblies, it will link all assemblies, including part of the native library.

    Try to create a sample with the same settings, but don't use the binding library to vertify that.

    Tutorial:
    https://docs.microsoft.com/en-us/xamarin/android/deploy-test/linker#linker-behavior

  • batmacibatmaci DEMember ✭✭✭✭✭

    When i dont use Binding library it works fine. I have created a nuget package out of this BL but it is same problem. So does it mean that i am not able to workaround this, i must use not Sdk and User Assemblies?
    Interesting thing is that i dont see any reason in the logs when i enabled diagnostic logs. It has only "error MSB6006: "java.exe" exited with code 1" and a few proguard warnings. Would you mind download and try to build the app ? Error occurs already on build time.

Sign In or Register to comment.