属性" "已使用不兼容的格式定义



这是我的构建。gradle代码

apply plugin: 'com.android.application'
repositories {
maven { url System.getenv('ANDROID_HOME') + '/extras/android/m2repository' }
maven { url System.getenv('ANDROID_HOME') + '/extras/google/m2repository' }
maven { url 'https://github.com/friberry/mvn-repo/raw/master/' }
maven { url "http://jzaccone.github.io/SlidingMenu-aar" }
// for htmlspanner
maven { url 'http://repo.pageturner-reader.org' }
// for facebook sdk
maven { url "http://mente.github.io/facebook-api-android-aar" }
// for kakao sdk
maven { url 'http://devrepo.kakao.com:8088/nexus/content/groups/public/' }
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'com.android.support:support-v4:24.2.1'
compile 'com.google.android.gcm:gcm-client:1.0.2'
compile 'com.google.android.gms:play-services:7.0.0'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.jeremyfeinstein.slidingmenu:library:1.3@aar'
compile 'com.squareup.dagger:dagger:1.0.1'
compile 'com.squareup.dagger:dagger-compiler:1.0.1'
compile 'com.jakewharton:butterknife:4.0.1'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.8.6'
compile 'net.nightwhistler.htmlspanner:htmlspanner:0.4'
compile 'com.github.kevinsawicki:http-request:5.4.1'
compile 'com.friberry.viewpagerindicator:library:2.4.1'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.github.kevinsawicki:wishlist:0.9'
compile 'com.squareup:otto:1.3.4'
compile 'com.squareup.retrofit:retrofit:1.1.1'
compile 'com.squareup.okhttp:okhttp:1.2.1'
compile 'ch.acra:acra:4.5.0'
compile 'org.jsoup:jsoup:1.7.3'
compile 'org.apache.commons:commons-lang3:3.1'
compile 'org.apache.maven:maven-artifact:3.0.5'
compile 'joda-time:joda-time:2.3'
compile 'com.github.chrisbanes.actionbarpulltorefresh:extra-abs:0.8'
compile 'com.j256.ormlite:ormlite-android:4.47'
compile 'com.j256.ormlite:ormlite-core:4.47'
compile 'com.facebook:facebook-android-sdk:3.5.2@aar'
compile 'com.kakao.sdk:kakaolink:1.0.44'
compile files('libs/apsalar-6.0.0.jar')
androidTestCompile 'junit:junit:4.11'
androidTestCompile 'org.hamcrest:hamcrest-library:1.3'
androidTestCompile 'org.mockito:mockito-core:1.9.5'
}
archivesBaseName = 'com-friberry-app-fbshop'
android {
compileSdkVersion 24
buildToolsVersion '24.0.2'
defaultConfig {
    applicationId "com.byteshaft.fbshop"
    minSdkVersion 16
    targetSdkVersion 24
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_7
    targetCompatibility JavaVersion.VERSION_1_7
}
sourceSets {
    main {
        manifest.srcFile 'AndroidManifest.xml'
        java.srcDirs = ['src/main/java']
        resources.srcDirs = ['src/main/java']
        aidl.srcDirs = ['src/main/java']
        renderscript.srcDirs = ['src/main/java']
        res.srcDirs = ['res']
        assets.srcDirs = ['assets']
    }
    //instrumentTest.setRoot('src/test/java')
}
signingConfigs {
    release {
        storeFile file('keystore')
        keyAlias 'friberry'
        // These two lines make gradle believe that the signingConfigs section is complete. Without them, tasks like installRelease will not be available!
        storePassword "mad2dev_0815"
        keyPassword "mad2dev_0815"
    }
}
buildTypes {
    debug {
        // packageNameSuffix '.debug'
        minifyEnabled false
        debuggable true
        zipAlignEnabled false
    }
    release {
        minifyEnabled true
        debuggable false
        proguardFile '../proguard.cfg'
        signingConfig signingConfigs.release
        zipAlignEnabled true
        // testPackageName 'com.friberry.app.FBShop.tests'
        // testInstrumentationRunner 'android.test.InstrumentationTestRunner' // this is the default
    }
}
// To handle the following error: Error: duplicate files during packaging of APK
packagingOptions {
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/license.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/notice.txt'
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/dependencies.txt'
    exclude 'META-INF/services/javax.annotation.processing.Processor'
}
aaptOptions {
    noCompress 'txt'
    ignoreAssetsPattern "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini"
}
lintOptions {
    quiet true
    abortOnError false
    ignoreWarnings false
    checkAllWarnings true
    disable 'SpUsage', 'ContentDescription', 'ExportedReceiver', 'ExportedContentProvider', 'UselessParent', 'TypographyDashes', 'TypographyQuotes', 'RtlSymmetry', 'IconDuplicates', 'IconDensities', 'IconColors', 'NestedWeights', 'SetJavaScriptEnabled'
    htmlReport true
}
}
task askForPasswords {
// Must create String because System.readPassword() returns char[] (and assigning that below fails silently)
def keyStorePw = System.getenv('FRIBERRY_KEYSTORE_PASSWORD')
if (!keyStorePw?.trim() && System.console()) {
    keyStorePw = new String(System.console().readPassword("n$ Enter keyStore password: "))
}
android.signingConfigs.release.storePassword = keyStorePw
android.signingConfigs.release.keyPassword = keyStorePw
}
tasks.whenTaskAdded { theTask ->
if (theTask.name.equals("packageRelease")) {
    theTask.dependsOn "askForPasswords"
}
}

代码在API 20下工作良好,我正在将其更新到最新的,但是当我用构建工具编译它时,我遇到了问题24

我得到这个错误

Error:(206) Attribute "background" already defined with incompatible format.
Error:(8) Original attribute defined here.
Error:(449) Attribute "navigationMode" already defined with incompatible format.
Error:(193) Original attribute defined here.
Error:(457) Attribute "displayOptions" already defined with incompatible format.
Error:(199) Original attribute defined here.
Error:(470) Attribute "itemBackground" already defined with incompatible format.
Error:(441) Original attribute defined here.
Error:(473) Attribute "actionBarSize" already defined with incompatible format.
Error:(250) Original attribute defined here.
Error:(475) Attribute "windowMinWidthMajor" already defined with incompatible format.
Error:(249) Original attribute defined here.

代码与'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'在依赖关系中编译,但在我读到某处"在使用appcompat时删除它,所以我删除了它"之后,但我仍然得到这些错误,我不知道是哪个库导致的。谁来帮帮我。下面是生成的value .xmlvalue.xml

我有一个类似的问题,我自己的一个自定义控件有一个属性叫min with format="float"。Seekbar还使用了一个属性min, format="integer"

最后,我将属性重命名为minValue,以避免冲突。对我来说,这看起来像是Android中的一个bug,因为如果属性名是在它们自己的声明样式资源中定义的,那么它们应该不会冲突。当我今天更新我的android插件到25.1.0时,这个问题出现了

相关内容

  • 没有找到相关文章

最新更新