sdk版本27编译错误
你好,编译sdk版本为27引用库编译不通过。报如下错误,有什么解决办法吗
error: resource android:attr/dialogCornerRadius not found.
把项目下载下来,重新编译修改下试试
---原始邮件--- 发件人: "huangy7"<[email protected]> 发送时间: 2020年1月19日(周日) 晚上8:17 收件人: "jaychou2012/PolicyLib"<[email protected]>; 抄送: "Subscribed"<[email protected]>; 主题: [jaychou2012/PolicyLib] sdk版本27编译错误 (#1)
你好,编译sdk版本为27引用库编译不通过。报如下错误,有什么解决办法吗 error: resource android:attr/dialogCornerRadius not found.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
你好,我把库搞到我的项目里添加 implementation project(':policylib') 编译,还是报错,好像说我的编译版本过低,有什么办法可以在不改变我的编译版本的情况下成功编译你的库呢? 报错如下
Android dependency 'com.android.support:appcompat-v7' has different version for the compile (22.2.0) and runtime (27.1.1) classpath. You should manually set the same version via DependencyResolution
这个是我修改后的你的库的build.gradle文件
apply plugin: 'com.android.library'
android {
compileSdkVersion 27
defaultConfig {
minSdkVersion 14
targetSdkVersion 27
versionCode 1
versionName "1.0"
consumerProguardFiles 'consumer-rules.pro'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//implementation 'com.android.support:support-compat:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
//implementation 'com.android.support:support-annotations:27.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
我有试过在后面添加``` resolutionStrategy.eachDependency { details -> if (details.requested.group == 'com.android.support' && !details.requested.name.contains('multidex') ) { details.useVersion "22.2.0" } }
依旧报错。
如果可以的话我能在你有空的时候加加你的微信或者QQ咨询你吗?我的邮箱是[email protected]。可以的话把你的联系方式发我邮箱,谢谢!