在合并后的AndroidManifest.xml文件中的问题

问题描述 投票:0回答:1

我尝试建立一个旧的Android项目(2岁),但是我卡在这个错误。

我得到了以下错误:Android的资源链接失败输出:d:\ svnserver \ crosscyle \ crosscycle-的Android \程序\编译\中间体\ merged_manifests \调试\ processDebugManifest \合并\ AndroidManifest.xml中:51:错误:在发现意外元素。

这是由线路原因引起:

<uses-feature
    android:glEsVersion="0x00020000"
    android:required="true" />

显然,这条线自动生成的,但在错误的地方。

我也试图把线路清单文件在正确的位置,但仍产生errorness线。

下面我的清单文件(很抱歉的混乱,它工作正在进行中具有该编译):

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.dynniq.crosscycle">

  <uses-permission android:name="android.permission.INTERNET"/>
  <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

  <uses-permission android:name="android.permission.WAKE_LOCK"/>
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
  <uses-permission android:name="android.permission.VIBRATE"/>
  <uses-permission android:name="com.android.alarm.permission.SET_ALARM"/>
  <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
  <uses-permission android:name="android.permission.WAKE_LOCK"/>
  <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>


  <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

  <uses-feature android:glEsVersion="0x00020000" />

      <!--android:name=".base.CrossCycleApp"-->
  <application
      android:name=".base.CrossCycleApp"
      android:allowBackup="true"
      android:icon="@mipmap/ic_dynniq_app_blue"
      android:label="@string/app_name"
      android:supportsRtl="true"
      android:theme="@style/AppTheme.NoActionBar">
    <activity
        android:name=".view.MainActivity"
        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>

    <service
        android:name=".connectedservice.ConnectedService"
        android:enabled="true"
        android:exported="true"/>
    <service android:name="org.eclipse.paho.android.service.MqttService">
    </service>

    <activity
        android:name=".view.SettingsActivity"
        android:label="@string/title_activity_settings"
        android:theme="@style/AppTheme.SettingsStyle">
    </activity>

    <receiver
        android:name=".util.BootReceiver"
        android:enabled="true"
        android:permission="android.permission.RECEIVE_BOOT_COMPLETED">
      <intent-filter>
        <action android:name="android.intent.action.BOOT_COMPLETED"/>

        <category android:name="android.intent.category.DEFAULT"/>
      </intent-filter>
    </receiver>
    <receiver android:name=".util.GpsLocationReceiver">
      <intent-filter>
        <action android:name="android.location.PROVIDERS_CHANGED"/>

        <category android:name="android.intent.category.DEFAULT"/>
      </intent-filter>
    </receiver>
    <receiver android:name=".util.BatSaveChangeReceiver">
      <intent-filter>
        <action android:name="android.action.ACTION_POWER_SAVE_MODE_CHANGED"/>

        <category android:name="android.intent.category.DEFAULT"/>
      </intent-filter>
    </receiver>
  </application>

</manifest>

而合并清单文件:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.dynniq.crosscycle"
    android:versionCode="7"
    android:versionName="1.0.7" >

    <uses-sdk
        android:minSdkVersion="18"
        android:targetSdkVersion="24" />

    <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="com.android.alarm.permission.SET_ALARM" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true" /> <!-- Required by older versions of Google Play services to create GCM registration tokens -->
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

    <permission
        android:name="com.dynniq.crosscycle.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />

    <uses-permission android:name="com.dynniq.crosscycle.permission.C2D_MESSAGE" />

    <application
        android:name="com.dynniq.crosscycle.base.CrossCycleApp"
        android:allowBackup="true"
        android:debuggable="true"
        android:icon="@mipmap/ic_dynniq_app_blue"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme.NoActionBar" >
        <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="AIzaSyDvgduUCD3enV0RW1WCpILGc2yeIMxyybs" />
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />

        <uses-feature
            android:glEsVersion="0x00020000"
            android:required="true" />

        <activity
            android:name="com.dynniq.crosscycle.view.MainActivity"
            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>

        <service
            android:name="com.dynniq.crosscycle.connectedservice.ConnectedService"
            android:enabled="true"
            android:exported="true" />
        <service android:name="org.eclipse.paho.android.service.MqttService" >
        </service>

        <activity
            android:name="com.dynniq.crosscycle.view.SettingsActivity"
            android:label="@string/title_activity_settings"
            android:theme="@style/AppTheme.SettingsStyle" >
        </activity>

        <receiver
            android:name="com.dynniq.crosscycle.util.BootReceiver"
            android:enabled="true"
            android:permission="android.permission.RECEIVE_BOOT_COMPLETED" >
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </receiver>
        <receiver android:name="com.dynniq.crosscycle.util.GpsLocationReceiver" >
            <intent-filter>
                <action android:name="android.location.PROVIDERS_CHANGED" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </receiver>
        <receiver android:name="com.dynniq.crosscycle.util.BatSaveChangeReceiver" >
            <intent-filter>
                <action android:name="android.action.ACTION_POWER_SAVE_MODE_CHANGED" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </receiver>
        <receiver android:name="com.google.android.gms.cast.framework.media.MediaIntentReceiver" />

        <service android:name="com.google.android.gms.cast.framework.media.MediaNotificationService" />
        <service android:name="com.google.android.gms.cast.framework.ReconnectionService" />

        <meta-data
            android:name="android.support.VERSION"
            android:value="26.1.0" /> <!-- Include the AdActivity and InAppPurchaseActivity configChanges and themes. -->
        <activity
            android:name="com.google.android.gms.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:exported="false"
            android:theme="@android:style/Theme.Translucent" />

        <receiver
            android:name="com.google.android.gms.analytics.AnalyticsReceiver"
            android:enabled="true"
            android:exported="false" >
        </receiver>

        <service
            android:name="com.google.android.gms.analytics.AnalyticsService"
            android:enabled="true"
            android:exported="false" />
        <service
            android:name="com.google.android.gms.analytics.AnalyticsJobService"
            android:enabled="true"
            android:exported="false"
            android:permission="android.permission.BIND_JOB_SERVICE" />

        <activity
            android:name="com.google.android.gms.appinvite.PreviewActivity"
            android:exported="true"
            android:theme="@style/Theme.AppInvite.Preview" >
            <intent-filter>
                <action android:name="com.google.android.gms.appinvite.ACTION_PREVIEW" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity"
            android:excludeFromRecents="true"
            android:exported="false"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />
        <!--
            Service handling Google Sign-In user revocation. For apps that do not integrate with
            Google Sign-In, this service will never be started.
        -->
        <service
            android:name="com.google.android.gms.auth.api.signin.RevocationBoundService"
            android:exported="true"
            android:permission="com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION" />

        <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" />
        <activity
            android:name="com.google.android.gms.common.api.GoogleApiActivity"
            android:exported="false"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />
        <!--
             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>
        <service
            android:name="com.google.android.gms.tagmanager.TagManagerService"
            android:enabled="true"
            android:exported="false" />

        <activity
            android:name="com.google.android.gms.tagmanager.TagManagerPreviewActivity"
            android:exported="true"
            android:noHistory="true" > <!-- optional, removes the previewActivity from the activity stack. -->
            <intent-filter>
                <data android:scheme="tagmanager.c.com.dynniq.crosscycle" />

                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
            </intent-filter>
        </activity>

        <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.dynniq.crosscycle" />
            </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.dynniq.crosscycle.firebaseinitprovider"
            android:exported="false"
            android:initOrder="100" />

        <meta-data
            android:name="android.arch.lifecycle.VERSION"
            android:value="27.0.0-SNAPSHOT" />
    </application>

</manifest>

任何帮助或建议,欢迎,我真的坚持这个我。

android-manifest
1个回答
0
投票

我只需创建一个新的项目和源代码复制到,项目解决。还不知道这个问题的真正原因是

热门问题
推荐问题
最新问题