【发布时间】:2016-11-01 12:20:27
【问题描述】:
从 Eclipse 切换到 Android Studio 后,我遇到了这些错误,我现在知道如何解决它们,我对 AS 仍然不熟悉。
[com.google.firebase:firebase-iid:9.8.0] K:\drawing-board\build\intermediates\exploded-aar\com.google.firebase\firebase-iid\9.8.0\AndroidManifest.xml:24:17-71 Error:
Attribute permission#${applicationId}.permission.C2D_MESSAGE@name at [com.google.firebase:firebase-iid:9.8.0] AndroidManifest.xml:24:17-71 requires a placeholder substitution but no value for <applicationId> is provided.
[com.google.firebase:firebase-iid:9.8.0] K:\drawing-board\build\intermediates\exploded-aar\com.google.firebase\firebase-iid\9.8.0\AndroidManifest.xml:26:22-76 Error:
Attribute uses-permission#${applicationId}.permission.C2D_MESSAGE@name at [com.google.firebase:firebase-iid:9.8.0] AndroidManifest.xml:26:22-76 requires a placeholder substitution but no value for <applicationId> is provided.
[com.google.firebase:firebase-iid:9.8.0] K:\drawing-board\build\intermediates\exploded-aar\com.google.firebase\firebase-iid\9.8.0\AndroidManifest.xml:34:27-58 Error:
Attribute category#${applicationId}@name at [com.google.firebase:firebase-iid:9.8.0] AndroidManifest.xml:34:27-58 requires a placeholder substitution but no value for <applicationId> is provided.
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
[com.google.firebase:firebase-common:9.8.0] K:\drawing-board\build\intermediates\exploded-aar\com.google.firebase\firebase-common\9.8.0\AndroidManifest.xml:6:19-78 Error:
Attribute provider#com.google.firebase.provider.FirebaseInitProvider@authorities at [com.google.firebase:firebase-common:9.8.0] AndroidManifest.xml:6:19-78 requires a placeholder substitution but no value for <applicationId> is provided.
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
K:\drawing-board\AndroidManifest.xml:57:13-59:29 Error:
Missing one of the key attributes 'action#name,category#name' on element intent-filter at AndroidManifest.xml:57:13-59:29
K:\drawing-board\AndroidManifest.xml Error:
Validation failed, exiting
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
:processDebugManifest FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugManifest'.
> Manifest merger failed with multiple errors, see logs
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
谢谢!
对不起,这是我的清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="example.dessin"
android:versionCode="25"
android:versionName="2.1.4" >
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true" />
<uses-sdk android:minSdkVersion="11" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.Holo.Light">
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity
android:name=".Splash"
android:label="@string/app_name"
android:exported="true"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".StickerDialog" android:label="Dialog Example"
android:theme="@android:style/Theme.NoTitleBar" />
<activity
android:name=".Paint"
android:configChanges="orientation|screenSize|keyboard|keyboardHidden">
<intent-filter>
</intent-filter>
</activity>
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="@android:style/Theme.Translucent" />
</application>
</manifest>
如何合并清单?并修复这些错误?看在上帝的份上,我怎么能阻止这些错误!!!非常感谢!!
【问题讨论】:
-
发布您的清单文件以清除视图
-
好的,我会的,谢谢
-
您在项目中使用 Firebase 吗?我没有使用它,但基于错误,我认为您的清单文件中缺少一些东西,这是 firebase 工作所必需的。
-
是的,我正在尝试将 firebase 与:工具->>Firebase 集成
标签: android