NoClassDefFoundError using Jackson 2.2.x on Android with Gradle

后端 未结 2 575
天命终不由人
天命终不由人 2020-12-19 02:19

For my Android project I set up Gradle with Jackson 2.2.x as follows:

// build.gradle
buildscript {
    repositories {
        mavenCentral()
    }
         


        
2条回答
  •  鱼传尺愫
    2020-12-19 02:33

    Gradle and Android don't always place nicely with dependencies(yet). Running

     gradle clean
    

    seems to fix most problems for me.

    Note: If that didn't work, you can run

    dexdump classes.dex | grep 'Class descriptor'
    

    on the classes.dex file in the APK. That will check to see if the class is included in the classes.dex file. (Sometimes it's useful if you want to double check whats going on).

提交回复
热议问题