添加到gradle.properties后
android.useAndroidX=true
android.enableJetifier=true
我收到
无法解决以下方面的依赖性 ':videoplayer @ unsignedUnitTest / compileClasspath':转换失败 工件'localytics.aar (com.segment.analytics.android.integrations:localytics:1.3.0)” 匹配属性{artifactType = jar}。
此错误在我所有的模块中均发生。我需要将androidX和Jetifier包含在gradle.properties中。关于如何解决此问题的任何想法吗?
这是我尝试过的。
1)将.arr添加到文件树
api fileTree(dir: 'libs', include: ['*.jar','*.aar'])
2)清理/重建
3)使缓存/重启无效
4)确认禁用了gradle脱机工作设置。我在线!
5)忽略皮绒
lintOptions {
checkReleaseBuilds false
abortOnError false
}
这是罪魁祸首之一的摇篮
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion compileSdkVer
defaultConfig {
versionName "1.0"
minSdkVersion minSdkVer
targetSdkVersion targetSdkVer
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
// needed in this module for implementation/integration tests (tests in androidTest)
}
buildTypes {
release {
consumerProguardFiles 'consumer-proguard-rules.pro'
}
unsigned {
consumerProguardFiles 'consumer-proguard-rules.pro'
}
debug {
consumerProguardFiles 'consumer-proguard-rules.pro'
}
}
compileOptions {
targetCompatibility targetCompatibilityVer
sourceCompatibility sourceCompatibilityVer
}
aaptOptions {
// ignore adding files, used for testing, to the apk
ignoreAssetsPattern "!androidTest/**/*.json"
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
dependencies {
api fileTree(dir: 'libs', include: ['*.jar','*.aar'])
androidTestImplementation(deps.espresso, {
exclude group: 'com.android.support', module: 'support-annotations'
})
testImplementation deps.junit
api project(':commonuilib')
}
repositories {
mavenCentral()
}