
我正在android Studio 3.1 Canary 4中工作我的项目。突然,我得到这个问题“错误:(252,5)属性”类型“已经定义了不兼容的格式。”如何恢复此问题。
在这里我附上了我的Logcat,

现在我正在修改SDK版本27,但同样的问题也出现了。App Gradle,
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion '27.0.2'
defaultConfig {
applicationId "com.casperon.app.rydepass"
minSdkVersion 18
targetSdkVersion 27
versionCode 17
versionName "4.2"
multiDexEnabled true
}
aaptOptions {
cruncherEnabled = false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
javaMaxHeapSize "4g"
}
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false
useLibrary 'org.apache.http.legacy'
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':slideDateTimePicker')
compile project(':CountryCodePicker')
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.android.support:multidex:1.0.3'
compile 'com.prolificinteractive:material-calendarview:1.4.3'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.github.ybq:Android-SpinKit:1.1.0'
compile 'com.squareup:android-times-square:1.6.5@aar'
compile 'com.google.android.gms:play-services:11.0.0'
compile 'com.android.support:cardview-v7:24.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.d-max:spots-dialog:0.7@aar'
compile 'com.android.support:support-annotations:24.2.0'
compile 'com.balysv:material-ripple:1.0.2'
compile 'com.github.paolorotolo:expandableheightlistview:1.0.0'
compile 'com.github.ganfra:material-spinner:1.1.0'
compile 'com.baoyz.swipemenulistview:library:1.3.0'
compile 'com.googlecode.libphonenumber:libphonenumber:8.7.0'
compile 'com.github.jakob-grabner:Circle-Progress-View:v1.2.2'
compile 'me.drakeet.materialdialog:library:1.2.2'
compile 'com.wang.avi:library:1.0.1'
compile 'com.android.support:design:24.2.1'
compile 'com.nineoldandroids:library:2.4.0'
compile 'org.igniterealtime.smack:smack-android:4.1.0-rc1'
compile 'org.igniterealtime.smack:smack-tcp:4.1.0-rc1'
compile 'org.igniterealtime.smack:smack-im:4.1.0-rc1'
compile 'org.igniterealtime.smack:smack-extensions:4.1.0-rc1'
compile 'net.hockeyapp.android:HockeySDK:3.5.0'
compile 'pl.droidsonroids.gif:android-gif-drawable:1.1.+'
compile 'org.jsoup:jsoup:1.8.3'
compile 'com.android.support:multidex:1.0.1'
compile 'com.github.crazy1235:RichEditText:v2.0'
compile 'com.android.support.constraint:constraint-layout:+'
compile 'org.apache.httpcomponents:httpcore:4.4.1'
compile 'com.squareup:android-times-square:1.6.5@aar'
compile 'org.apache.httpcomponents:httpclient:4.5'}
Countrycodepicker gradle:

Slidedatepicker gradle,

发布于 2018-07-05 13:28:15
为了清楚起见。
您正在使用同一个库的不同版本,因此请从以下位置进行更改:
compile 'com.android.support:cardview-v7:24.0.0'
compile 'com.android.support:support-annotations:24.2.0'
compile 'com.android.support:design:24.2.1'至:
compile 'com.android.support:cardview-v7:27.0.2'
compile 'com.android.support:support-annotations:27.0.2'
compile 'com.android.support:design:27.0.2'此外,如果其他一些库使用不同的版本,这将导致相同的问题。
另外,compile是多余的,你应该使用implementation
所以,它实际上应该是:
implementation 'com.android.support:cardview-v7:27.0.2'
implementation 'com.android.support:support-annotations:27.0.2'
implementation 'com.android.support:design:27.0.2'发布于 2018-07-05 13:10:44
1. compile 'com.android.support:appcompat-v7:25.0.1'
2. compile 'com.android.support:design:25.0.1'添加这两个依赖项可能会有所帮助。
https://stackoverflow.com/questions/51183687
复制相似问题