Fixed
Status Update
Comments
ar...@google.com <ar...@google.com> #2
Android Studio is actually 0.8.11
ar...@google.com <ar...@google.com> #3
The stack trace seems to say you are running with several definitions of one annotation. This seems to often be caused by including 2 different versions of the same library in an instrumentation apk and its tested application apk. Could you please check it's not your case here? If it's your case, you should fix that.
Looking at dx about this report, it seems that DX may fail to check a duplicate class definition when running multidex, I've recorded a bug about this point.
That said, it does not look like we could be in the DX lack of check case here, because mainDexClasses is keeping all the annotations in the main dex (and dx seems to correctly identify the duplicate definition when the 2 definitions are added to the same dex). (Can you confirm that you're using mainDexClasses to create your main dex list?)
I'm assigning back to you xav in case you want to add some check in the SDK.
Looking at dx about this report, it seems that DX may fail to check a duplicate class definition when running multidex, I've recorded a bug about this point.
That said, it does not look like we could be in the DX lack of check case here, because mainDexClasses is keeping all the annotations in the main dex (and dx seems to correctly identify the duplicate definition when the 2 definitions are added to the same dex). (Can you confirm that you're using mainDexClasses to create your main dex list?)
I'm assigning back to you xav in case you want to add some check in the SDK.
ar...@google.com <ar...@google.com> #4
The error is not reproducible in other machines, so it's probably a local config problem. We'll try the mainDexClasses approach.
pa...@gmail.com <pa...@gmail.com> #5
[Comment deleted]
la...@gmail.com <la...@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.
dw...@sharpmind.de <dw...@sharpmind.de> #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...@google.com <br...@google.com>
om...@google.com <om...@google.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?
me...@gmail.com <me...@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
og...@google.com <og...@google.com>
li...@gmail.com <li...@gmail.com> #10
[Comment deleted]
ma...@ecutek.com <ma...@ecutek.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.
[Deleted User] <[Deleted User]> #12
[Comment deleted]
na...@gmail.com <na...@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
og...@google.com <og...@google.com>
ak...@google.com <ak...@google.com>
ju...@gmail.com <ju...@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.
sa...@gmail.com <sa...@gmail.com> #16
Same issue as well after updating to the new multiDex system, Nitro have you had any luck yet?
ya...@gmail.com <ya...@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
aj...@gmail.com <aj...@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.
si...@gmail.com <si...@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.
wg...@gmail.com <wg...@gmail.com> #20
[Comment deleted]
sc...@gmail.com <sc...@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).
dw...@sharpmind.de <dw...@sharpmind.de> #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.
p....@gmail.com <p....@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.
[Deleted User] <[Deleted User]> #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"
ya...@codingcrafts.io <ya...@codingcrafts.io> #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.
ma...@gmail.com <ma...@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.
ra...@gmail.com <ra...@gmail.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.
an...@gmail.com <an...@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).
on...@gmail.com <on...@gmail.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.
dw...@sharpmind.de <dw...@sharpmind.de> #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??
nn...@gmail.com <nn...@gmail.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)
st...@gmail.com <st...@gmail.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.
lo...@google.com <lo...@google.com> #33
How to ensure that visible annotations are in the same dex as the annotated classes?
xd...@gmail.com <xd...@gmail.com> #34
So it sounds like the partitioning needs to take annotations into account?
Description
If an app is installed from the Play store or via Play store update, or downloaded from browser and the user launches the app directly from the installer (ie: when the installer completes it offers the user the option to launch the app now) it is launched in such a way that the OS gets confused.
If, after the app is launched, the user presses the HOME key to return to the home screen and then tries to return to the app by selecting it from the list of applications (or by putting a shortcut on the home screen and then selecting the shortcut), the OS launches the root activity of the app AGAIN, bringing the existing task to the foreground and placing ANOTHER instance of the root activity on top of the existing activity stack.
This is fundamentally broken as this is very different from the behaviour if the user initially launched the app by selecting it from the list of available applications. In that case, when the user presses the HOME key and then tries to return to the application by selecting it from the list of applications (or selecting the shortcut),
the OS simply brings the existing task to the foreground. It does NOT create another instance of the root activity.
This behaviour is extremely difficult to debug and has certainly caused countless hours of head-scratching by developers.
This issue was originally reported 8 years ago (by someone else) as
It isn't a problem only for developers. It occurs on real devices running all versions of Android OS. We've seen this on all versions of Android up to and including 7.
We've created a sample application that can be used to demonstrate the behaviour. Here is an explanation and step-by-step instructions:
ActivityA is the starting activity. It has a button that will launch
ActivityB and it finishes itself after that launch. This means that if you press the BACK key in ActivityB the home screen will be displayed.
Both activities have a TextView that indicates whether the app is before or after the update of the application.
There are 2 APKs provided: "before.apk" and "after.apk". They both contain exactly the same code, only the version number in the manifest has been changed (this is so we can simulate the "update" from the market).
In order to explain it more clearly, read the following step-by-step instructions. The source code of the sample app, the apk files, the logs and some screenshots can be found in the attached zip file.
00. Preconditions:
Have the "before.apk" installed on your device and the "after.apk" present somewhere on the device's file system (SD-card or whatever).
01. Start the app by using the respective icon.
02. ActivityA is displayed. Press button "launch AcitivtyB" in ActivityA.
03. ActivityB is displayed. Press HOME key. Open any file manager application and click on the "after.apk" and install it. This means
that "before.apk" will be replaced with "after.apk".
04. Once the installation is complete, press the "Open" button in the installer (see 03.png).
05. ActivityA is displayed. Press button "launch ActivityB".
06. ActivityB is displayed. Press HOME key in ActivityB.
07. Launch the application again by using the respective icon.
08. ActivityA is displayed. Notice that in the dumpsys (07.txt) you can see that both ActivityA and ActivityB are active but this shouldn't be the case because ActivityB should only be active after ActivityA has been finished.
Press button "launch ActivityB".
09. ActivityB is displayed. Notice that in the dumpsys (08.txt) you can see that two instances of ActivityB are active.
Press BACK key in ActivityB.
09. ActivityB is displayed. Notice that in the dumpsys (09.txt) you can see that one instance of ActivityB is active.
Press BACK key in ActivityB.
10. The home screen is displayed. Notice that in the dumpsys (10.txt)
you can see that no instance of ActivityA or ActivityB is active anymore.