【问题标题】:Android Studio Manifest merger error in package name包名中的 Android Studio Manifest 合并错误
【发布时间】:2020-02-18 22:02:51
【问题描述】:
  • 出了什么问题: 任务“:app:processDebugManifest”执行失败。

    清单合并失败:位于 AndroidManifest.xml:3:5-40 位置的包名称“”应至少包含一个“。” (点)字符

package="com.example.myapplication"

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

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="Tabeeb"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".flipview"/>
        <activity android:name=".user_row" />
        <activity android:name=".Chat" />
        <activity android:name=".doclist" />
        <activity android:name=".chat_items" />
        <activity
            android:name=".Forgotpassword"
            android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
        <activity
            android:name=".SignUp"
            android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
        <activity
            android:name=".Login"
            android:theme="@style/Theme.AppCompat.Light.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

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

                <data
                    android:scheme="http"
                    android:host="www.tabeeb-app.com"
                    android:pathPrefix="/tabeeb" />
            </intent-filter>
        </activity>
        <activity android:name=".MainActivity" />
    </application>

</manifest>

【问题讨论】:

  • 嗯,这对我来说当然是正确的。你确定这是它所指的清单吗?如果有明显的合并,那么至少还有一个。 IE。也许您的 build.gradle 文件中没有设置 applicationId。

标签: android android-layout android-manifest


【解决方案1】:

转到模块的“build.gradle”文件->“defaultConfig”->“applicationId” 并将其值更改为您的根包名称:“com.example.myapplication”。

【讨论】:

  • 不起作用。还是一样
【解决方案2】:

就我而言

tools:replace="android:appComponentFactory
android:appComponentFactory="mystring"

需要在AndroidManifest.xml中添加&lt;application&gt;。求详细解答at codegrepper

【讨论】:

    【解决方案3】:

    在你的项目中构建 gradle

    dependencies {
            classpath 'com.android.tools.build:gradle:3.2.0'
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-03-13
      • 2017-07-28
      • 2020-03-12
      • 1970-01-01
      • 2015-09-07
      • 2014-08-21
      • 2019-08-31
      相关资源
      最近更新 更多