xamarin / AndroidSupportComponents

Xamarin bindings for Android Support libraries - For AndroidX see https://github.com/xamarin/AndroidX
MIT License
146 stars 56 forks source link

NoClassDefFoundError Only for Release. In Development the app is working #100

Closed DoktorAerzt closed 5 years ago

DoktorAerzt commented 6 years ago

Xamarin.Android Version (eg: 6.0):

7.1

Operating System & Version (eg: Mac OSX 10.11):

Windows 10 Enterprise 1709

Support Libraries Version (eg: 23.3.0):

25.4.0.2

Describe your Issue:

In my Development Environment i can Start my app and everything is working. When i pack the app and upload the apk to the play store i get on the other Devices the error: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/appcompat/R$drawable;

Am i missing something or do i have a mistake anywhere?

Steps to Reproduce (with link to sample solution if possible):

Include any relevant Exception Stack traces, build logs, adb logs:

packages.config.txt logcat.txt

DoktorAerzt commented 6 years ago

Found a Sollution. First i played around with the Linker Settings and found out that when i turn of the linker the app is working. So then i decide to made a Dummy function to include the Drawable class. Like that:

private void noUseOnlyForLinker()
        {
            DrawableWrapper dwDummy;

        }

Is there something you can do to let the linker include the class when you need it? Or do i really need the Dummy function?

Redth commented 5 years ago

Please update to the latest Support library version