当我构建项目时,它向我显示了“app:mergeDebugResources”的异常
我检查了我的整个代码和build.gradle以及 list 文件;我不明白主要问题是什么:
这是我最认真的文件:
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name=".dashboard.MainActivity"
android:label="@string/app_name"></activity>
<activity android:name=".dashboard.SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".childActivities.Alphabcha"></activity>
<activity android:name=".childActivities.Alphabets"></activity>
<activity android:name=".childActivities.Numbers"></activity>
<activity android:name=".childActivities.Tables"></activity>
<activity android:name=".dashboard.Help"></activity>
<activity android:name=".dashboard.AboutUs"></activity>
<activity android:name=".childActivities.Rhymes"></activity>
<activity android:name=".childActivities.tableSubChilds.Ones"></activity>
<activity android:name=".childActivities.tableSubChilds.Two"></activity>
<activity
android:name=".childActivities.tableSubChilds.Third"
android:label="@string/app_name"
android:screenOrientation="portrait"></activity>
<activity
android:name=".childActivities.tableSubChilds.Fourth"
android:label="@string/app_name"
android:screenOrientation="portrait"></activity>
<activity
android:name=".childActivities.tableSubChilds.Fifth"
android:label="@string/app_name"
android:screenOrientation="portrait"></activity>
<activity
android:name=".childActivities.tableSubChilds.Six"
android:label="@string/app_name"
android:screenOrientation="portrait"></activity>
<activity
android:name=".childActivities.tableSubChilds.Seven"
android:label="@string/app_name"
android:screenOrientation="portrait"></activity>
<activity
android:name=".childActivities.tableSubChilds.Eight"
android:label="@string/app_name"
android:screenOrientation="portrait"></activity>
<activity
android:name=".childActivities.tableSubChilds.Nine"
android:label="@string/app_name"
android:screenOrientation="portrait"></activity>
<activity
android:name=".childActivities.tableSubChilds.Ten"
android:label="@string/app_name"
android:screenOrientation="portrait"></activity>
<activity android:name=".childActivities.rhymesSubChilds.Bababl"></activity>
<activity android:name=".childActivities.rhymesSubChilds.Hotcross"></activity>
<activity android:name=".childActivities.rhymesSubChilds.Twink"></activity>
<activity android:name=".childActivities.rhymesSubChilds.Humptydu"></activity>
<activity android:name=".childActivities.rhymesSubChilds.Jackjill"></activity>
<activity android:name=".childActivities.rhymesSubChilds.Mary"></activity>
<activity android:name=".childActivities.Shapes"></activity>
</application>
`
这是我的build.gradle文件:
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/NOTICE.txt' // will not include NOTICE file
exclude 'META-INF/LICENSE.txt' // will not include LICENSE file
}
我没有在此项目的lib中使用任何jar文件。寻找一些有用的答案。提前致谢 。
最佳答案
我只是面临着同样的问题。我删除了我的可绘制文件,并试图一一获取并检查。我在使用过的地方检查了XML文件,它显示了错误:
因此,图像中存在问题,我只是用新图像替换了旧图像,然后它起作用了!