Java 清单合并失败,出现多个错误,请参阅Android Studio上的日志
错误表示“错误:任务执行失败”:app:processDebugManifest'> 我在这个网站上尝试了很多解决方案,但问题仍然没有解决。请帮帮我 AndroidManifest.xmlJava 清单合并失败,出现多个错误,请参阅Android Studio上的日志,java,android,build.gradle,android-manifest,Java,Android,Build.gradle,Android Manifest,错误表示“错误:任务执行失败”:app:processDebugManifest'> 我在这个网站上尝试了很多解决方案,但问题仍然没有解决。请帮帮我 AndroidManifest.xml <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="project.myapp">
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="project.myapp">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:replace="android:appComponentFactory">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
build.gradle(项目:myapp)
合并舱单上说
合并错误:错误:工具:替换在属性的第5行指定
android:appComponentFactory,但没有为app main指定新值
清单(此文件),第4行错误:验证失败,正在退出应用程序
主清单(此文件)
你应该试试这个:
1:删除工具:replace=“android:appComponentFactory”
2:为android:appComponentFactory“属性提供新值
发件人:
它对我有用!I.m删除此
- 工具:ignore=“GoogleAppIndexingWarning”
- 工具:replace=“android:appComponentFactory”
并且修复这个问题。祝你好运:)对我来说,解决方案就是迁移到
AndroidX
在Android Studio上,转到:
重构>迁移到AndroidX
清理项目。只需删除以下行:
tools:replace="android:appComponentFactory"
然后重新编译,最终它对我有效!我尝试将Android Studio更新为最新版本,并且它像魅力一样解决了问题。我正在努力将Ionic应用程序项目导入Android Studio 3.6。你的回答很有帮助。
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.1.0'
classpath 'com.jakewharton:butterknife-gradle-plugin:8.5.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
tools:replace="android:appComponentFactory"