0
我在我的項目中使用了https://github.com/JakeWharton/ViewPagerIndicator。 並且在具有API < = 19的設備上獲得java.lang.NoClassDefFoundError:
如果API> 19 - 一切正常。 我的build.gradle:
apply plugin: 'com.android.application'
apply plugin: 'android-command'
apply plugin: "jacoco"
apply plugin: 'newrelic'
jacoco {
toolVersion = "0.7.1.201405082137"
}
def coverageSourceDirs = [
'../app/src/main/java'
]
task jacocoTestReport(type: JacocoReport, dependsOn: "connectedAndroidTest") {
group = "Reporting"
description = "Generate Jacoco coverage reports"
classDirectories = fileTree(
dir: '../app/build/intermediates/classes/debug',
excludes: ['**/R.class',
'**/R$*.class',
'**/*$ViewInjector*.*',
'**/BuildConfig.*',
'**/Manifest*.*']
)
additionalSourceDirs = files(coverageSourceDirs)
sourceDirectories = files(coverageSourceDirs)
executionData = files('../app/build/jacoco/testDebug.exec')
reports {
xml.enabled = false
html.enabled = true
}
}
android {
compileSdkVersion 23
buildToolsVersion '23'
lintOptions {
abortOnError false
}
defaultConfig {
applicationId "xxx"
minSdkVersion 16
targetSdkVersion 22
versionCode 4
versionName "1.3"
multiDexEnabled = true
}
buildTypes {
debug {
debuggable true
testCoverageEnabled = true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.squareup:otto:1.3.8'
compile 'com.pnikosis:materialish-progress:1.5'
compile 'com.newrelic.agent.android:android-agent:5.+'
compile 'com.prolificinteractive:material-calendarview:0.8.0'
compile 'com.github.lecho:hellocharts-library:[email protected]'
compile 'com.github.orangegangsters:swipy:[email protected]'
compile 'fr.avianey.com.viewpagerindicator:library:[email protected]'
compile 'com.jakewharton:butterknife:6.1.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.android.support:design:23.0.0'
compile 'com.android.support:recyclerview-v7:23.0.0'
compile 'com.android.support:cardview-v7:23.0.0'
compile 'com.google.android.gms:play-services:7.8.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'org.solovyev.android.views:linear-layout-manager:[email protected]'
androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.4.1'
}
也許有人有同樣的問題。 另外我試圖導入Viewpager庫作爲項目,我用下一個方法:Add ViewPagerIndicator to Android Studio,但沒有任何改變。