3

After i updated some packages (Android Support Design) on my project, an error appeared:

Java.Lang.NoClassDefFoundError: android.arch.core.internal.FastSafeIterableMap

I don't know why i have this. I changed my target android version, but the error is still here.

I'm using the latest version of xamarin, and i'm still in debug, with proguard disable.

Any ideas?

packages.config:

<?xml version="1.0" encoding="utf-8"?>
<packages>
   <package id="Xamarin.Android.Arch.Core.Common" version="1.0.0.1" targetFramework="monoandroid81" />
   <package id="Xamarin.Android.Arch.Lifecycle.Common" version="1.0.3.1" targetFramework="monoandroid81" />
   <package id="Xamarin.Android.Arch.Lifecycle.Runtime" version="26.1.0" targetFramework="monoandroid81" />
</packages>
LS_
  • 6,763
  • 9
  • 52
  • 88
Samih EL SAKHAWI
  • 429
  • 4
  • 17
  • 1
    Possible duplicate of [Why am I getting a NoClassDefFoundError in Java?](https://stackoverflow.com/questions/34413/why-am-i-getting-a-noclassdeffounderror-in-java) – Umair Jul 09 '18 at 15:02
  • Can you add which packages did you update? – LS_ Jul 09 '18 at 15:08
  • @Signo The package is Android Support Design – Samih EL SAKHAWI Jul 09 '18 at 15:17
  • @French_FitGirl ok, please also add your `packages.config` to the question, the issue is probably related to some conflicting version of the installed libraries – LS_ Jul 10 '18 at 10:22
  • @Signo this is my packages.config – Samih EL SAKHAWI Jul 10 '18 at 20:07
  • @French_FitGirl one of the packages seems to be deprecated, try with my solution. Also how did you add the Android Support Design? Using jar libraries? Because it seems to be available also from [Xamarin here](https://www.nuget.org/packages/Xamarin.Android.Support.Design/) – LS_ Jul 11 '18 at 07:20
  • @French_FitGirl Having the same issue for days, did you figure out how to resolve? – cfl Jan 29 '19 at 05:36

2 Answers2

0

The version 26.1.0 of the package Xamarin.Android.Arch.Lifecycle.Runtime is listed as deprecated:

The owner has unlisted this package. This could mean that the package is deprecated or shouldn't be used anymore.

Try by removing this package and adding it again with the current version 1.0.3.1.

Then do a clean and rebuild of the project.

LS_
  • 6,763
  • 9
  • 52
  • 88
  • 2
    i updated the package Xamarin.Android.Arch.Lifecycle.Runtime to the latest version, and do a clean/ rebuild of the project, and i'm still had the error. I also enabled multidex, and keep the android/arch/core/internal.class, and it still doesn't work. – Samih EL SAKHAWI Jul 12 '18 at 19:05
0

I got this same error when i migrated

From

implementation 'com.android.support:design:26.0.2'

To

implementation 'com.android.support:design:27.1.1'

and realized i need to add this extra dependency for design 27.1.1 to work

implementation 'android.arch.core:common:1.1.1'

That's all.

Moz
  • 109
  • 2
  • 10