所以我无法执行该项目由于此错误。现在,我尝试了以下在这里看到的技术: - 重建并清理了项目 - 重新开始的Android Studio - 创建新项目并读取文件,在添加每个主要文件后运行项目。AndroidStudio-无法运行项目,因为“无法解析符号R”
现在,第三个问题给了我一些线索。当我添加了一个片段,并把一些代码并运行项目,我得到了以下2个错误:
错误:(1)错误解析XML:执行失败:XML格式不正确
错误申报任务':app:processDebugResources'。
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Temp\AppData\Local\Android\sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1
当我打开控制台的gradle我看到以下内容:
失败:建立失败,一个例外。
出了什么问题: 执行失败的任务 ':应用程序:processDebugResources'。
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Temp\AppData\Local\Android\sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1
尝试: 与--stacktrace选项获取堆栈跟踪运行。使用--info或--debug选项运行以获取更多日志输出。
我是一名初学者程序员,所以我不太确定该怎么做。
任何帮助将不胜感激。我重视从下面的fragment.xlm代码:
<?xml verion="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:id="@+id/textTitle"
android:text="" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="@+id/textDescription" />
</LinearLayout>
三江源这么多,就是这样一个愚蠢的错误,对不起:( – Frosty619
不客气我们已经这样做所有的错误在一个点或另一个,所以不用担心。 – joshgoldeneagle