选项' android.enableAapt2'已弃用,不应再使用

时间:2018-04-20 08:47:59

标签: android

我使用android.enableAapt2 = false但是,我有这个问题。

选项' android.enableAapt2'已弃用,不应再使用。 使用' android.enableAapt2 = true'删除此警告。 它将在2018年底删除..

当我删除android.enableAapt2 = false但是,我有这个问题。

AAPT2错误:检查日志以获取详细信息

全部在我的清单页面中。我必须编辑哪部分?

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.nsc.apk.herb4health"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="19"
        android:targetSdkVersion="26" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

    <!-- Required by older versions of Google Play services to create GCM registration tokens -->
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" />

    <permission
        android:name="com.nsc.apk.herb4health.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />

    <uses-permission android:name="com.nsc.apk.herb4health.permission.C2D_MESSAGE" />

    <application
        android:name="android.support.multidex.MultiDexApplication"
        android:allowBackup="true"
        android:debuggable="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme.NoActionBar" >
        <activity android:name="com.nsc.apk.herb4health.WelcomeActivity" >
            <action
                android:name="android.intent.action.MAIN"
                android:label="@string/app_name"
                android:theme="@style/AppTheme.NoActionBar" />

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="com.nsc.apk.herb4health.MainActivity" />
        <!--
 ATTENTION: This was auto-generated to add Google Play services to your project for
     App Indexing.  See https://g.co/AppIndexing/AndroidStudio for more information.
        -->
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />

        <activity android:name="com.nsc.apk.herb4health.bodyhumenActivity" />
        <activity
            android:name="com.nsc.apk.herb4health.highest_score"
            android:label="@string/title_activity_highest_score"
            android:theme="@style/AppTheme.NoActionBar" />
        <activity android:name="com.nsc.apk.herb4health.quiz" />
        <activity android:name="com.nsc.apk.herb4health.Newlist" />
        <activity android:name="com.nsc.apk.herb4health.ShowDetail" />
        <activity android:name="com.nsc.apk.herb4health.ShowlistFirebase" />
        <activity android:name="com.nsc.apk.herb4health.FetchImageFirebase" />
        <activity android:name="com.nsc.apk.herb4health.FireApp" />
        <activity android:name="com.nsc.apk.herb4health.Cardview_main" />
        <activity android:name="com.nsc.apk.herb4health.CoverFlowMain" />
        <activity android:name="com.nsc.apk.herb4health.FoodDetail" />
        <activity android:name="com.nsc.apk.herb4health.ViewerActivity" />
        <activity android:name="com.nsc.apk.herb4health.act.ActivitySample" />
        <activity android:name="com.nsc.apk.herb4health.act.FragmentActivitySample" />
        <activity android:name="com.nsc.apk.herb4health.CardSwipeWithFragment" />
        <activity android:name="com.nsc.apk.herb4health.CardSwipeActivity" />
        <activity android:name="com.nsc.apk.herb4health.PuzzleActivity" />
        <activity android:name="com.nsc.apk.herb4health.DetailBody1" />
        <activity android:name="com.nsc.apk.herb4health.DetailBody2" />
        <activity android:name="com.nsc.apk.herb4health.quiz2" />
        <activity android:name="com.nsc.apk.herb4health.highest_score2" />
        <activity android:name="com.nsc.apk.herb4health.startScreen" />
        <activity android:name="com.nsc.apk.herb4health.Main_Connected_Game" />
        <activity android:name="com.nsc.apk.herb4health.detail_body3" />
        <activity android:name="com.nsc.apk.herb4health.Detail_body4" />
        <activity android:name="com.nsc.apk.herb4health.Detail_Body5" />
        <activity android:name="com.nsc.apk.herb4health.Detail_body6" />
        <activity android:name="com.nsc.apk.herb4health.Detail_body7" />
        <activity android:name="com.nsc.apk.herb4health.Body_Detail8" />
        <activity android:name="com.nsc.apk.herb4health.Detail_body9" />
        <activity android:name="com.nsc.apk.herb4health.Detai_body10" />
        <activity android:name="com.nsc.apk.herb4health.Detail_Body11" />
        <activity android:name="com.nsc.apk.herb4health.Detail_Body12" />
        <activity android:name="com.nsc.apk.herb4health.Detail_body13" />
        <activity android:name="com.nsc.apk.herb4health.Detail_body14" />
        <activity android:name="com.nsc.apk.herb4health.Detail_body15" />
        <activity android:name="com.nsc.apk.herb4health.Detail_body16" />
        <activity android:name="com.nsc.apk.herb4health.Detail_body17" />
        <activity android:name="com.nsc.apk.herb4health.Detail_body18" />
        <activity
            android:name="com.karumi.dexter.DexterActivity"
            android:launchMode="singleTask"
            android:theme="@style/Theme.Transparent" />

        <meta-data
            android:name="android.support.VERSION"
            android:value="26.1.0" />
        <!--
             FirebaseMessagingService performs security checks at runtime,
             no need for explicit permissions despite exported="true"
        -->
        <service
            android:name="com.google.firebase.messaging.FirebaseMessagingService"
            android:exported="true" >
            <intent-filter android:priority="-500" >
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>

        <activity
            android:name="com.google.firebase.auth.internal.FederatedSignInActivity"
            android:excludeFromRecents="true"
            android:exported="true"
            android:launchMode="singleInstance"
            android:permission="com.google.firebase.auth.api.gms.permission.LAUNCH_FEDERATED_SIGN_IN"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />

        <receiver
            android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
            android:enabled="true"
            android:exported="false" >
        </receiver>
        <receiver
            android:name="com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver"
            android:enabled="true"
            android:exported="true"
            android:permission="android.permission.INSTALL_PACKAGES" >
            <intent-filter>
                <action android:name="com.android.vending.INSTALL_REFERRER" />
            </intent-filter>
        </receiver>

        <service
            android:name="com.google.android.gms.measurement.AppMeasurementService"
            android:enabled="true"
            android:exported="false" />
        <service
            android:name="com.google.android.gms.measurement.AppMeasurementJobService"
            android:enabled="true"
            android:exported="false"
            android:permission="android.permission.BIND_JOB_SERVICE" />

        <receiver
            android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
            android:exported="true"
            android:permission="com.google.android.c2dm.permission.SEND" >
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />

                <category android:name="com.nsc.apk.herb4health" />
            </intent-filter>
        </receiver>
        <!--
             FirebaseInstanceIdService performs security checks at runtime,
             no need for explicit permissions despite exported="true"
        -->
        <service
            android:name="com.google.firebase.iid.FirebaseInstanceIdService"
            android:exported="true" >
            <intent-filter android:priority="-500" >
                <action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
            </intent-filter>
        </service>

        <provider
            android:name="com.google.firebase.provider.FirebaseInitProvider"
            android:authorities="com.nsc.apk.herb4health.firebaseinitprovider"
            android:exported="false"
            android:initOrder="100" />

        <activity
            android:name="com.google.android.gms.common.api.GoogleApiActivity"
            android:exported="false"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />
    </application>

</manifest>

0 个答案:

没有答案