1

我正在使用 android studio 2.3 最新稳定版本。当我使用 configChanges 添加活动时,我收到了这 5 个错误。我可以运行应用程序的有趣之处。所以我认为这是新版本的某种错误,但我不确定。

我也尝试更改这 3 个 configChanges 的顺序,keyboardHidden|orientation|screenSize但它仍然显示 5 个这样的错误screenSize" />

当我从 configChanges 中删除其中一个时,我看不到任何错误。所以keyboardHidden|orientation不会引起任何错误。

有谁知道为什么我会收到这种错误?谢谢你。

错误信息

导致错误的清单文件。 清单活动

更新

build.gradle 文件:

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.test.test"
        minSdkVersion 16
        targetSdkVersion 25
        versionCode 200
        versionName "2.0"
        multiDexEnabled true
        vectorDrawables.useSupportLibrary = true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        manifestPlaceholders = [manifestApplicationId          : "${applicationId}",
                                onesignal_app_id               : "713123123123131313",
                                onesignal_google_project_number: "123123123"]
    }
    signingConfigs {
        config {
            keyAlias 'android'
            keyPassword 'android'
            storeFile file('/Users/test/.android/debug.keystore')
            storePassword 'android'
        }
        config_staging {
            keyAlias 'asdadsStaging'
            keyPassword '13123131'
            storeFile file('../asdasdasd.jks')
            storePassword '13123123'
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

        }
        debug {
            minifyEnabled false
            debuggable true

        }
        staging {
            minifyEnabled false
            debuggable true
            applicationIdSuffix ".staging"


            // one signal staging
            manifestPlaceholders = [manifestApplicationId          : "com.test.test.staging",
                                    onesignal_app_id               : "04123123123123123",
                                    onesignal_google_project_number: "1232131231"]

            signingConfig signingConfigs.config_staging
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    testCompile 'junit:junit:4.12'

    compile project(':volley')
    compile project(path: ':customtabs')
    compile('com.crashlytics.sdk.android:crashlytics:2.6.6@aar') { transitive = true; }
    compile 'com.onesignal:OneSignal:3.4.0@aar'
    compile 'com.miguelcatalan:materialsearchview:1.4.0'
    compile 'com.ToxicBakery.viewpager.transforms:view-pager-transforms:1.2.32@aar'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.android.support:support-v13:25.2.0'
    compile 'com.android.support:gridlayout-v7:25.2.0'
    compile 'com.android.support:appcompat-v7:25.2.0' 
    compile 'com.android.support:recyclerview-v7:25.2.0'
    compile 'com.android.support:cardview-v7:25.2.0'
    compile 'com.android.support:design:25.2.0'
    compile 'com.android.support:preference-v7:25.2.0'
    compile 'com.android.support:customtabs:25.2.0'
    compile 'com.android.support:support-v4:25.2.0'
    compile 'com.google.code.gson:gson:2.7'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.squareup.okhttp:okhttp:2.7.5'
    compile 'com.squareup.okhttp:okhttp-urlconnection:2.7.5'
    compile 'com.facebook.android:facebook-android-sdk:4.18.0'
    compile 'com.facebook.android:audience-network-sdk:4.18.0'
    compile 'com.google.android.gms:play-services-gcm:10.2.0'
    compile 'com.google.android.gms:play-services-analytics:10.2.0'
    compile 'com.google.android.gms:play-services-ads:10.2.0'
    compile 'com.google.android.gms:play-services-auth:10.2.0'
    compile 'com.google.firebase:firebase-core:10.2.0'
    compile 'com.google.firebase:firebase-auth:10.2.0'
    compile 'com.google.firebase:firebase-database:10.2.0'
    compile 'com.google.firebase:firebase-ads:10.2.0'
    compile 'com.google.firebase:firebase-crash:10.2.0'
    compile 'com.google.firebase:firebase-config:10.2.0'
    compile 'com.appnext.sdk:native-ads-mediation-mopub:1.7.6'
//    compile 'com.flurry.android:ads:6.5.0'
//    compile 'com.inmobi.monetization:inmobi-ads:5.3.1'
//    compile 'net.pubnative:library:2.2.0'
//    compile 'com.github.mobfox:MobFox-Android-SDK-Core:2.1.3'
//    compile 'com.flurry.android:analytics:6.5.0'
    compile('com.mopub:mopub-sdk:4.12.0@aar') { transitive = true; }
    compile('io.fabric.sdk.android:fabric:1.3.11@aar') { transitive = true; }
    compile("com.twitter.sdk.android:twitter:2.3.2@aar") { transitive = true }
    compile 'com.android.support.constraint:constraint-layout:1.0.0'
}

repositories {
    maven {
        url 'https://maven.fabric.io/public'
    }
    jcenter()
}

buildscript {
    repositories {
        maven {
            url 'https://maven.fabric.io/public'
        }
    }
    dependencies {
        classpath 'io.fabric.tools:gradle:1.21.6'
    }
}

apply plugin: 'com.google.gms.google-services'
4

1 回答 1

0

这里同样的问题。添加 MoPub 活动时出现此错误。即使报告了这些错误,应用程序也会正确编译并按预期工作。

于 2017-04-03T08:04:23.277 回答