我制作了AVD(Android虚拟设备)。 但是当我尝试运行我的应用程序时,会显示:
您的项目包含错误,请在运行您的应用程序之前修复它们。
错误日志显示以下内容: NUMBER 1:res \ drawable-mdpi \ testbackg.png:0:错误:已定义资源条目testbackg。 NUMBER 2:res \ drawable-mdpi \ testbackg.jpg:0:最初在这里定义。 NUMBER 3:C:\ Users \ Svein Inge \ Android Eclipse \ Test 1 \ res \ layout \ main.xml:2:错误:错误:找不到与给定名称匹配的资源(在'background'处,带值'@ drawable / testbackg.png')。
这是我的代码(main.xml)
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/testbackg.png"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/open" />
</LinearLayout>
帮助