[Android] Error:Execution failed for task ‘:processDebugManifest

修改了程式後,Build 會失敗,錯誤訊息:

Execution failed for task ':app:processDebugMainManifest'.
> 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. Run with --scan to get full insights.

執行畫面:

可以點下面的4組的藍色的字(Run with –stacktrace、Run with –info、–debug、Run with –scan),或微微往上捲動一點,或左下角的分類點選較高層的(上層)。就可以看到詳細的錯誤訊息。

例如:

> Task :app:processDebugMainManifest FAILED
[com.google.android.ads.consent:consent-library:1.0.8] /Users/your-app/.gradle/caches/transforms-3/2d160dafc2c9bfb6dfe1eac4c35b8ef6/transformed/jetified-consent-library-1.0.8/AndroidManifest.xml Warning:
	Package name 'com.google.android.ads.consent' used in: com.google.android.ads.consent:consent-library:1.0.8, com.google.android.ump:user-messaging-platform:1.0.0.
/Users/your-app/app/src/main/AndroidManifest.xml:13:5-94:19 Error:
	tools:replace specified at line:13 for attribute android:appComponentFactory, but no new value specified
/Users/your-app/app/src/main/AndroidManifest.xml Error:
	Validation failed, exiting

真是太神奇,第13行的 tag 裡的 attrib: tools:replace 居然會造成出錯。

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *