Closed SageLu closed 6 years ago
@SageLu 这属于AsPectJ
依赖时候产生的错误,请把你根目录和module
下的gradle
配置发出来
close your install run
麻烦看一下~_~ @JustKiddingBaby
根目录gradle:
`apply from: "config.gradle"
buildscript { repositories { jcenter() google() } dependencies { classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.novoda:bintray-release:0.5.0'
classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:1.0.10'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects { repositories { jcenter() maven { url 'https://jitpack.io' } google() } tasks.withType(Javadoc) { options.addStringOption('Xdoclint:none', '-quiet') options.addStringOption('encoding', 'UTF-8') } }
task clean(type: Delete) { delete rootProject.buildDir } `
module 的gradle:
`apply plugin: 'com.android.application' apply plugin: 'android-aspectjx'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId rootProject.ext.app.applicationId
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
versionCode rootProject.ext.app.versionCode
versionName rootProject.ext.app.versionName
multiDexEnabled true
}
compileOptions {
sourceCompatibility rootProject.ext.android.sourceCompatibilityVersion
targetCompatibility rootProject.ext.android.targetCompatibilityVersion
}
signingConfigs {
myConfig {
storeFile file(rootProject.ext.store.storeKey)
storePassword rootProject.ext.store.storePassword
keyAlias rootProject.ext.store.keyAlias
keyPassword rootProject.ext.store.keyPassword
v2SigningEnabled false
}
}
buildTypes {
release {
minifyEnabled false
//是否清理无用资源
shrinkResources false
//是否启用zipAlign压缩
zipAlignEnabled false
signingConfig signingConfigs.myConfig
versionNameSuffix rootProject.ext.app.versionNameSuffix
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
signingConfig signingConfigs.myConfig
versionNameSuffix rootProject.ext.app.versionNameSuffix
}
}
lintOptions {
abortOnError false
}
// buildToolsVersion '26.0.2' }
dependencies { compile rootProject.ext.dependencies.design compile project(':fragment-rigger') compile 'com.squareup.picasso:picasso:2.5.2' } `
@cuncunniu unchecked ,but still useless?
@SageLu 请升级AspectJ
的插件版本试试。
在根目录的build.gradle
中升级插件版本如下:
classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:1.1.0'
Error:Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
添加了 multiDexEnabled true ,还是不行 defaultConfig { .......... multiDexEnabled true }