1
我想與我通過我的gradle這個Android應用程序集成的應用程序性能監控工具無法說錯誤同時整合AppDynamics:transformClassesWithMultidexlistForLiveDebug
Error:Execution failed for task ':app:transformClassesWithMultidexlistForLiveDebug'.
> java.util.NoSuchElementException (no error message)
下面是我的gradle這個根gradle這個文件
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.appdynamics:appdynamics-gradle-plugin:4.+'
}
}
allprojects {
repositories {
jcenter()
}
}
這裏是我的App的gradle文件,
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.app.abc"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1"
multiDexEnabled true
}
dexOptions {
preDexLibraries = false
javaMaxHeapSize "4g"
}
signingConfigs {
config {
keyAlias 'xxx'
keyPassword 'xxx'
storeFile file('xxx')
storePassword 'xxx'
}
}
buildTypes {
release {
minifyEnabled false
}
debug {
debuggable true
minifyEnabled false
}
}
afterEvaluate {
tasks.matching {
it.name.startsWith('dex')
}.each { dx ->
if (dx.additionalParameters == null) {
dx.additionalParameters = []
}
dx.additionalParameters += "--set-max-idx-number=55000"
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/'] } }
}
dependencies {
...
compile 'com.appdynamics:appdynamics-runtime:4.+'
}
我是已經啓用了Multidex標誌,但它在運行應用程序時仍然會出現問題。
而且,我也有我的應用程序類
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}