0

I'm getting an exception like following:

07-26 10:17:25.991 I/dalvikvm(20751): Could not find method org.slf4j.LoggerFactory.getILoggerFactory, referenced from method com.app.androknife2.utils.L.init
07-26 10:17:25.991 W/dalvikvm(20751): VFY: unable to resolve static method 63525: Lorg/slf4j/LoggerFactory;.getILoggerFactory ()Lorg/slf4j/ILoggerFactory;
07-26 10:17:26.011 E/AndroidRuntime(20751): FATAL EXCEPTION: main
07-26 10:17:26.011 E/AndroidRuntime(20751): Process: com.app.gallery.premium, PID: 20751
07-26 10:17:26.011 E/AndroidRuntime(20751): java.lang.NoClassDefFoundError: org.slf4j.LoggerFactory
07-26 10:17:26.011 E/AndroidRuntime(20751):     at com.app.androknife2.utils.L.d(L.java:165)
07-26 10:17:26.011 E/AndroidRuntime(20751):     at com.app.androknife2.baseClasses.BaseApp$1.d(BaseApp.java:51)
...

The weird thing is, this app is in the play store as a beta app and is working for everyone, but one tester get's this exception, as soon as he start the app (the first log try fails with the above exception).

Any idea, what could be the root cause? The slf4j library is packed into my code, so if I made something wrong proguarding it, it would fail on all devices as far as I understand that...

Any ideas, hints or similar?

ddb
  • 2,423
  • 7
  • 28
  • 38
prom85
  • 16,896
  • 17
  • 122
  • 242
  • Have you tried uninstalling any old version of app on that device and installing latest one? – hrskrs Jul 27 '16 at 06:56
  • Yes. The user is in my beta group and tried the free/pro version and both have this error... On his device. All other testers can start my app. App source is the play store always... The user with the problem deinstalled the app and tried it again with no success... – prom85 Jul 27 '16 at 06:57

1 Answers1

0

It looks like you have reached the 65k method limit.

try adding this line:

android:name="android.support.multidex.MultiDexApplication"

on AndroidManifest inside application tag

Note that you can avoid this programatically also: Refer to Apps with Over 64K Methods for more details

hrskrs
  • 4,447
  • 5
  • 38
  • 52
  • Shouldn't this lead to the same crash on all devices??? I'm proguarding my release build and deactivate multi dex there (although I use it in debug builds). I just counted the methods and the release should be multi dex as well, so this seems to be a problem. Your link indicates, that mutli dex works different on android >=5 than before. The crashing device is running android 4.4... This seems to be the problem... I'm using `multiDexEnabled true/false` in the `gradle.build` file instead of your line...This and the `compile 'com.android.support:multidex:1.0.1' ` dependency should work... – prom85 Jul 27 '16 at 07:24
  • @prom85 if you read the link i provided above you can see that it behaves differently on devices prior to 5.0 – hrskrs Jul 27 '16 at 07:47