Fixed
Status Update
Comments
fe...@gmail.com <fe...@gmail.com> #2
The issue can be reproduced without even using intents or activities:
Parcel parcel = Parcel.obtain();
// put a custom parcelable class in a bundle
Bundle bundle = new Bundle();
MyCustomParcelable custom = new MyCustomParcelable();
bundle.putParcelable("KEY", custom);
// parcel the bundle itself
bundle.writeToParcel(parcel, 0);
// read the bundle from parcel
parcel.setDataPosition(0);
Bundle bundle2 = Bundle.CREATOR.createFromParcel(parcel);
// read custom parcelable class from bundle again
MyCustomParcelable custom2 = bundle2.getParcelable("KEY");
-> This throws an exception:
android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.example.MyCustomParcelable
at android.os.Parcel.readParcelableCreator(Parcel.java:2536)
at android.os.Parcel.readParcelable(Parcel.java:2462)
at android.os.Parcel.readValue(Parcel.java:2365)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2732)
at android.os.BaseBundle.unparcel(BaseBundle.java:269)
at android.os.Bundle.getParcelable(Bundle.java:864)
-> Workaround:
After bundle2 has been read, but before custom parcelable object is read from bundle2, insert this line:
bundle2.setClassLoader(getClass().getClassLoader());
Parcel parcel = Parcel.obtain();
// put a custom parcelable class in a bundle
Bundle bundle = new Bundle();
MyCustomParcelable custom = new MyCustomParcelable();
bundle.putParcelable("KEY", custom);
// parcel the bundle itself
bundle.writeToParcel(parcel, 0);
// read the bundle from parcel
parcel.setDataPosition(0);
Bundle bundle2 = Bundle.CREATOR.createFromParcel(parcel);
// read custom parcelable class from bundle again
MyCustomParcelable custom2 = bundle2.getParcelable("KEY");
-> This throws an exception:
android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.example.MyCustomParcelable
at android.os.Parcel.readParcelableCreator(Parcel.java:2536)
at android.os.Parcel.readParcelable(Parcel.java:2462)
at android.os.Parcel.readValue(Parcel.java:2365)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2732)
at android.os.BaseBundle.unparcel(BaseBundle.java:269)
at android.os.Bundle.getParcelable(Bundle.java:864)
-> Workaround:
After bundle2 has been read, but before custom parcelable object is read from bundle2, insert this line:
bundle2.setClassLoader(getClass().getClassLoader());
xa...@android.com <xa...@android.com>
yr...@google.com <yr...@google.com> #3
It would be nice, even if this is not fixed quickly, that a google engineer
would explain what is hard in fixing the bug.
Thanks in advance, and thanks a lot for this example @pe..
2018-01-19 9:54 GMT-08:00 <buganizer-system@google.com>:
would explain what is hard in fixing the bug.
Thanks in advance, and thanks a lot for this example @pe..
2018-01-19 9:54 GMT-08:00 <buganizer-system@google.com>:
fe...@gmail.com <fe...@gmail.com> #4
> MyCustomParcelable custom2 = bundle2.getParcelable("KEY");
You're missing a call to setClassLoader() before trying to deserialize the class:
> bundle2.setClassLoader(MyCustomParcelable.class.getClassLoader());
> MyCustomParcelable custom2 = bundle2.getParcelable("KEY");
You're missing a call to setClassLoader() before trying to deserialize the class:
> bundle2.setClassLoader(MyCustomParcelable.class.getClassLoader());
> MyCustomParcelable custom2 = bundle2.getParcelable("KEY");
fe...@gmail.com <fe...@gmail.com> #5
Thank you for your feedback. We assure you that we are doing our best to address all issues reported. For now, we will be closing the issue as won't fix obsolete. If this issue currently still exists, we request that you log a new issue along with the bug report here https://goo.gl/TbMiIO and reference this bug for context.
fe...@gmail.com <fe...@gmail.com> #6
We're still looking into it. We're *not* using mainDexClasses because it wasn't documented or included on the SDK, and the only blog file that references it (written on Monday) mentions libraries to be preDexed, which isn't available while --multi-dex, and removing --multi-dex doesn't allow our app to build due to the 64k method limit.
fe...@gmail.com <fe...@gmail.com> #7
The error is localized to my computer and only in 4/10 builds, so whenever I want something and it doesn't work I have to edit a file, rebuild and hope for the best.
br...@gmail.com <br...@gmail.com> #8
We've run into the same issue as well. Right before the AndroidRuntime error, you should see dalvikvm error saying which class resolved by unexpected DEX (the orm-lite class). I suspect that has a nested static enum or classes? If you add that class in your multidex.keep file, does it fix your problem? Could you paste the dalvikvm log line you are seeing?
fe...@gmail.com <fe...@gmail.com> #9
10-29 18:26:26.140 31690-31690/com.myapp.app W/dalvikvm﹕ Class resolved by unexpected DEX: Lcom/myapp/model/MyClass;(0x427a7898):0x596d1000 ref [Lcom/j256/ormlite/field/DataType;] Lcom/j256/ormlite/field/DataType;(0x427a7898):0x5910f000
10-29 18:26:26.140 31690-31690/com.myapp.app W/dalvikvm﹕ (Lcom/myapp/model/MyClass; had used a different Lcom/j256/ormlite/field/DataType; during pre-verification)
10-29 18:26:26.140 31690-31690/com.myapp.app W/dalvikvm﹕ Failed processing annotation value
10-29 18:26:26.140 31690-31690/com.myapp.app W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41d28700)
I'll try and add that class to the multidex.keep
10-29 18:26:26.140 31690-31690/
10-29 18:26:26.140 31690-31690/
10-29 18:26:26.140 31690-31690/
I'll try and add that class to the multidex.keep
fe...@gmail.com <fe...@gmail.com> #10
[Comment deleted]
fe...@gmail.com <fe...@gmail.com> #11
After several attempts with mainDexClasses this is as far as I got
sudo ./mainDexClasses --output multidex.keep /Users/myuser/my_workspace/myapp/app/build/intermediates/dex/dev/debug;/Users/myuser/my_workspace/myapp/app/libs/android-support-multidex.jar;/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar;/Users/myuser/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.2.4/95705b2e89a4101f2a82af6b303945755d7f93ab/jackson-core-2.2.4.jar;/Users/myuser/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.2.4/9de62c96bb3e17eb909c107f2759c73650b5a8f1/jackson-annotations-2.2.4.jar;/Users/myuser/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.2.4/906cf5deb56ec1fb3ecbeceb08a1734ce9fed664/jackson-databind-2.2.4.jar
Password:
Error: The input doesn't contain any classes. Did you specify the proper '-injars' options?
-bash: /Users/myuser/my_workspace/myapp/app/libs/android-support-multidex.jar: cannot execute binary file
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 1: PK: command not found
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 2: xj?C: command not found
K-*??ϳR0?3??r,J??,K-?V?+????RKRSt?*?ules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 3:wj?C?I5?x?META-INF/MANIFEST.MF?M??LK-.?
?3R: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 3: ?R?x??J3sJ???E???%??P?]??l?fz?f?@{: command not found
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 5: r2?K?V: command not found
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 6: sj?Ccom/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 7: sj?C: command not found
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 8: tj?Ccom/j256/ormlite/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 9: sj?Ccom/j256/ormlite/core/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 10: tj?Ccom/j256/ormlite/dao/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 11: tj?Ccom/j256/ormlite/db/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 12: tj?Ccom/j256/ormlite/field/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 13: tj?Ccom/j256/ormlite/field/types/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 14: tj?Ccom/j256/ormlite/logger/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 15: tj?Ccom/j256/ormlite/misc/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 16: tj?Ccom/j256/ormlite/stmt/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 17: tj?Ccom/j256/ormlite/stmt/mapped/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 18: tj?Ccom/j256/ormlite/stmt/query/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 19: tj?Ccom/j256/ormlite/support/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 20: tj?Ccom/j256/ormlite/table/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 21:sj?C?0??L!com/j256/ormlite/core/LICENSE.txtURMs?: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 24: syntax error near unexpected token `)'
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 24: `"?@?h/Ѯ??)???????j?
p??ah5EbH???Ь.a_S???c"' {`M??d??c????N?[n????
-bash: /Users/myuser/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.2.4/95705b2e89a4101f2a82af6b303945755d7f93ab/jackson-core-2.2.4.jar: cannot execute binary file
-bash: /Users/myuser/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.2.4/9de62c96bb3e17eb909c107f2759c73650b5a8f1/jackson-annotations-2.2.4.jar: cannot execute binary file
-bash: /Users/myuser/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.2.4/906cf5deb56ec1fb3ecbeceb08a1734ce9fed664/jackson-databind-2.2.4.jar: cannot execute binary file
The output file is empty.
sudo ./mainDexClasses --output multidex.keep /Users/myuser/my_workspace/myapp/app/build/intermediates/dex/dev/debug;/Users/myuser/my_workspace/myapp/app/libs/android-support-multidex.jar;/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar;/Users/myuser/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.2.4/95705b2e89a4101f2a82af6b303945755d7f93ab/jackson-core-2.2.4.jar;/Users/myuser/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.2.4/9de62c96bb3e17eb909c107f2759c73650b5a8f1/jackson-annotations-2.2.4.jar;/Users/myuser/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.2.4/906cf5deb56ec1fb3ecbeceb08a1734ce9fed664/jackson-databind-2.2.4.jar
Password:
Error: The input doesn't contain any classes. Did you specify the proper '-injars' options?
-bash: /Users/myuser/my_workspace/myapp/app/libs/android-support-multidex.jar: cannot execute binary file
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 1: PK: command not found
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 2: xj?C: command not found
K-*??ϳR0?3??r,J??,K-?V?+????RKRSt?*?ules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 3:wj?C?I5?x?META-INF/MANIFEST.MF?M??LK-.?
?3R: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 3: ?R?x??J3sJ???E???%??P?]??l?fz?f?@{: command not found
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 5: r2?K?V: command not found
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 6: sj?Ccom/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 7: sj?C: command not found
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 8: tj?Ccom/j256/ormlite/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 9: sj?Ccom/j256/ormlite/core/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 10: tj?Ccom/j256/ormlite/dao/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 11: tj?Ccom/j256/ormlite/db/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 12: tj?Ccom/j256/ormlite/field/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 13: tj?Ccom/j256/ormlite/field/types/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 14: tj?Ccom/j256/ormlite/logger/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 15: tj?Ccom/j256/ormlite/misc/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 16: tj?Ccom/j256/ormlite/stmt/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 17: tj?Ccom/j256/ormlite/stmt/mapped/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 18: tj?Ccom/j256/ormlite/stmt/query/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 19: tj?Ccom/j256/ormlite/support/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 20: tj?Ccom/j256/ormlite/table/PK: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 21:sj?C?0??L!com/j256/ormlite/core/LICENSE.txtURMs?: No such file or directory
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 24: syntax error near unexpected token `)'
/Users/myuser/.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar: line 24: `"?@?h/Ѯ??)???????j?
p??ah5EbH???Ь.a_S???c"' {`M??d??c????N?[n????
-bash: /Users/myuser/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.2.4/95705b2e89a4101f2a82af6b303945755d7f93ab/jackson-core-2.2.4.jar: cannot execute binary file
-bash: /Users/myuser/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.2.4/9de62c96bb3e17eb909c107f2759c73650b5a8f1/jackson-annotations-2.2.4.jar: cannot execute binary file
-bash: /Users/myuser/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.2.4/906cf5deb56ec1fb3ecbeceb08a1734ce9fed664/jackson-databind-2.2.4.jar: cannot execute binary file
The output file is empty.
fe...@gmail.com <fe...@gmail.com> #12
[Comment deleted]
fe...@gmail.com <fe...@gmail.com> #13
Changed /Users/myuser/my_workspace/myapp/app/build/intermediates/dex/dev/debug to /Users/myuser/my_workspace/myapp/app/build/intermediates/classes/dev/debug and the multidex.keep at least got my project's classes
fe...@gmail.com <fe...@gmail.com> #14
Seems to be working so far.
ni...@gmail.com <ni...@gmail.com> #15
Same error with the new multiDex system (multiDexEnabled true)
I added the multidex instrumentation but it conflicts with the multidex lib added automatically by multiDexEnabled.
And the classes with annotation doesn't works.
I added the multidex instrumentation but it conflicts with the multidex lib added automatically by multiDexEnabled.
And the classes with annotation doesn't works.
ma...@gmail.com <ma...@gmail.com> #16
Same issue as well after updating to the new multiDex system, Nitro have you had any luck yet?
ni...@gmail.com <ni...@gmail.com> #17
No, I reverted to the old multidex system for now (I'm working on a project with a dead-line).
What I could find :
Using Build-Tools 21.1.0, gradle plugin 0.14.1 and AS 0.9.1
Having multiDexEnabled true :
in dependencies, you need to remove
compile 'com.android.support:multidex:1.0.0'
because it's already included by multiDexEnabled
same for
androidTestCompile('com.android.support:multidex-instrumentation:1.0.0') that include com.android.support:multidex:1.0.0
so need to do :
androidTestCompile('com.android.support:multidex-instrumentation:1.0.0') {
exclude module: 'multidex'
}
Then sometimes it couldn't find the instrumentation MultiDexTestRunner so I created a class implementing it for my tests and added it with :
testInstrumentationRunner "com.package.DexInstrumentationTestRunner"
So... it should works but on my project we use jackson annotations and it results with the error :
java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation
at java.lang.reflect.Field.getAnnotation(Native Method)
and the same :
10-29 18:26:26.140 31690-31690/com.myapp.app W/dalvikvm﹕ Class resolved by unexpected DEX: JsonInclude$Include...
10-29 18:26:26.140 31690-31690/com.myapp.app W/dalvikvm﹕ xxx had used a different xxx; during pre-verification)
10-29 18:26:26.140 31690-31690/com.myapp.app W/dalvikvm﹕ Failed processing annotation value
target version 21, same for subprojects...
Here's my dependencies :
androidTestCompile - Classpath for compiling the androidTest sources.
\--- com.squareup.okhttp:mockwebserver:2.0.0
\--- org.bouncycastle:bcprov-jdk15on:1.50
compile - Classpath for compiling the main sources.
+--- project :libraries:extendedCalendarView
| \--- com.android.support:multidex:1.0.0
+--- project :libraries:facebook
| +--- com.android.support:multidex:1.0.0
| +--- com.android.support:support-v4:20.0.0 -> 21.0.0
| | \--- com.android.support:support-annotations:21.0.0
| \--- com.parse.bolts:bolts-android:1.1.3
+--- project :libraries:viewpagerindicator
| +--- com.android.support:multidex:1.0.0
| \--- com.android.support:support-v4:20.0.0 -> 21.0.0 (*)
+--- com.android.support:support-v4:21.0.0 (*)
+--- com.google.android.gms:play-services:4.+ -> 4.4.52
| \--- com.android.support:support-v4:19.0.1 -> 21.0.0 (*)
+--- com.google.http-client:google-http-client-android:1.12.0-beta
+--- com.google.guava:guava-jdk5:17.0
+--- com.google.protobuf:protobuf-java:2.5.0
+--- com.google.api-client:google-api-client:1.19.0
| +--- com.google.oauth-client:google-oauth-client:1.19.0
| | +--- com.google.http-client:google-http-client:1.19.0
| | | \--- com.google.code.findbugs:jsr305:1.3.9
| | \--- com.google.code.findbugs:jsr305:1.3.9
| +--- com.google.http-client:google-http-client-jackson2:1.19.0
| | +--- com.google.http-client:google-http-client:1.19.0 (*)
| | \--- com.fasterxml.jackson.core:jackson-core:2.1.3 -> 2.4.3
| \--- com.google.guava:guava-jdk5:13.0 -> 17.0
+--- com.squareup.retrofit:retrofit:1.6.1
| \--- com.google.code.gson:gson:2.2.4
+--- de.greenrobot:eventbus:2.2.1
+--- com.fasterxml.jackson.core:jackson-annotations:2.4.3
+--- com.fasterxml.jackson.core:jackson-databind:2.4.3
| \--- com.fasterxml.jackson.core:jackson-core:2.4.3
+--- com.fasterxml.jackson.core:jackson-core:2.4.3
+--- com.path:android-priority-jobqueue:1.1.2
| \--- com.google.android:android:2.2.1
| +--- commons-logging:commons-logging:1.1.1
| +--- org.apache.httpcomponents:httpclient:4.0.1
| | +--- org.apache.httpcomponents:httpcore:4.0.1
| | +--- commons-logging:commons-logging:1.1.1
| | \--- commons-codec:commons-codec:1.3 -> 1.9
| +--- org.khronos:opengl-api:gl1.1-android-2.1_r1
| +--- xerces:xmlParserAPIs:2.6.2
| +--- xpp3:xpp3:1.1.4c
| \--- org.json:json:20080701
+--- com.squareup.okhttp:okhttp:2.0.0
| \--- com.squareup.okio:okio:1.0.0 -> 1.0.1
+--- com.squareup.okhttp:okhttp-urlconnection:2.0.0
| \--- com.squareup.okhttp:okhttp:2.0.0 (*)
+--- com.squareup.okio:okio:1.0.1
+--- org.chalup.microorm:microorm:0.4.1
| \--- com.google.guava:guava:16.0
+--- commons-codec:commons-codec:1.9
+--- com.squareup.picasso:picasso:2.3.4
+--- com.jakewharton:butterknife:5.1.2
+--- info.hoang8f:android-segmented:1.0.2
+--- com.github.chrisbanes.photoview:library:1.2.3
+--- com.google.maps.android:android-maps-utils:0.3.1
| \--- com.google.android.gms:play-services:4.3+ -> 4.4.52 (*)
+--- com.jayway.android.robotium:robotium-solo:5.2.1
\--- org.fusesource.mqtt-client:mqtt-client:1.10
+--- org.fusesource.hawtdispatch:hawtdispatch-transport:1.20
| \--- org.fusesource.hawtdispatch:hawtdispatch:1.20
\--- org.fusesource.hawtbuf:hawtbuf:1.10
As you can see there are only one jackson include ! I tried everything and was pretty pissed... But I'm not mad against anyone, and the multiDexEnabled is pretty awesome (though the new guide that came out is already outdatedhttp://developer.android.com/tools/building/multidex.html#testing ). I hope it will be fixed as soon as possible !
What I could find :
Using Build-Tools 21.1.0, gradle plugin 0.14.1 and AS 0.9.1
Having multiDexEnabled true :
in dependencies, you need to remove
compile 'com.android.support:multidex:1.0.0'
because it's already included by multiDexEnabled
same for
androidTestCompile('com.android.support:multidex-instrumentation:1.0.0') that include com.android.support:multidex:1.0.0
so need to do :
androidTestCompile('com.android.support:multidex-instrumentation:1.0.0') {
exclude module: 'multidex'
}
Then sometimes it couldn't find the instrumentation MultiDexTestRunner so I created a class implementing it for my tests and added it with :
testInstrumentationRunner "com.package.DexInstrumentationTestRunner"
So... it should works but on my project we use jackson annotations and it results with the error :
java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation
at java.lang.reflect.Field.getAnnotation(Native Method)
and the same :
10-29 18:26:26.140 31690-31690/
10-29 18:26:26.140 31690-31690/
10-29 18:26:26.140 31690-31690/
target version 21, same for subprojects...
Here's my dependencies :
androidTestCompile - Classpath for compiling the androidTest sources.
\--- com.squareup.okhttp:mockwebserver:2.0.0
\--- org.bouncycastle:bcprov-jdk15on:1.50
compile - Classpath for compiling the main sources.
+--- project :libraries:extendedCalendarView
| \--- com.android.support:multidex:1.0.0
+--- project :libraries:facebook
| +--- com.android.support:multidex:1.0.0
| +--- com.android.support:support-v4:20.0.0 -> 21.0.0
| | \--- com.android.support:support-annotations:21.0.0
| \--- com.parse.bolts:bolts-android:1.1.3
+--- project :libraries:viewpagerindicator
| +--- com.android.support:multidex:1.0.0
| \--- com.android.support:support-v4:20.0.0 -> 21.0.0 (*)
+--- com.android.support:support-v4:21.0.0 (*)
+--- com.google.android.gms:play-services:4.+ -> 4.4.52
| \--- com.android.support:support-v4:19.0.1 -> 21.0.0 (*)
+--- com.google.http-client:google-http-client-android:1.12.0-beta
+--- com.google.guava:guava-jdk5:17.0
+--- com.google.protobuf:protobuf-java:2.5.0
+--- com.google.api-client:google-api-client:1.19.0
| +--- com.google.oauth-client:google-oauth-client:1.19.0
| | +--- com.google.http-client:google-http-client:1.19.0
| | | \--- com.google.code.findbugs:jsr305:1.3.9
| | \--- com.google.code.findbugs:jsr305:1.3.9
| +--- com.google.http-client:google-http-client-jackson2:1.19.0
| | +--- com.google.http-client:google-http-client:1.19.0 (*)
| | \--- com.fasterxml.jackson.core:jackson-core:2.1.3 -> 2.4.3
| \--- com.google.guava:guava-jdk5:13.0 -> 17.0
+--- com.squareup.retrofit:retrofit:1.6.1
| \--- com.google.code.gson:gson:2.2.4
+--- de.greenrobot:eventbus:2.2.1
+--- com.fasterxml.jackson.core:jackson-annotations:2.4.3
+--- com.fasterxml.jackson.core:jackson-databind:2.4.3
| \--- com.fasterxml.jackson.core:jackson-core:2.4.3
+--- com.fasterxml.jackson.core:jackson-core:2.4.3
+--- com.path:android-priority-jobqueue:1.1.2
| \--- com.google.android:android:2.2.1
| +--- commons-logging:commons-logging:1.1.1
| +--- org.apache.httpcomponents:httpclient:4.0.1
| | +--- org.apache.httpcomponents:httpcore:4.0.1
| | +--- commons-logging:commons-logging:1.1.1
| | \--- commons-codec:commons-codec:1.3 -> 1.9
| +--- org.khronos:opengl-api:gl1.1-android-2.1_r1
| +--- xerces:xmlParserAPIs:2.6.2
| +--- xpp3:xpp3:1.1.4c
| \--- org.json:json:20080701
+--- com.squareup.okhttp:okhttp:2.0.0
| \--- com.squareup.okio:okio:1.0.0 -> 1.0.1
+--- com.squareup.okhttp:okhttp-urlconnection:2.0.0
| \--- com.squareup.okhttp:okhttp:2.0.0 (*)
+--- com.squareup.okio:okio:1.0.1
+--- org.chalup.microorm:microorm:0.4.1
| \--- com.google.guava:guava:16.0
+--- commons-codec:commons-codec:1.9
+--- com.squareup.picasso:picasso:2.3.4
+--- com.jakewharton:butterknife:5.1.2
+--- info.hoang8f:android-segmented:1.0.2
+--- com.github.chrisbanes.photoview:library:1.2.3
+--- com.google.maps.android:android-maps-utils:0.3.1
| \--- com.google.android.gms:play-services:4.3+ -> 4.4.52 (*)
+--- com.jayway.android.robotium:robotium-solo:5.2.1
\--- org.fusesource.mqtt-client:mqtt-client:1.10
+--- org.fusesource.hawtdispatch:hawtdispatch-transport:1.20
| \--- org.fusesource.hawtdispatch:hawtdispatch:1.20
\--- org.fusesource.hawtbuf:hawtbuf:1.10
As you can see there are only one jackson include ! I tried everything and was pretty pissed... But I'm not mad against anyone, and the multiDexEnabled is pretty awesome (though the new guide that came out is already outdated
fe...@gmail.com <fe...@gmail.com> #18
From the documentation:
There are complex requirements regarding what classes are needed in the primary dex file when executing in the Dalvik runtime. The Android build tooling updates handle the Android requirements, but it is possible that other included libraries have additional dependency requirements including the use of introspection or invocation of Java methods from native code. Some libraries may not be able to be used until the multidex build tools are updated to allow you to specify classes that must be included in the primary dex file.
So as of today multidex builds are not deterministic.
There are complex requirements regarding what classes are needed in the primary dex file when executing in the Dalvik runtime. The Android build tooling updates handle the Android requirements, but it is possible that other included libraries have additional dependency requirements including the use of introspection or invocation of Java methods from native code. Some libraries may not be able to be used until the multidex build tools are updated to allow you to specify classes that must be included in the primary dex file.
So as of today multidex builds are not deterministic.
ni...@gmail.com <ni...@gmail.com> #19
Yeah, I read that part. But as I said, the doc seems to have been made before the new multiDexEnabled = true system.
Why ? because in the build folder, there is a folder multidex containing a file with all the class that should be on the first dex (mainDexClasses).
And there was the JsonInclude.Class that made all my run failed, so it seems it should work !
I don't know where the problem is but my doubt are about the dx command.
Why ? because in the build folder, there is a folder multidex containing a file with all the class that should be on the first dex (mainDexClasses).
And there was the JsonInclude.Class that made all my run failed, so it seems it should work !
I don't know where the problem is but my doubt are about the dx command.
ni...@gmail.com <ni...@gmail.com> #20
[Comment deleted]
ni...@gmail.com <ni...@gmail.com> #21
The file is called maindexlist.txt and here's the result (without my app's packages) :
com/fasterxml/jackson/annotation/JsonTypeId.class
android/support/annotation/RawRes.class
com/dsi/ant/AntInterface.class
com/google/android/gms/common/GooglePlayServicesClient$ConnectionCallbacks.class
com/facebook/model/GraphObjectList.class
android/support/annotation/LayoutRes.class
com/fasterxml/jackson/annotation/JsonGetter.class
com/fasterxml/jackson/annotation/JsonAutoDetect$1.class
android/support/annotation/XmlRes.class
com/fasterxml/jackson/annotation/JsonValue.class
com/facebook/AuthorizationClient$BackgroundProcessingListener.class
javax/annotation/meta/When.class
javax/annotation/Nullable.class
android/support/annotation/ColorRes.class
com/fasterxml/jackson/annotation/JsonUnwrapped.class
javax/annotation/Untainted.class
android/support/v4/app/FragmentManagerImpl$3.class
retrofit/http/GET.class
com/path/android/jobqueue/BaseJob.class
com/google/common/annotations/GwtCompatible.class
com/fasterxml/jackson/annotation/JsonManagedReference.class
com/fasterxml/jackson/annotation/JsonAutoDetect$Visibility.class
com/fasterxml/jackson/databind/annotation/JacksonStdImpl.class
com/fasterxml/jackson/annotation/JsonCreator.class
butterknife/OnItemClick.class
javax/annotation/meta/TypeQualifierValidator.class
android/support/v4/app/FragmentContainer.class
android/support/multidex/MultiDex$V19.class
com/facebook/model/GraphMultiResult.class
com/google/ads/mediation/MediationServerParameters$MappingException.class
com/path/android/jobqueue/Job.class
com/facebook/SessionState.class
com/path/android/jobqueue/config/Configuration.class
com/fasterxml/jackson/databind/util/Converter$None.class
retrofit/http/EncodedQueryMap.class
com/fasterxml/jackson/annotation/SimpleObjectIdResolver.class
android/support/v4/util/DebugUtils.class
com/facebook/AuthorizationClient$Result.class
com/fasterxml/jackson/annotation/JsonAnyGetter.class
retrofit/http/Field.class
retrofit/http/Multipart.class
android/support/v4/app/LoaderManager.class
android/support/multidex/MultiDex.class
javax/annotation/WillNotClose.class
com/facebook/Settings.class
com/facebook/Request.class
com/google/api/client/util/Key.class
com/fasterxml/jackson/annotation/JsonAnySetter.class
com/facebook/widget/LoginButton.class
android/support/annotation/AttrRes.class
android/support/annotation/StyleRes.class
javax/annotation/Nonnull$Checker.class
android/support/v4/app/NotificationCompat.class
javax/annotation/meta/TypeQualifierNickname.class
android/support/v4/app/NoSaveStateFrameLayout.class
com/fasterxml/jackson/annotation/JsonFilter.class
com/facebook/Session$4.class
android/support/annotation/PluralsRes.class
android/support/v4/app/FragmentManager$BackStackEntry.class
com/fasterxml/jackson/annotation/JsonRootName.class
android/support/v4/widget/MaterialProgressDrawable$3.class
com/fasterxml/jackson/databind/annotation/JsonPOJOBuilder$Value.class
android/support/v4/widget/MaterialProgressDrawable$StartCurveInterpolator.class
butterknife/OnEditorAction.class
android/support/annotation/NonNull.class
butterknife/Optional.class
android/support/v4/widget/DrawerLayoutImpl.class
retrofit/http/PATCH.class
com/facebook/Session$StatusCallback.class
com/fasterxml/jackson/databind/jsonFormatVisitors/JsonFormatVisitorWithSerializerProvider.class
com/fasterxml/jackson/annotation/JsonSubTypes.class
com/google/gson/annotations/Since.class
org/sidibe/mqtt/android/lib/MqttPushEventListener.class
butterknife/OnTextChanged.class
com/google/common/annotations/GwtIncompatible.class
com/google/protobuf/AbstractMessageLite.class
butterknife/OnCheckedChanged.class
com/path/android/jobqueue/JobManager.class
android/support/v4/app/Fragment.class
butterknife/internal/ListenerClass.class
com/google/android/gms/location/DetectedActivity.class
android/support/v4/widget/MaterialProgressDrawable$4.class
com/facebook/SessionDefaultAudience.class
android/support/v4/app/ActivityCompat.class
android/support/v4/view/ViewPager$OnPageChangeListener.class
retrofit/http/RestMethod.class
fr/openium/androkit/ConfigApp.class
android/support/v4/widget/MaterialProgressDrawable$EndCurveInterpolator.class
retrofit/http/Streaming.class
com/google/common/annotations/VisibleForTesting.class
com/fasterxml/jackson/annotation/ObjectIdGenerator.class
com/google/api/client/util/NullValue.class
com/google/api/client/util/Beta.class
retrofit/http/POST.class
retrofit/http/PUT.class
javax/annotation/Signed.class
butterknife/OnItemSelected$Callback.class
com/google/gson/annotations/Expose.class
com/path/android/jobqueue/log/CustomLogger.class
javax/annotation/ParametersAreNonnullByDefault.class
android/support/v4/app/FragmentActivity.class
android/support/v4/widget/MaterialProgressDrawable$1.class
com/fasterxml/jackson/databind/annotation/JsonPOJOBuilder.class
com/google/api/client/json/JsonPolymorphicTypeMap$TypeDef.class
android/support/annotation/StringDef.class
com/google/gson/annotations/Until.class
com/fasterxml/jackson/annotation/JsonInclude.class
com/fasterxml/jackson/databind/KeyDeserializer.class
com/facebook/AccessTokenSource.class
android/support/v4/app/ListFragment.class
com/facebook/AppEventsLogger.class
android/support/v4/app/FragmentActivity$NonConfigurationInstances.class
com/fasterxml/jackson/databind/JsonMappingException.class
com/fasterxml/jackson/databind/JsonSerializer$None.class
com/facebook/AuthorizationClient$Result$Code.class
com/fasterxml/jackson/core/JsonProcessingException.class
com/fasterxml/jackson/databind/JsonDeserializer$None.class
retrofit/http/DELETE.class
com/fasterxml/jackson/databind/annotation/JsonDeserialize.class
com/fasterxml/jackson/databind/JsonSerializer.class
com/facebook/Session$TokenRefreshRequestHandler.class
org/chalup/microorm/annotations/Column.class
com/facebook/AuthorizationClient$AuthorizationRequest.class
com/facebook/android/R.class
com/google/api/client/json/JsonString.class
com/fasterxml/jackson/annotation/JacksonAnnotationsInside.class
android/support/annotation/IntDef.class
com/google/android/gms/location/LocationListener.class
android/support/v4/widget/DrawerLayout.class
butterknife/OnLongClick.class
android/support/v4/widget/MaterialProgressDrawable$ProgressDrawableSize.class
com/fasterxml/jackson/annotation/JsonIdentityInfo.class
butterknife/OnPageChange$Callback.class
android/support/v4/app/ActivityCompatHoneycomb.class
com/google/common/annotations/Beta.class
com/google/protobuf/MessageLiteOrBuilder.class
com/fasterxml/jackson/annotation/JsonTypeInfo$As.class
javax/annotation/Nonnegative.class
com/google/gson/annotations/SerializedName.class
com/fasterxml/jackson/annotation/JsonIgnore.class
com/google/api/client/repackaged/com/google/common/annotations/VisibleForTesting.class
com/fasterxml/jackson/databind/util/Converter.class
android/support/v4/app/FragmentManager$OnBackStackChangedListener.class
com/facebook/internal/Utility.class
retrofit/http/FormUrlEncoded.class
javax/annotation/RegEx.class
butterknife/OnClick.class
android/support/v4/app/FragmentActivity$1.class
butterknife/ButterKnife.class
com/facebook/internal/Validate.class
butterknife/OnTouch.class
android/support/v4/app/LoaderManagerImpl.class
com/fasterxml/jackson/annotation/JsonTypeInfo$None.class
com/google/protobuf/InvalidProtocolBufferException.class
android/support/annotation/Nullable.class
android/support/multidex/MultiDex$V14.class
android/support/v4/app/FragmentManagerImpl$4.class
android/support/multidex/MultiDexApplication.class
retrofit/http/EncodedPath.class
com/fasterxml/jackson/databind/jsonschema/JsonSerializableSchema.class
com/facebook/AccessToken.class
com/facebook/model/CreateGraphObject.class
com/facebook/Session$2.class
com/google/common/eventbus/AllowConcurrentEvents.class
android/support/v4/content/LocalBroadcastManager.class
android/support/v4/content/ContextCompat.class
com/facebook/android/R$id.class
android/support/v4/app/FragmentManagerState.class
com/fasterxml/jackson/annotation/JsonIgnoreProperties.class
com/google/android/gms/location/ActivityRecognitionClient.class
com/google/ads/mediation/MediationServerParameters.class
android/support/v4/app/ActionBarDrawerToggle.class
butterknife/OnItemLongClick.class
javax/annotation/meta/Exhaustive.class
com/fasterxml/jackson/annotation/JsonSubTypes$Type.class
javax/annotation/WillClose.class
javax/annotation/Nonnull.class
fr/openium/androkit/utils/ToastUtils.class
retrofit/http/Headers.class
com/facebook/Session$PermissionsPair.class
javax/annotation/WillCloseWhenClosed.class
android/support/v4/app/FragmentManagerImpl$FragmentTag.class
android/support/annotation/IdRes.class
com/facebook/Response.class
android/support/v4/app/FragmentManagerImpl$5.class
retrofit/http/HEAD.class
javax/annotation/CheckForSigned.class
javax/annotation/CheckForNull.class
com/google/ads/mediation/MediationServerParameters$Parameter.class
com/facebook/Session$1.class
butterknife/InjectViews.class
com/fasterxml/jackson/annotation/JsonFormat$Value.class
android/support/annotation/FractionRes.class
com/fasterxml/jackson/annotation/JsonTypeInfo$Id.class
com/fasterxml/jackson/annotation/JsonIgnoreType.class
com/fasterxml/jackson/annotation/ObjectIdGenerator$IdKey.class
com/facebook/FacebookAuthorizationException.class
javax/annotation/ParametersAreNullableByDefault.class
com/facebook/Session.class
javax/annotation/Nonnegative$Checker.class
android/support/annotation/DimenRes.class
android/support/annotation/AnyRes.class
com/fasterxml/jackson/annotation/JacksonAnnotation.class
com/facebook/model/GraphObject.class
javax/annotation/CheckReturnValue.class
com/facebook/FacebookOperationCanceledException.class
android/support/annotation/IntegerRes.class
android/support/multidex/MultiDexExtractor$1.class
com/facebook/UiLifecycleHelper.class
android/support/v4/app/BackStackRecord$TransitionState.class
com/fasterxml/jackson/annotation/JsonView.class
android/support/annotation/MenuRes.class
com/fasterxml/jackson/annotation/JsonRawValue.class
retrofit/http/Query.class
com/google/android/gms/common/annotation/KeepName.class
org/chalup/microorm/MicroOrm.class
com/facebook/FacebookException.class
android/support/multidex/MultiDexExtractor.class
android/support/v4/app/FragmentManagerImpl$2.class
android/support/v4/util/SimpleArrayMap.class
javax/annotation/MatchesPattern$Checker.class
com/fasterxml/jackson/databind/annotation/JsonNaming.class
android/support/multidex/MultiDex$V4.class
android/support/annotation/DrawableRes.class
android/support/v4/app/BackStackState.class
javax/annotation/concurrent/GuardedBy.class
android/support/v4/app/NotificationCompat$Builder.class
com/fasterxml/jackson/databind/jsonFormatVisitors/JsonFormatVisitable.class
com/facebook/Session$TokenRefreshRequest.class
com/facebook/AuthorizationClient$OnCompletedListener.class
com/facebook/LoginActivity.class
org/sidibe/mqtt/android/lib/MqttTopic.class
com/fasterxml/jackson/annotation/JsonPropertyOrder.class
butterknife/OnTextChanged$Callback.class
com/google/android/gms/common/GooglePlayServicesClient.class
javax/annotation/Tainted.class
retrofit/http/FieldMap.class
com/google/android/gms/internal/dw.class
com/fasterxml/jackson/databind/KeyDeserializer$None.class
retrofit/http/QueryMap.class
javax/annotation/Detainted.class
org/fusesource/hawtdispatch/jmx/MBeanInfo.class
android/support/annotation/ArrayRes.class
android/support/v4/app/Fragment$SavedState.class
butterknife/OnItemSelected.class
com/facebook/LoginActivity$1.class
retrofit/http/PartMap.class
android/support/v4/app/FragmentState.class
android/support/v4/app/FragmentActivity$2.class
com/fasterxml/jackson/databind/annotation/JsonSerialize$Inclusion.class
android/support/v4/app/FragmentManagerImpl$1.class
com/fasterxml/jackson/annotation/JsonSetter.class
javax/annotation/OverridingMethodsMustInvokeSuper.class
android/support/multidex/ZipUtil$CentralDirectory.class
com/fasterxml/jackson/databind/jsontype/TypeDeserializer.class
com/facebook/Session$StartActivityDelegate.class
com/facebook/AuthorizationClient.class
retrofit/http/EncodedQuery.class
javax/annotation/Syntax.class
com/facebook/Session$3.class
com/fasterxml/jackson/annotation/JsonFormat$Shape.class
com/facebook/SessionLoginBehavior.class
com/facebook/android/R$layout.class
com/facebook/Session$SerializationProxyV2.class
android/support/v4/util/LogWriter.class
retrofit/http/Body.class
com/google/android/gms/maps/SupportMapFragment.class
javax/annotation/meta/TypeQualifierDefault.class
com/path/android/jobqueue/config/Configuration$Builder.class
com/fasterxml/jackson/annotation/JsonAutoDetect.class
fr/openium/androkit/utils/MemoryUtils.class
com/tyczj/extendedcalendarview/CalendarProvider$DatabaseHelper.class
com/facebook/Request$Callback.class
com/facebook/internal/SessionAuthorizationType.class
android/support/annotation/AnimatorRes.class
javax/annotation/meta/Exclusive.class
android/support/v4/app/SuperNotCalledException.class
android/support/annotation/AnimRes.class
com/facebook/Session$AutoPublishAsyncTask.class
com/fasterxml/jackson/annotation/JsonInclude$Include.class
com/google/protobuf/MessageLite.class
com/google/api/client/json/JsonPolymorphicTypeMap.class
com/google/android/gms/location/ActivityRecognitionResult.class
com/fasterxml/jackson/databind/annotation/JsonSerialize$Typing.class
com/fasterxml/jackson/databind/annotation/JsonValueInstantiator.class
android/support/v4/widget/DrawerLayout$DrawerListener.class
com/google/api/client/util/Value.class
org/chalup/microorm/annotations/Embedded.class
com/fasterxml/jackson/annotation/JsonFormat.class
com/path/android/jobqueue/network/NetworkEventProvider$Listener.class
android/support/annotation/StringRes.class
javax/annotation/concurrent/Immutable.class
com/google/android/gms/common/GooglePlayServicesClient$OnConnectionFailedListener.class
android/support/annotation/StyleableRes.class
android/support/v4/widget/MaterialProgressDrawable$2.class
com/facebook/SharedPreferencesTokenCachingStrategy.class
android/support/v4/app/LoaderManager$LoaderCallbacks.class
android/support/annotation/InterpolatorRes.class
javax/annotation/concurrent/NotThreadSafe.class
android/support/v4/widget/MaterialProgressDrawable$Ring.class
org/sidibe/mqtt/android/lib/MqttAndroidClient.class
com/facebook/Session$5.class
butterknife/internal/ListenerClass$NONE.class
com/google/protobuf/GeneratedMessageLite.class
butterknife/OnFocusChange.class
com/fasterxml/jackson/annotation/JsonIdentityReference.class
com/tyczj/extendedcalendarview/CalendarProvider.class
com/facebook/Session$OpenRequest.class
com/fasterxml/jackson/annotation/JsonPropertyDescription.class
com/google/android/gms/maps/model/LatLng.class
javax/annotation/RegEx$Checker.class
retrofit/http/Path.class
javax/annotation/concurrent/ThreadSafe.class
com/fasterxml/jackson/annotation/JsonTypeName.class
com/facebook/Session$NewPermissionsRequest.class
com/fasterxml/jackson/databind/annotation/JsonSerialize.class
retrofit/http/Part.class
com/fasterxml/jackson/annotation/JsonTypeInfo.class
com/facebook/Session$Builder.class
com/fasterxml/jackson/annotation/ObjectIdResolver.class
android/support/v4/widget/MaterialProgressDrawable.class
com/google/android/gms/common/internal/safeparcel/SafeParcelable.class
com/facebook/model/PropertyName.class
com/fasterxml/jackson/annotation/JsonProperty.class
com/fasterxml/jackson/databind/JsonDeserializer.class
android/support/v4/app/DialogFragment.class
com/facebook/TokenCachingStrategy.class
com/google/api/client/repackaged/com/google/common/annotations/GwtCompatible.class
butterknife/InjectView.class
android/support/v4/app/FragmentTransaction.class
com/facebook/Session$SerializationProxyV1.class
android/support/v4/widget/MaterialProgressDrawable$5.class
android/support/v4/app/FragmentManagerImpl.class
android/support/v4/app/BackStackRecord.class
retrofit/http/Header.class
butterknife/OnPageChange.class
javax/annotation/meta/TypeQualifier.class
com/google/common/eventbus/Subscribe.class
butterknife/internal/ListenerMethod.class
com/facebook/Session$AuthorizationRequest.class
com/facebook/LoginActivity$2.class
com/fasterxml/jackson/databind/annotation/JsonTypeResolver.class
javax/annotation/PropertyKey.class
com/google/protobuf/Internal$EnumLite.class
com/fasterxml/jackson/annotation/JsonBackReference.class
com/fasterxml/jackson/databind/annotation/JsonTypeIdResolver.class
javax/annotation/MatchesPattern.class
com/google/api/client/repackaged/com/google/common/annotations/Beta.class
android/support/multidex/ZipUtil.class
android/support/annotation/BoolRes.class
com/fasterxml/jackson/annotation/JacksonInject.class
android/support/v4/app/FragmentManager.class
org/sidibe/mqtt/android/lib/MqttClientState.class
com/fasterxml/jackson/databind/jsonFormatVisitors/JsonFormatVisitorWrapper.class
You can see that jackson is present so it should be in the first dex, so it should works ! (lots of should).
com/fasterxml/jackson/annotation/JsonTypeId.class
android/support/annotation/RawRes.class
com/dsi/ant/AntInterface.class
com/google/android/gms/common/GooglePlayServicesClient$ConnectionCallbacks.class
com/facebook/model/GraphObjectList.class
android/support/annotation/LayoutRes.class
com/fasterxml/jackson/annotation/JsonGetter.class
com/fasterxml/jackson/annotation/JsonAutoDetect$1.class
android/support/annotation/XmlRes.class
com/fasterxml/jackson/annotation/JsonValue.class
com/facebook/AuthorizationClient$BackgroundProcessingListener.class
javax/annotation/meta/When.class
javax/annotation/Nullable.class
android/support/annotation/ColorRes.class
com/fasterxml/jackson/annotation/JsonUnwrapped.class
javax/annotation/Untainted.class
android/support/v4/app/FragmentManagerImpl$3.class
retrofit/http/GET.class
com/path/android/jobqueue/BaseJob.class
com/google/common/annotations/GwtCompatible.class
com/fasterxml/jackson/annotation/JsonManagedReference.class
com/fasterxml/jackson/annotation/JsonAutoDetect$Visibility.class
com/fasterxml/jackson/databind/annotation/JacksonStdImpl.class
com/fasterxml/jackson/annotation/JsonCreator.class
butterknife/OnItemClick.class
javax/annotation/meta/TypeQualifierValidator.class
android/support/v4/app/FragmentContainer.class
android/support/multidex/MultiDex$V19.class
com/facebook/model/GraphMultiResult.class
com/google/ads/mediation/MediationServerParameters$MappingException.class
com/path/android/jobqueue/Job.class
com/facebook/SessionState.class
com/path/android/jobqueue/config/Configuration.class
com/fasterxml/jackson/databind/util/Converter$None.class
retrofit/http/EncodedQueryMap.class
com/fasterxml/jackson/annotation/SimpleObjectIdResolver.class
android/support/v4/util/DebugUtils.class
com/facebook/AuthorizationClient$Result.class
com/fasterxml/jackson/annotation/JsonAnyGetter.class
retrofit/http/Field.class
retrofit/http/Multipart.class
android/support/v4/app/LoaderManager.class
android/support/multidex/MultiDex.class
javax/annotation/WillNotClose.class
com/facebook/Settings.class
com/facebook/Request.class
com/google/api/client/util/Key.class
com/fasterxml/jackson/annotation/JsonAnySetter.class
com/facebook/widget/LoginButton.class
android/support/annotation/AttrRes.class
android/support/annotation/StyleRes.class
javax/annotation/Nonnull$Checker.class
android/support/v4/app/NotificationCompat.class
javax/annotation/meta/TypeQualifierNickname.class
android/support/v4/app/NoSaveStateFrameLayout.class
com/fasterxml/jackson/annotation/JsonFilter.class
com/facebook/Session$4.class
android/support/annotation/PluralsRes.class
android/support/v4/app/FragmentManager$BackStackEntry.class
com/fasterxml/jackson/annotation/JsonRootName.class
android/support/v4/widget/MaterialProgressDrawable$3.class
com/fasterxml/jackson/databind/annotation/JsonPOJOBuilder$Value.class
android/support/v4/widget/MaterialProgressDrawable$StartCurveInterpolator.class
butterknife/OnEditorAction.class
android/support/annotation/NonNull.class
butterknife/Optional.class
android/support/v4/widget/DrawerLayoutImpl.class
retrofit/http/PATCH.class
com/facebook/Session$StatusCallback.class
com/fasterxml/jackson/databind/jsonFormatVisitors/JsonFormatVisitorWithSerializerProvider.class
com/fasterxml/jackson/annotation/JsonSubTypes.class
com/google/gson/annotations/Since.class
org/sidibe/mqtt/android/lib/MqttPushEventListener.class
butterknife/OnTextChanged.class
com/google/common/annotations/GwtIncompatible.class
com/google/protobuf/AbstractMessageLite.class
butterknife/OnCheckedChanged.class
com/path/android/jobqueue/JobManager.class
android/support/v4/app/Fragment.class
butterknife/internal/ListenerClass.class
com/google/android/gms/location/DetectedActivity.class
android/support/v4/widget/MaterialProgressDrawable$4.class
com/facebook/SessionDefaultAudience.class
android/support/v4/app/ActivityCompat.class
android/support/v4/view/ViewPager$OnPageChangeListener.class
retrofit/http/RestMethod.class
fr/openium/androkit/ConfigApp.class
android/support/v4/widget/MaterialProgressDrawable$EndCurveInterpolator.class
retrofit/http/Streaming.class
com/google/common/annotations/VisibleForTesting.class
com/fasterxml/jackson/annotation/ObjectIdGenerator.class
com/google/api/client/util/NullValue.class
com/google/api/client/util/Beta.class
retrofit/http/POST.class
retrofit/http/PUT.class
javax/annotation/Signed.class
butterknife/OnItemSelected$Callback.class
com/google/gson/annotations/Expose.class
com/path/android/jobqueue/log/CustomLogger.class
javax/annotation/ParametersAreNonnullByDefault.class
android/support/v4/app/FragmentActivity.class
android/support/v4/widget/MaterialProgressDrawable$1.class
com/fasterxml/jackson/databind/annotation/JsonPOJOBuilder.class
com/google/api/client/json/JsonPolymorphicTypeMap$TypeDef.class
android/support/annotation/StringDef.class
com/google/gson/annotations/Until.class
com/fasterxml/jackson/annotation/JsonInclude.class
com/fasterxml/jackson/databind/KeyDeserializer.class
com/facebook/AccessTokenSource.class
android/support/v4/app/ListFragment.class
com/facebook/AppEventsLogger.class
android/support/v4/app/FragmentActivity$NonConfigurationInstances.class
com/fasterxml/jackson/databind/JsonMappingException.class
com/fasterxml/jackson/databind/JsonSerializer$None.class
com/facebook/AuthorizationClient$Result$Code.class
com/fasterxml/jackson/core/JsonProcessingException.class
com/fasterxml/jackson/databind/JsonDeserializer$None.class
retrofit/http/DELETE.class
com/fasterxml/jackson/databind/annotation/JsonDeserialize.class
com/fasterxml/jackson/databind/JsonSerializer.class
com/facebook/Session$TokenRefreshRequestHandler.class
org/chalup/microorm/annotations/Column.class
com/facebook/AuthorizationClient$AuthorizationRequest.class
com/facebook/android/R.class
com/google/api/client/json/JsonString.class
com/fasterxml/jackson/annotation/JacksonAnnotationsInside.class
android/support/annotation/IntDef.class
com/google/android/gms/location/LocationListener.class
android/support/v4/widget/DrawerLayout.class
butterknife/OnLongClick.class
android/support/v4/widget/MaterialProgressDrawable$ProgressDrawableSize.class
com/fasterxml/jackson/annotation/JsonIdentityInfo.class
butterknife/OnPageChange$Callback.class
android/support/v4/app/ActivityCompatHoneycomb.class
com/google/common/annotations/Beta.class
com/google/protobuf/MessageLiteOrBuilder.class
com/fasterxml/jackson/annotation/JsonTypeInfo$As.class
javax/annotation/Nonnegative.class
com/google/gson/annotations/SerializedName.class
com/fasterxml/jackson/annotation/JsonIgnore.class
com/google/api/client/repackaged/com/google/common/annotations/VisibleForTesting.class
com/fasterxml/jackson/databind/util/Converter.class
android/support/v4/app/FragmentManager$OnBackStackChangedListener.class
com/facebook/internal/Utility.class
retrofit/http/FormUrlEncoded.class
javax/annotation/RegEx.class
butterknife/OnClick.class
android/support/v4/app/FragmentActivity$1.class
butterknife/ButterKnife.class
com/facebook/internal/Validate.class
butterknife/OnTouch.class
android/support/v4/app/LoaderManagerImpl.class
com/fasterxml/jackson/annotation/JsonTypeInfo$None.class
com/google/protobuf/InvalidProtocolBufferException.class
android/support/annotation/Nullable.class
android/support/multidex/MultiDex$V14.class
android/support/v4/app/FragmentManagerImpl$4.class
android/support/multidex/MultiDexApplication.class
retrofit/http/EncodedPath.class
com/fasterxml/jackson/databind/jsonschema/JsonSerializableSchema.class
com/facebook/AccessToken.class
com/facebook/model/CreateGraphObject.class
com/facebook/Session$2.class
com/google/common/eventbus/AllowConcurrentEvents.class
android/support/v4/content/LocalBroadcastManager.class
android/support/v4/content/ContextCompat.class
com/facebook/android/R$id.class
android/support/v4/app/FragmentManagerState.class
com/fasterxml/jackson/annotation/JsonIgnoreProperties.class
com/google/android/gms/location/ActivityRecognitionClient.class
com/google/ads/mediation/MediationServerParameters.class
android/support/v4/app/ActionBarDrawerToggle.class
butterknife/OnItemLongClick.class
javax/annotation/meta/Exhaustive.class
com/fasterxml/jackson/annotation/JsonSubTypes$Type.class
javax/annotation/WillClose.class
javax/annotation/Nonnull.class
fr/openium/androkit/utils/ToastUtils.class
retrofit/http/Headers.class
com/facebook/Session$PermissionsPair.class
javax/annotation/WillCloseWhenClosed.class
android/support/v4/app/FragmentManagerImpl$FragmentTag.class
android/support/annotation/IdRes.class
com/facebook/Response.class
android/support/v4/app/FragmentManagerImpl$5.class
retrofit/http/HEAD.class
javax/annotation/CheckForSigned.class
javax/annotation/CheckForNull.class
com/google/ads/mediation/MediationServerParameters$Parameter.class
com/facebook/Session$1.class
butterknife/InjectViews.class
com/fasterxml/jackson/annotation/JsonFormat$Value.class
android/support/annotation/FractionRes.class
com/fasterxml/jackson/annotation/JsonTypeInfo$Id.class
com/fasterxml/jackson/annotation/JsonIgnoreType.class
com/fasterxml/jackson/annotation/ObjectIdGenerator$IdKey.class
com/facebook/FacebookAuthorizationException.class
javax/annotation/ParametersAreNullableByDefault.class
com/facebook/Session.class
javax/annotation/Nonnegative$Checker.class
android/support/annotation/DimenRes.class
android/support/annotation/AnyRes.class
com/fasterxml/jackson/annotation/JacksonAnnotation.class
com/facebook/model/GraphObject.class
javax/annotation/CheckReturnValue.class
com/facebook/FacebookOperationCanceledException.class
android/support/annotation/IntegerRes.class
android/support/multidex/MultiDexExtractor$1.class
com/facebook/UiLifecycleHelper.class
android/support/v4/app/BackStackRecord$TransitionState.class
com/fasterxml/jackson/annotation/JsonView.class
android/support/annotation/MenuRes.class
com/fasterxml/jackson/annotation/JsonRawValue.class
retrofit/http/Query.class
com/google/android/gms/common/annotation/KeepName.class
org/chalup/microorm/MicroOrm.class
com/facebook/FacebookException.class
android/support/multidex/MultiDexExtractor.class
android/support/v4/app/FragmentManagerImpl$2.class
android/support/v4/util/SimpleArrayMap.class
javax/annotation/MatchesPattern$Checker.class
com/fasterxml/jackson/databind/annotation/JsonNaming.class
android/support/multidex/MultiDex$V4.class
android/support/annotation/DrawableRes.class
android/support/v4/app/BackStackState.class
javax/annotation/concurrent/GuardedBy.class
android/support/v4/app/NotificationCompat$Builder.class
com/fasterxml/jackson/databind/jsonFormatVisitors/JsonFormatVisitable.class
com/facebook/Session$TokenRefreshRequest.class
com/facebook/AuthorizationClient$OnCompletedListener.class
com/facebook/LoginActivity.class
org/sidibe/mqtt/android/lib/MqttTopic.class
com/fasterxml/jackson/annotation/JsonPropertyOrder.class
butterknife/OnTextChanged$Callback.class
com/google/android/gms/common/GooglePlayServicesClient.class
javax/annotation/Tainted.class
retrofit/http/FieldMap.class
com/google/android/gms/internal/dw.class
com/fasterxml/jackson/databind/KeyDeserializer$None.class
retrofit/http/QueryMap.class
javax/annotation/Detainted.class
org/fusesource/hawtdispatch/jmx/MBeanInfo.class
android/support/annotation/ArrayRes.class
android/support/v4/app/Fragment$SavedState.class
butterknife/OnItemSelected.class
com/facebook/LoginActivity$1.class
retrofit/http/PartMap.class
android/support/v4/app/FragmentState.class
android/support/v4/app/FragmentActivity$2.class
com/fasterxml/jackson/databind/annotation/JsonSerialize$Inclusion.class
android/support/v4/app/FragmentManagerImpl$1.class
com/fasterxml/jackson/annotation/JsonSetter.class
javax/annotation/OverridingMethodsMustInvokeSuper.class
android/support/multidex/ZipUtil$CentralDirectory.class
com/fasterxml/jackson/databind/jsontype/TypeDeserializer.class
com/facebook/Session$StartActivityDelegate.class
com/facebook/AuthorizationClient.class
retrofit/http/EncodedQuery.class
javax/annotation/Syntax.class
com/facebook/Session$3.class
com/fasterxml/jackson/annotation/JsonFormat$Shape.class
com/facebook/SessionLoginBehavior.class
com/facebook/android/R$layout.class
com/facebook/Session$SerializationProxyV2.class
android/support/v4/util/LogWriter.class
retrofit/http/Body.class
com/google/android/gms/maps/SupportMapFragment.class
javax/annotation/meta/TypeQualifierDefault.class
com/path/android/jobqueue/config/Configuration$Builder.class
com/fasterxml/jackson/annotation/JsonAutoDetect.class
fr/openium/androkit/utils/MemoryUtils.class
com/tyczj/extendedcalendarview/CalendarProvider$DatabaseHelper.class
com/facebook/Request$Callback.class
com/facebook/internal/SessionAuthorizationType.class
android/support/annotation/AnimatorRes.class
javax/annotation/meta/Exclusive.class
android/support/v4/app/SuperNotCalledException.class
android/support/annotation/AnimRes.class
com/facebook/Session$AutoPublishAsyncTask.class
com/fasterxml/jackson/annotation/JsonInclude$Include.class
com/google/protobuf/MessageLite.class
com/google/api/client/json/JsonPolymorphicTypeMap.class
com/google/android/gms/location/ActivityRecognitionResult.class
com/fasterxml/jackson/databind/annotation/JsonSerialize$Typing.class
com/fasterxml/jackson/databind/annotation/JsonValueInstantiator.class
android/support/v4/widget/DrawerLayout$DrawerListener.class
com/google/api/client/util/Value.class
org/chalup/microorm/annotations/Embedded.class
com/fasterxml/jackson/annotation/JsonFormat.class
com/path/android/jobqueue/network/NetworkEventProvider$Listener.class
android/support/annotation/StringRes.class
javax/annotation/concurrent/Immutable.class
com/google/android/gms/common/GooglePlayServicesClient$OnConnectionFailedListener.class
android/support/annotation/StyleableRes.class
android/support/v4/widget/MaterialProgressDrawable$2.class
com/facebook/SharedPreferencesTokenCachingStrategy.class
android/support/v4/app/LoaderManager$LoaderCallbacks.class
android/support/annotation/InterpolatorRes.class
javax/annotation/concurrent/NotThreadSafe.class
android/support/v4/widget/MaterialProgressDrawable$Ring.class
org/sidibe/mqtt/android/lib/MqttAndroidClient.class
com/facebook/Session$5.class
butterknife/internal/ListenerClass$NONE.class
com/google/protobuf/GeneratedMessageLite.class
butterknife/OnFocusChange.class
com/fasterxml/jackson/annotation/JsonIdentityReference.class
com/tyczj/extendedcalendarview/CalendarProvider.class
com/facebook/Session$OpenRequest.class
com/fasterxml/jackson/annotation/JsonPropertyDescription.class
com/google/android/gms/maps/model/LatLng.class
javax/annotation/RegEx$Checker.class
retrofit/http/Path.class
javax/annotation/concurrent/ThreadSafe.class
com/fasterxml/jackson/annotation/JsonTypeName.class
com/facebook/Session$NewPermissionsRequest.class
com/fasterxml/jackson/databind/annotation/JsonSerialize.class
retrofit/http/Part.class
com/fasterxml/jackson/annotation/JsonTypeInfo.class
com/facebook/Session$Builder.class
com/fasterxml/jackson/annotation/ObjectIdResolver.class
android/support/v4/widget/MaterialProgressDrawable.class
com/google/android/gms/common/internal/safeparcel/SafeParcelable.class
com/facebook/model/PropertyName.class
com/fasterxml/jackson/annotation/JsonProperty.class
com/fasterxml/jackson/databind/JsonDeserializer.class
android/support/v4/app/DialogFragment.class
com/facebook/TokenCachingStrategy.class
com/google/api/client/repackaged/com/google/common/annotations/GwtCompatible.class
butterknife/InjectView.class
android/support/v4/app/FragmentTransaction.class
com/facebook/Session$SerializationProxyV1.class
android/support/v4/widget/MaterialProgressDrawable$5.class
android/support/v4/app/FragmentManagerImpl.class
android/support/v4/app/BackStackRecord.class
retrofit/http/Header.class
butterknife/OnPageChange.class
javax/annotation/meta/TypeQualifier.class
com/google/common/eventbus/Subscribe.class
butterknife/internal/ListenerMethod.class
com/facebook/Session$AuthorizationRequest.class
com/facebook/LoginActivity$2.class
com/fasterxml/jackson/databind/annotation/JsonTypeResolver.class
javax/annotation/PropertyKey.class
com/google/protobuf/Internal$EnumLite.class
com/fasterxml/jackson/annotation/JsonBackReference.class
com/fasterxml/jackson/databind/annotation/JsonTypeIdResolver.class
javax/annotation/MatchesPattern.class
com/google/api/client/repackaged/com/google/common/annotations/Beta.class
android/support/multidex/ZipUtil.class
android/support/annotation/BoolRes.class
com/fasterxml/jackson/annotation/JacksonInject.class
android/support/v4/app/FragmentManager.class
org/sidibe/mqtt/android/lib/MqttClientState.class
com/fasterxml/jackson/databind/jsonFormatVisitors/JsonFormatVisitorWrapper.class
You can see that jackson is present so it should be in the first dex, so it should works ! (lots of should).
yr...@google.com <yr...@google.com> #22
I've looked into this problem a little more today: unlike what I've said before, you don't need to have different versions of one class to face it. Having the exact same class defined twice in 2 different dexes is enough.
In the following error:
"0-29 18:26:26.140 31690-31690/com.myapp.app W/dalvikvm﹕ Class resolved by unexpected DEX: Lcom/myapp/model/MyClass;(0x427a7898):0x596d1000 ref [Lcom/j256/ormlite/field/DataType;] Lcom/j256/ormlite/field/DataType;(0x427a7898):0x5910f000
10-29 18:26:26.140 31690-31690/com.myapp.app W/dalvikvm﹕ (Lcom/myapp/model/MyClass; had used a different Lcom/j256/ormlite/field/DataType; during pre-verification)
10-29 18:26:26.140 31690-31690/com.myapp.app W/dalvikvm﹕ Failed processing annotation value
10-29 18:26:26.140 31690-31690/com.myapp.app W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41d28700)"
My guess is that you face it because of com/j256/ormlite/field/DataType defined in the instrumentation apk and in the application apk. I can't be sure without seeing those apks but you can try to do it yourself by running dexdump on each dex of the application apk and on the instrumentation apk.
In the following error:
"0-29 18:26:26.140 31690-31690/
10-29 18:26:26.140 31690-31690/
10-29 18:26:26.140 31690-31690/
10-29 18:26:26.140 31690-31690/
My guess is that you face it because of com/j256/ormlite/field/DataType defined in the instrumentation apk and in the application apk. I can't be sure without seeing those apks but you can try to do it yourself by running dexdump on each dex of the application apk and on the instrumentation apk.
fe...@gmail.com <fe...@gmail.com> #23
If you give me a safe sharing place or I can run it through the business unit I'm happy to share.
yr...@google.com <yr...@google.com> #24
The safest would probably be you running dexdump:
You can find the tool in <sdk-path>/build-tools/<version>/dexdump<.exe?>
You'll have then to run
dexdump <instrumentation.apk> | grep "Class descriptor" | grep com/j256/ormlite/field/DataType
then unzip the application apk in a folder and run in this folder
dexdump classes.dex | grep "Class descriptor" | grep com/j256/ormlite/field/DataType
dexdump classes2.dex | grep "Class descriptor" | grep com/j256/ormlite/field/DataType
dexdump classes3.dex | grep "Class descriptor" | grep com/j256/ormlite/field/DataType
... untill you've run it on all dex files
do the same for com/myapp/model/MyClass and just report here where the 2 classes were found.
If you're running a Windows I think you can replace grep by something like:
findstr /c:"com/j256/ormlite/field/DataType"
You can find the tool in <sdk-path>/build-tools/<version>/dexdump<.exe?>
You'll have then to run
dexdump <instrumentation.apk> | grep "Class descriptor" | grep com/j256/ormlite/field/DataType
then unzip the application apk in a folder and run in this folder
dexdump classes.dex | grep "Class descriptor" | grep com/j256/ormlite/field/DataType
dexdump classes2.dex | grep "Class descriptor" | grep com/j256/ormlite/field/DataType
dexdump classes3.dex | grep "Class descriptor" | grep com/j256/ormlite/field/DataType
... untill you've run it on all dex files
do the same for com/myapp/model/MyClass and just report here where the 2 classes were found.
If you're running a Windows I think you can replace grep by something like:
findstr /c:"com/j256/ormlite/field/DataType"
ni...@gmail.com <ni...@gmail.com> #25
Here's my result :
Background =>
-An application using Retrofit and Jackson for get/post query. I have an object Form that I use to post data to a rest service. Form have the annotation JsonInclude(NonNull) that remove the fields of the class Form that are null.
I have a Test Application that send a fake Form but the problem occurs also in the app alone (not in test environement).
-------
So the two classes are :
com/fasterxml/jackson/annotation/JsonInclude$Include <= annotation
and
com/myapp/Form <= class using annotation
--------
I ran dexdump and I could see that :
-Neither are in the test apk (apk-debug-test-unaligned.apk)
-In the app apk (apk-debug.apk) the classes.dex contains the annotation (com/fasterxml/jackson/annotation/JsonInclude$Include and com/fasterxml/jackson/annotation/JsonInclude) and classes2.dex contains the class (com/myapp/Form)
No duplications.
I hope it helps.
Background =>
-An application using Retrofit and Jackson for get/post query. I have an object Form that I use to post data to a rest service. Form have the annotation JsonInclude(NonNull) that remove the fields of the class Form that are null.
I have a Test Application that send a fake Form but the problem occurs also in the app alone (not in test environement).
-------
So the two classes are :
com/fasterxml/jackson/annotation/JsonInclude$Include <= annotation
and
com/myapp/Form <= class using annotation
--------
I ran dexdump and I could see that :
-Neither are in the test apk (apk-debug-test-unaligned.apk)
-In the app apk (apk-debug.apk) the classes.dex contains the annotation (com/fasterxml/jackson/annotation/JsonInclude$Include and com/fasterxml/jackson/annotation/JsonInclude) and classes2.dex contains the class (com/myapp/Form)
No duplications.
I hope it helps.
ni...@gmail.com <ni...@gmail.com> #26
Ok I have good news :)
I succeeded in reproducing the bug on a test project (in attachment).
Import it in Android studio, and run the class TestBugReplicator (from androidTest), with the Runner "com.testbug.DexInstrumentation".
You'll get the error. (at least I have)
I tried to make the project as little/simple as I could.
Thank you !
BTW : I use OS X Yosemite 10.10 on a Macbook Air.
I succeeded in reproducing the bug on a test project (in attachment).
Import it in Android studio, and run the class TestBugReplicator (from androidTest), with the Runner "com.testbug.DexInstrumentation".
You'll get the error. (at least I have)
I tried to make the project as little/simple as I could.
Thank you !
BTW : I use OS X Yosemite 10.10 on a Macbook Air.
yr...@google.com <yr...@google.com> #27
So if you have no duplicate this does not look like a packaging issue any more. Can you please tell me which device + android version you used to run the test?
Thank you for the reproduction project, I'll try it soon.
Thank you for the reproduction project, I'll try it soon.
ni...@gmail.com <ni...@gmail.com> #28
I used my Galaxy S5 on Android 4.4.2, and an automatically created emulator (using Jenkins) on 4.4.4 too. Same on a Genymotion VM, and a Nexus 4 (4.4.4).
yr...@google.com <yr...@google.com> #29
I was not able to reproduce directly with the given project. Anyway I managed to force it in the attached apk with a simpler test class (source attached too), force the rest of the test I kept the given project just playing with manifest and packaging to force classes partition.
Unfortunately I don't understand what's exactly happening into Dalvik.
Brian, I'm assigning to you hoping you'll be able to explain me why Dalvik is complaining there.
To reproduce, just do:
adb shell am instrument -w -r -e debug false com.testbug/com.testbug.DexInstrumentation
and you'll see in the logcat:
W/dalvikvm( 6671): Class resolved by unexpected DEX: Lcom/testbug/ResponseWeather;(0x4137c748):0x50c55000 ref [Lcom/fasterxml/jackson/annotation/JsonInclude$Include;] Lcom/fasterxml/jackson/annotation/JsonInclude$Include;(0x4137c748):0x4deff000
W/dalvikvm( 6671): (Lcom/testbug/ResponseWeather; had used a different Lcom/fasterxml/jackson/annotation/JsonInclude$Include; during pre-verification)
D/dalvikvm( 6671): threadid=11: still suspended after undo (sc=1 dc=1)
W/dalvikvm( 6671): Failed processing annotation value
I/TestRunner( 6671): failed: testAnnotation(com.testbug.TestBugReplicator)
I/TestRunner( 6671): ----- begin exception -----
I/TestRunner( 6671):
I/TestRunner( 6671): java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation
I/TestRunner( 6671): at java.lang.Class.getDeclaredAnnotations(Native Method)
I/TestRunner( 6671): at java.lang.Class.getAnnotations(Class.java:297)
I/TestRunner( 6671): at com.testbug.TestBugReplicator.testAnnotation(TestBugReplicator.java:14)
I/TestRunner( 6671): at java.lang.reflect.Method.invokeNative(Native Method)
I/TestRunner( 6671): at java.lang.reflect.Method.invoke(Method.java:511)
I/TestRunner( 6671): at junit.framework.TestCase.runTest(TestCase.java:168)
I/TestRunner( 6671): at junit.framework.TestCase.runBare(TestCase.java:134)
I/TestRunner( 6671): at junit.framework.TestResult$1.protect(TestResult.java:115)
I/TestRunner( 6671): at junit.framework.TestResult.runProtected(TestResult.java:133)
I/TestRunner( 6671): at junit.framework.TestResult.run(TestResult.java:118)
I/TestRunner( 6671): at junit.framework.TestCase.run(TestCase.java:124)
I/TestRunner( 6671): at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:190)
I/TestRunner( 6671): at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:175)
I/TestRunner( 6671): at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:555)
I/TestRunner( 6671): at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1584)
I/TestRunner( 6671): ----- end exception -----
I didn't manage to reproduce on the simpler cases I tried.
At first I suspected dvmResolveClass bug or called with the wrong fromUnverifiedConstant value. But it's maybe more complicated than that.
Unfortunately I don't understand what's exactly happening into Dalvik.
Brian, I'm assigning to you hoping you'll be able to explain me why Dalvik is complaining there.
To reproduce, just do:
adb shell am instrument -w -r -e debug false com.testbug/com.testbug.DexInstrumentation
and you'll see in the logcat:
W/dalvikvm( 6671): Class resolved by unexpected DEX: Lcom/testbug/ResponseWeather;(0x4137c748):0x50c55000 ref [Lcom/fasterxml/jackson/annotation/JsonInclude$Include;] Lcom/fasterxml/jackson/annotation/JsonInclude$Include;(0x4137c748):0x4deff000
W/dalvikvm( 6671): (Lcom/testbug/ResponseWeather; had used a different Lcom/fasterxml/jackson/annotation/JsonInclude$Include; during pre-verification)
D/dalvikvm( 6671): threadid=11: still suspended after undo (sc=1 dc=1)
W/dalvikvm( 6671): Failed processing annotation value
I/TestRunner( 6671): failed: testAnnotation(com.testbug.TestBugReplicator)
I/TestRunner( 6671): ----- begin exception -----
I/TestRunner( 6671):
I/TestRunner( 6671): java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation
I/TestRunner( 6671): at java.lang.Class.getDeclaredAnnotations(Native Method)
I/TestRunner( 6671): at java.lang.Class.getAnnotations(Class.java:297)
I/TestRunner( 6671): at com.testbug.TestBugReplicator.testAnnotation(TestBugReplicator.java:14)
I/TestRunner( 6671): at java.lang.reflect.Method.invokeNative(Native Method)
I/TestRunner( 6671): at java.lang.reflect.Method.invoke(Method.java:511)
I/TestRunner( 6671): at junit.framework.TestCase.runTest(TestCase.java:168)
I/TestRunner( 6671): at junit.framework.TestCase.runBare(TestCase.java:134)
I/TestRunner( 6671): at junit.framework.TestResult$1.protect(TestResult.java:115)
I/TestRunner( 6671): at junit.framework.TestResult.runProtected(TestResult.java:133)
I/TestRunner( 6671): at junit.framework.TestResult.run(TestResult.java:118)
I/TestRunner( 6671): at junit.framework.TestCase.run(TestCase.java:124)
I/TestRunner( 6671): at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:190)
I/TestRunner( 6671): at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:175)
I/TestRunner( 6671): at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:555)
I/TestRunner( 6671): at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1584)
I/TestRunner( 6671): ----- end exception -----
I didn't manage to reproduce on the simpler cases I tried.
At first I suspected dvmResolveClass bug or called with the wrong fromUnverifiedConstant value. But it's maybe more complicated than that.
ka...@gmail.com <ka...@gmail.com> #30
Sorry for my english)
I faced the same exception. Here is log:
W/dalvikvm﹕ Class resolved by unexpected DEX: Lcom/myproject/core/data/item/ItemPrice;(0x427b9f70):0x58002000 ref [Lcom/j256/ormlite/field/DataType;] Lcom/j256/ormlite/field/DataType;(0x427b9f70):0x596cf000
11-10 16:30:20.764 25799-26287/com.myproject W/dalvikvm﹕ (Lcom/myproject/core/data/item/ItemPrice; had used a different Lcom/j256/ormlite/field/DataType; during pre-verification)
11-10 16:30:20.764 25799-26287/com.myproject W/dalvikvm﹕ Failed processing annotation value
11-10 16:30:20.764 25799-26287/com.myproject D/dalvikvm﹕ Failed creating an annotation
11-10 16:30:20.764 25799-26287/com.myproject W/dalvikvm﹕ threadid=15: thread exiting with uncaught exception (group=0x41d5c700)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at java.lang.reflect.Field.getDeclaredAnnotations(Native Method)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at java.lang.reflect.Field.getDeclaredAnnotations(Field.java:204)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.introspect.AnnotatedClass._constructField(AnnotatedClass.java:808)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.introspect.AnnotatedClass._findFields(AnnotatedClass.java:688)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.introspect.AnnotatedClass.resolveFields(AnnotatedClass.java:462)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.introspect.AnnotatedClass.fields(AnnotatedClass.java:274)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector._addFields(POJOPropertiesCollector.java:363)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.collect(POJOPropertiesCollector.java:232)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.introspect.BasicClassIntrospector.collectProperties(BasicClassIntrospector.java:142)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.introspect.BasicClassIntrospector.forDeserialization(BasicClassIntrospector.java:81)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.introspect.BasicClassIntrospector.forDeserialization(BasicClassIntrospector.java:11)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.DeserializationConfig.introspect(DeserializationConfig.java:507)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:329)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:267)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:247)
11-10 16:30:20.784 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:146)
11-10 16:30:20.784 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.DeserializationContext.findContextualValueDeserializer(DeserializationContext.java:305)
11-10 16:30:20.784 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.deser.std.StdDeserializer.findDeserializer(StdDeserializer.java:634)
11-10 16:30:20.784 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.resolve(BeanDeserializerBase.java:438)
11-10 16:30:20.784 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:298)
11-10 16:30:20.784 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:247)
11-10 16:30:20.784 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:146)
11-10 16:30:20.784 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:322)
11-10 16:30:20.789 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.ObjectReader._prefetchRootDeserializer(ObjectReader.java:1351)
11-10 16:30:20.789 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.ObjectReader.<init>(ObjectReader.java:186)
11-10 16:30:20.789 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.ObjectMapper.reader(ObjectMapper.java:2445)
11-10 16:30:20.789 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.ObjectMapper.reader(ObjectMapper.java:2455)
11-10 16:30:20.789 25799-26287/com.myproject W/System.err﹕ at com.myproject.core.downloading.downloadOperations.ItemListDownloadOperation.parseItemsArray(ItemListDownloadOperation.java:344)
11-10 16:30:20.794 25799-26287/com.myproject W/System.err﹕ at com.myproject.core.downloading.downloadOperations.ItemListDownloadOperation.parseResult(ItemListDownloadOperation.java:319)
11-10 16:30:20.794 25799-26287/com.myproject W/System.err﹕ at com.myproject.core.downloading.downloadOperations.ItemListDownloadOperation.downloadBinaryFile(ItemListDownloadOperation.java:231)
11-10 16:30:20.794 25799-26287/com.myproject W/System.err﹕ at com.myproject.core.downloading.downloadOperations.BaseDownloadOperation.simpleHTTPconnectionProcessing(BaseDownloadOperation.java:243)
11-10 16:30:20.794 25799-26287/com.myproject W/System.err﹕ at com.myproject.core.downloading.downloadOperations.BaseDownloadOperation.access$000(BaseDownloadOperation.java:38)
11-10 16:30:20.794 25799-26287/com.myproject W/System.err﹕ at com.myproject.core.downloading.downloadOperations.BaseDownloadOperation$1.run(BaseDownloadOperation.java:90)
11-10 16:30:20.829 25799-26287/com.myproject E/AndroidRuntime﹕ FATAL EXCEPTION: Thread-5068
java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation
at java.lang.reflect.Field.getDeclaredAnnotations(Native Method)
at java.lang.reflect.Field.getDeclaredAnnotations(Field.java:204)
at com.fasterxml.jackson.databind.introspect.AnnotatedClass._constructField(AnnotatedClass.java:808)
at com.fasterxml.jackson.databind.introspect.AnnotatedClass._findFields(AnnotatedClass.java:688)
at com.fasterxml.jackson.databind.introspect.AnnotatedClass.resolveFields(AnnotatedClass.java:462)
at com.fasterxml.jackson.databind.introspect.AnnotatedClass.fields(AnnotatedClass.java:274)
at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector._addFields(POJOPropertiesCollector.java:363)
at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.collect(POJOPropertiesCollector.java:232)
at com.fasterxml.jackson.databind.introspect.BasicClassIntrospector.collectProperties(BasicClassIntrospector.java:142)
at com.fasterxml.jackson.databind.introspect.BasicClassIntrospector.forDeserialization(BasicClassIntrospector.java:81)
at com.fasterxml.jackson.databind.introspect.BasicClassIntrospector.forDeserialization(BasicClassIntrospector.java:11)
at com.fasterxml.jackson.databind.DeserializationConfig.introspect(DeserializationConfig.java:507)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:329)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:267)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:247)
at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:146)
at com.fasterxml.jackson.databind.DeserializationContext.findContextualValueDeserializer(DeserializationContext.java:305)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer.findDeserializer(StdDeserializer.java:634)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.resolve(BeanDeserializerBase.java:438)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:298)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:247)
at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:146)
at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:322)
at com.fasterxml.jackson.databind.ObjectReader._prefetchRootDeserializer(ObjectReader.java:1351)
at com.fasterxml.jackson.databind.ObjectReader.<init>(ObjectReader.java:186)
at com.fasterxml.jackson.databind.ObjectMapper.reader(ObjectMapper.java:2445)
at com.fasterxml.jackson.databind.ObjectMapper.reader(ObjectMapper.java:2455)
at com.myproject.core.downloading.downloadOperations.ItemListDownloadOperation.parseItemsArray(ItemListDownloadOperation.java:344)
at com.myproject.core.downloading.downloadOperations.ItemListDownloadOperation.parseResult(ItemListDownloadOperation.java:319)
at com.myproject.core.downloading.downloadOperations.ItemListDownloadOperation.downloadBinaryFile(ItemListDownloadOperation.java:231)
at com.myproject.core.downloading.downloadOperations.BaseDownloadOperation.simpleHTTPconnectionProcessing(BaseDownloadOperation.java:243)
at com.myproject.core.downloading.downloadOperations.BaseDownloadOperation.access$000(BaseDownloadOperation.java:38)
at com.myproject.core.downloading.downloadOperations.BaseDownloadOperation$1.run(BaseDownloadOperation.java:90)
I have added many libraries in my project and use multiDexEnabled = true in gradle. Also I added play services:
compile 'com.google.android.gms:play-services:6.1.71'
In this configuration application crashes every time it try to get annotations of some class field. It crashes when ormlite library, Jackson or my code try to get field annotations. Quick and ugly solution in this situation - change the version of play services:
compile 'com.google.android.gms:play-services:4.4.52'
With this version application run without this sort of crash. Could anyone suggest smth better??
I faced the same exception. Here is log:
W/dalvikvm﹕ Class resolved by unexpected DEX: Lcom/myproject/core/data/item/ItemPrice;(0x427b9f70):0x58002000 ref [Lcom/j256/ormlite/field/DataType;] Lcom/j256/ormlite/field/DataType;(0x427b9f70):0x596cf000
11-10 16:30:20.764 25799-26287/com.myproject W/dalvikvm﹕ (Lcom/myproject/core/data/item/ItemPrice; had used a different Lcom/j256/ormlite/field/DataType; during pre-verification)
11-10 16:30:20.764 25799-26287/com.myproject W/dalvikvm﹕ Failed processing annotation value
11-10 16:30:20.764 25799-26287/com.myproject D/dalvikvm﹕ Failed creating an annotation
11-10 16:30:20.764 25799-26287/com.myproject W/dalvikvm﹕ threadid=15: thread exiting with uncaught exception (group=0x41d5c700)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at java.lang.reflect.Field.getDeclaredAnnotations(Native Method)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at java.lang.reflect.Field.getDeclaredAnnotations(Field.java:204)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.introspect.AnnotatedClass._constructField(AnnotatedClass.java:808)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.introspect.AnnotatedClass._findFields(AnnotatedClass.java:688)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.introspect.AnnotatedClass.resolveFields(AnnotatedClass.java:462)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.introspect.AnnotatedClass.fields(AnnotatedClass.java:274)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector._addFields(POJOPropertiesCollector.java:363)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.collect(POJOPropertiesCollector.java:232)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.introspect.BasicClassIntrospector.collectProperties(BasicClassIntrospector.java:142)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.introspect.BasicClassIntrospector.forDeserialization(BasicClassIntrospector.java:81)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.introspect.BasicClassIntrospector.forDeserialization(BasicClassIntrospector.java:11)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.DeserializationConfig.introspect(DeserializationConfig.java:507)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:329)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:267)
11-10 16:30:20.779 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:247)
11-10 16:30:20.784 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:146)
11-10 16:30:20.784 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.DeserializationContext.findContextualValueDeserializer(DeserializationContext.java:305)
11-10 16:30:20.784 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.deser.std.StdDeserializer.findDeserializer(StdDeserializer.java:634)
11-10 16:30:20.784 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.resolve(BeanDeserializerBase.java:438)
11-10 16:30:20.784 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:298)
11-10 16:30:20.784 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:247)
11-10 16:30:20.784 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:146)
11-10 16:30:20.784 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:322)
11-10 16:30:20.789 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.ObjectReader._prefetchRootDeserializer(ObjectReader.java:1351)
11-10 16:30:20.789 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.ObjectReader.<init>(ObjectReader.java:186)
11-10 16:30:20.789 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.ObjectMapper.reader(ObjectMapper.java:2445)
11-10 16:30:20.789 25799-26287/com.myproject W/System.err﹕ at com.fasterxml.jackson.databind.ObjectMapper.reader(ObjectMapper.java:2455)
11-10 16:30:20.789 25799-26287/com.myproject W/System.err﹕ at com.myproject.core.downloading.downloadOperations.ItemListDownloadOperation.parseItemsArray(ItemListDownloadOperation.java:344)
11-10 16:30:20.794 25799-26287/com.myproject W/System.err﹕ at com.myproject.core.downloading.downloadOperations.ItemListDownloadOperation.parseResult(ItemListDownloadOperation.java:319)
11-10 16:30:20.794 25799-26287/com.myproject W/System.err﹕ at com.myproject.core.downloading.downloadOperations.ItemListDownloadOperation.downloadBinaryFile(ItemListDownloadOperation.java:231)
11-10 16:30:20.794 25799-26287/com.myproject W/System.err﹕ at com.myproject.core.downloading.downloadOperations.BaseDownloadOperation.simpleHTTPconnectionProcessing(BaseDownloadOperation.java:243)
11-10 16:30:20.794 25799-26287/com.myproject W/System.err﹕ at com.myproject.core.downloading.downloadOperations.BaseDownloadOperation.access$000(BaseDownloadOperation.java:38)
11-10 16:30:20.794 25799-26287/com.myproject W/System.err﹕ at com.myproject.core.downloading.downloadOperations.BaseDownloadOperation$1.run(BaseDownloadOperation.java:90)
11-10 16:30:20.829 25799-26287/com.myproject E/AndroidRuntime﹕ FATAL EXCEPTION: Thread-5068
java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation
at java.lang.reflect.Field.getDeclaredAnnotations(Native Method)
at java.lang.reflect.Field.getDeclaredAnnotations(Field.java:204)
at com.fasterxml.jackson.databind.introspect.AnnotatedClass._constructField(AnnotatedClass.java:808)
at com.fasterxml.jackson.databind.introspect.AnnotatedClass._findFields(AnnotatedClass.java:688)
at com.fasterxml.jackson.databind.introspect.AnnotatedClass.resolveFields(AnnotatedClass.java:462)
at com.fasterxml.jackson.databind.introspect.AnnotatedClass.fields(AnnotatedClass.java:274)
at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector._addFields(POJOPropertiesCollector.java:363)
at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.collect(POJOPropertiesCollector.java:232)
at com.fasterxml.jackson.databind.introspect.BasicClassIntrospector.collectProperties(BasicClassIntrospector.java:142)
at com.fasterxml.jackson.databind.introspect.BasicClassIntrospector.forDeserialization(BasicClassIntrospector.java:81)
at com.fasterxml.jackson.databind.introspect.BasicClassIntrospector.forDeserialization(BasicClassIntrospector.java:11)
at com.fasterxml.jackson.databind.DeserializationConfig.introspect(DeserializationConfig.java:507)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:329)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:267)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:247)
at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:146)
at com.fasterxml.jackson.databind.DeserializationContext.findContextualValueDeserializer(DeserializationContext.java:305)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer.findDeserializer(StdDeserializer.java:634)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.resolve(BeanDeserializerBase.java:438)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:298)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:247)
at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:146)
at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:322)
at com.fasterxml.jackson.databind.ObjectReader._prefetchRootDeserializer(ObjectReader.java:1351)
at com.fasterxml.jackson.databind.ObjectReader.<init>(ObjectReader.java:186)
at com.fasterxml.jackson.databind.ObjectMapper.reader(ObjectMapper.java:2445)
at com.fasterxml.jackson.databind.ObjectMapper.reader(ObjectMapper.java:2455)
at com.myproject.core.downloading.downloadOperations.ItemListDownloadOperation.parseItemsArray(ItemListDownloadOperation.java:344)
at com.myproject.core.downloading.downloadOperations.ItemListDownloadOperation.parseResult(ItemListDownloadOperation.java:319)
at com.myproject.core.downloading.downloadOperations.ItemListDownloadOperation.downloadBinaryFile(ItemListDownloadOperation.java:231)
at com.myproject.core.downloading.downloadOperations.BaseDownloadOperation.simpleHTTPconnectionProcessing(BaseDownloadOperation.java:243)
at com.myproject.core.downloading.downloadOperations.BaseDownloadOperation.access$000(BaseDownloadOperation.java:38)
at com.myproject.core.downloading.downloadOperations.BaseDownloadOperation$1.run(BaseDownloadOperation.java:90)
I have added many libraries in my project and use multiDexEnabled = true in gradle. Also I added play services:
compile 'com.google.android.gms:play-services:6.1.71'
In this configuration application crashes every time it try to get annotations of some class field. It crashes when ormlite library, Jackson or my code try to get field annotations. Quick and ugly solution in this situation - change the version of play services:
compile 'com.google.android.gms:play-services:4.4.52'
With this version application run without this sort of crash. Could anyone suggest smth better??
sh...@google.com <sh...@google.com> #31
Attaching with gdb on a KK device (Nexus 4) when the exception is about to be thrown, we get the following stack:
Breakpoint 1, dvmThrowIllegalAccessError (msg=0x416237ad "Class ref in pre-verified class resolved to unexpected implementation") at dalvik/vm/Exception.cpp:1319
1319 void dvmThrowIllegalAccessError(const char* msg) {
(gdb) bt
#0 dvmThrowIllegalAccessError (msg=0x416237ad "Class ref in pre-verified class resolved to unexpected implementation") at dalvik/vm/Exception.cpp:1319
#1 0x415f15d8 in dvmResolveClass (referrer=0x41f461a0, classIdx=1065, fromUnverifiedConstant=fromUnverifiedConstant@entry=false) at dalvik/vm/oo/Resolve.cpp:138
#2 0x415f1672 in dvmResolveStaticField (referrer=<optimized out>, sfieldIdx=2127) at dalvik/vm/oo/Resolve.cpp:463
#3 0x415f217e in processAnnotationValue (clazz=clazz@entry=0x41f461a0, pPtr=pPtr@entry=0x75dbd9e4, pValue=pValue@entry=0x75dbd9f8, resultStyle=resultStyle@entry=kAllObjects) at dalvik/vm/reflect/Annotation.cpp:463
#4 0x415f234e in createAnnotationMember (pPtr=0x75dbd9e4, annoClass=<optimized out>, clazz=0x41f461a0) at dalvik/vm/reflect/Annotation.cpp:662
#5 processEncodedAnnotation (clazz=clazz@entry=0x41f461a0, pPtr=pPtr@entry=0x75dbda34) at dalvik/vm/reflect/Annotation.cpp:790
#6 0x415f267e in processAnnotationSet (clazz=0x41f461a0, pAnnoSet=0x752f4530, visibility=1) at dalvik/vm/reflect/Annotation.cpp:865
#7 0x415ebf2a in Dalvik_java_lang_Class_getDeclaredAnnotations (args=<optimized out>, pResult=0x75021a00) at dalvik/vm/native/java_lang_Class.cpp:711
#8 0x415d4aca in dvmResolveNativeMethod (args=0x75b92d70, pResult=0x75021a00, method=0x6d4f61e8, self=0x750219f0) at dalvik/vm/Native.cpp:106
#9 0x415ac028 in dalvik_mterp () at dalvik/vm/mterp/out/InterpAsm-armv7-a-neon.S:16267
#10 0x750219f0 in ?? ()
#11 0x750219f0 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
Breakpoint 1, dvmThrowIllegalAccessError (msg=0x416237ad "Class ref in pre-verified class resolved to unexpected implementation") at dalvik/vm/Exception.cpp:1319
1319 void dvmThrowIllegalAccessError(const char* msg) {
(gdb) bt
#0 dvmThrowIllegalAccessError (msg=0x416237ad "Class ref in pre-verified class resolved to unexpected implementation") at dalvik/vm/Exception.cpp:1319
#1 0x415f15d8 in dvmResolveClass (referrer=0x41f461a0, classIdx=1065, fromUnverifiedConstant=fromUnverifiedConstant@entry=false) at dalvik/vm/oo/Resolve.cpp:138
#2 0x415f1672 in dvmResolveStaticField (referrer=<optimized out>, sfieldIdx=2127) at dalvik/vm/oo/Resolve.cpp:463
#3 0x415f217e in processAnnotationValue (clazz=clazz@entry=0x41f461a0, pPtr=pPtr@entry=0x75dbd9e4, pValue=pValue@entry=0x75dbd9f8, resultStyle=resultStyle@entry=kAllObjects) at dalvik/vm/reflect/Annotation.cpp:463
#4 0x415f234e in createAnnotationMember (pPtr=0x75dbd9e4, annoClass=<optimized out>, clazz=0x41f461a0) at dalvik/vm/reflect/Annotation.cpp:662
#5 processEncodedAnnotation (clazz=clazz@entry=0x41f461a0, pPtr=pPtr@entry=0x75dbda34) at dalvik/vm/reflect/Annotation.cpp:790
#6 0x415f267e in processAnnotationSet (clazz=0x41f461a0, pAnnoSet=0x752f4530, visibility=1) at dalvik/vm/reflect/Annotation.cpp:865
#7 0x415ebf2a in Dalvik_java_lang_Class_getDeclaredAnnotations (args=<optimized out>, pResult=0x75021a00) at dalvik/vm/native/java_lang_Class.cpp:711
#8 0x415d4aca in dvmResolveNativeMethod (args=0x75b92d70, pResult=0x75021a00, method=0x6d4f61e8, self=0x750219f0) at dalvik/vm/Native.cpp:106
#9 0x415ac028 in dalvik_mterp () at dalvik/vm/mterp/out/InterpAsm-armv7-a-neon.S:16267
#10 0x750219f0 in ?? ()
#11 0x750219f0 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
yr...@google.com <yr...@google.com> #32
Thanks Seb.
The stack points that processAnnotationValue is calling dvmResolveStaticField which calls "dvmResolveClass(..., ..., false)" the "false" argument in the context of an annotation value is wrong because dexopt does not treat annotation values.
This means:
1) You don't need multidex to face the problem.
2) To not face the problem we must ensure that enum referenced by runtime visible annotations are in the bootclasspath, or are in the same dex as the annotated classes.
The stack points that processAnnotationValue is calling dvmResolveStaticField which calls "dvmResolveClass(..., ..., false)" the "false" argument in the context of an annotation value is wrong because dexopt does not treat annotation values.
This means:
1) You don't need multidex to face the problem.
2) To not face the problem we must ensure that enum referenced by runtime visible annotations are in the bootclasspath, or are in the same dex as the annotated classes.
ka...@gmail.com <ka...@gmail.com> #33
How to ensure that visible annotations are in the same dex as the annotated classes?
bd...@google.com <bd...@google.com> #34
So it sounds like the partitioning needs to take annotations into account?
fe...@gmail.com <fe...@gmail.com> #35
That's what the dexMainClasses script was for, right? Our problems diminished when we used it to generate the classlist for the first dex, but the script was far from perfect and forced bad maintenance practices.
yr...@google.com <yr...@google.com> #36
#36 The dex of the annotation definition doesn't matter, it's the dex defining the enum that matters.
The current rule is putting all annotations + their direct references into the main dex so the fix is to keep all the class annotated by this kind of annotation in the main dex. If you really need something before a fix to the rule is delivered, you'll have to handle that manually. I don't think the gradle rule already allows to specify manual contribution to the main dex classes list, so one solution would be to build the dex files directly from dx command line and add manually the annotated classes to the list. Another workaround solution would be to add direct references (for example field with declared type of the annotated class :-( ) in an Application, Activity, Service...
#37 #38 Yes, I'm working on fixing that.
The current rule is putting all annotations + their direct references into the main dex so the fix is to keep all the class annotated by this kind of annotation in the main dex. If you really need something before a fix to the rule is delivered, you'll have to handle that manually. I don't think the gradle rule already allows to specify manual contribution to the main dex classes list, so one solution would be to build the dex files directly from dx command line and add manually the annotated classes to the list. Another workaround solution would be to add direct references (for example field with declared type of the annotated class :-( ) in an Application, Activity, Service...
#37 #38 Yes, I'm working on fixing that.
xa...@android.com <xa...@android.com> #38
@40, multiDexEnabled should do the same as manually calling mainDexClasses[.bat] and sending the output to dx.
We can actually do more optimization in Gradle, so it's better to let gradle do this.
There seems to be some issues though obviously. I'm interested if we can figure out what difference you see in the main class list using Gradle or the manual script.
We can actually do more optimization in Gradle, so it's better to let gradle do this.
There seems to be some issues though obviously. I'm interested if we can figure out what difference you see in the main class list using Gradle or the manual script.
fe...@gmail.com <fe...@gmail.com> #39
At least you can manually add failing classes to the script one by one, no other difference.
fe...@gmail.com <fe...@gmail.com> #40
That helped solving other problems like anon classes that were part of the Application class and were not being added consistently.
ni...@gmail.com <ni...@gmail.com> #41
[Comment deleted]
ni...@gmail.com <ni...@gmail.com> #42
[Comment deleted]
yr...@google.com <yr...@google.com> #43
#45 This does not look to be the same kind of problem, could you please open a new bug for this? Please add in which dex the missing class can be found. You can find it by unzipping your apk to a folder and then run in the folder:
for f in `ls classes*.dex`;
do
dexdump $f | sed -e s/^/$f:/ | grep " Class descriptor : " | grep "Lretrofit/Endpoints;"
done
Thank you.
for f in `ls classes*.dex`;
do
dexdump $f | sed -e s/^/$f:/ | grep " Class descriptor : " | grep "Lretrofit/Endpoints;"
done
Thank you.
yr...@google.com <yr...@google.com> #45
fe...@gmail.com <fe...@gmail.com> #46
Awesome! Thank you for the fix. Updating.
ni...@gmail.com <ni...@gmail.com> #47
I tried it a few minutes ago and it seems to work.
Great job !
Great job !
Description
Since this change was made and we've starting adding new libraries like appcompat_v7, we've seen on and off errors when trying to access java.lang.reflect.Field.getDeclaredAnnotations with other libraries like orm-lite or jackson.
java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation
at java.lang.reflect.Field.getAnnotation(Native Method)
at java.lang.reflect.Field.getAnnotation(Field.java:209)
at com.j256.ormlite.field.DatabaseFieldConfig.fromField(DatabaseFieldConfig.java:512)
at com.j256.ormlite.android.DatabaseTableConfigUtil.configFromField(DatabaseTableConfigUtil.java:236)
at com.j256.ormlite.android.DatabaseTableConfigUtil.fromClass(DatabaseTableConfigUtil.java:50)
at com.j256.ormlite.db.SqliteAndroidDatabaseType.extractDatabaseTableConfig(SqliteAndroidDatabaseType.java:76)
at com.j256.ormlite.dao.DaoManager.createDao(DaoManager.java:67)
at com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper.getDao(OrmLiteSqliteOpenHelper.java:279)
Build tools 0.13.0, Android Studio 0.8.1, compile and target 21, buildToolsVersion '21.0.1'