我是改造的新手,我在我的项目中使用了改造,到目前为止,对于我所需设备的所有版本都运行良好。但是在将库模块添加到我的项目后,它仅在更高版本(如 22 v)上运行并提示以下错误:
Could not find class 'retrofit.Utils$SynchronousExecutor', referenced
from method retrofit.RestAdapter$Builder.setExecutors
java.lang.NoClassDefFoundError: retrofit.RestAdapter$LogLevel
Run Code Online (Sandbox Code Playgroud)
在较低版本上,如 14 v 。
我的应用程序gradle是:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
applicationId "com.risingkashmir"
minSdkVersion 14
targetSdkVersion 22
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
// compile fileTree(dir: 'libs', include: ['*.jar'])
// compile 'com.android.support:support-v4:22.0.0'
//noinspection GradleDependency
compile 'com.android.support:recyclerview-v7:22.2.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'com.nineoldandroids:library:2.4.0'
compile project(':library')
compile files('libs/universal-image-loader-1.9.4.jar')
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.google.android.gms:play-services:8.4.0'
compile project(':librarymenu')
}
Run Code Online (Sandbox Code Playgroud)
我的图书馆 Gradle 是:
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
minSdkVersion 14
targetSdkVersion 22
versionCode 1
versionName "v0.1L"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
// compile 'com.balysv:material-ripple:1.+'
// compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.android.support:design:23.2.0'
compile 'com.android.support:support-v4:23.2.0'
compile 'com.android.support:appcompat-v7:23.2.0'
}
Run Code Online (Sandbox Code Playgroud)