我正在安装android studio并在程序安装完成后遇到一些错误。
这是我正在尝试运行的代码
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.marcusc.practiceandriod"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="20"
android:targetSdkVersion="26" />
<application
android:allowBackup="true"
android:debuggable="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme" />
</manifest>
我不知道结果应该是什么。
Error:(11) error: resource mipmap/ic_launcher (aka me.marcusc.practiceandriod:mipmap/ic_launcher) not found.
Error:(11) error: resource string/app_name (aka me.marcusc.practiceandriod:string/app_name) not found.
Error:(11) error: resource mipmap/ic_launcher_round (aka me.marcusc.practiceandriod:mipmap/ic_launcher_round) not found.
Error:(11) error: resource style/AppTheme (aka me.marcusc.practiceandriod:style/AppTheme) not found.
Error:(11) resource mipmap/ic_launcher (aka me.marcusc.practiceandriod:mipmap/ic_launcher) not found.
Error:(11) resource string/app_name (aka me.marcusc.practiceandriod:string/app_name) not found.
Error:(11) resource mipmap/ic_launcher_round (aka me.marcusc.practiceandriod:mipmap/ic_launcher_round) not found.
Error:(11) resource style/AppTheme (aka me.marcusc.practiceandriod:style/AppTheme) not found.
Error:failed processing manifest.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task ':app:processDebugResources'.
> Failed to execute aapt
答案 0 :(得分:1)
Gradle在编译时遇到单个错误后,有时会遇到同步问题。
尝试运行以下命令集:
Build > Clean Project
Build > Rebuild Project
Run > Run 'app'
如果这不仅仅是delete
项目中的构建文件夹并运行
Build > Make Project