在 Intellij idea 中使用 android.support.v4 库
2022-09-01 19:41:06
在我的Android项目中,我试图使用.android.support.v4.widget.DrawerLayout
在它之前,我将其添加到库中(libs
cp MySdkForder/extras/android/support/v4/android-support-v4.jar MyProjectFolder/libs
)
之后,我将其添加到如下所示:classpath
所以我在我的文件中有一个这样的代码main.xml
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ListView android:id="@+id/left_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:background="#111" />
</android.support.v4.widget.DrawerLayout>
这个我带了一个地方developer.android.com
想法使这段代码完全正常
当我尝试启动它时,问题就开始了。当我按下时,我有以下错误run
adb
Cannot reload AVD list: cvc-enumeration-valid: Value '280dpi' is not facet-valid with respect to enumeration '[ldpi, mdpi, tvdpi, hdpi, xhdpi, 400dpi, xxhdpi, 560dpi, xxxhdpi]'. It must be a value from the enumeration.
Error parsing /usr/lib/android/android-sdk-linux/system-images/android-22/android-wear/armeabi-v7a/devices.xml
cvc-enumeration-valid: Value '280dpi' is not facet-valid with respect to enumeration '[ldpi, mdpi, tvdpi, hdpi, xhdpi, 400dpi, xxhdpi, 560dpi, xxxhdpi]'. It must be a value from the enumeration.
Error parsing /usr/lib/android/android-sdk-linux/system-images/android-22/android-wear/x86/devices.xml
cvc-enumeration-valid: Value '280dpi' is not facet-valid with respect to enumeration '[ldpi, mdpi, tvdpi, hdpi, xhdpi, 400dpi, xxhdpi, 560dpi, xxxhdpi]'. It must be a value from the enumeration.
Error parsing /usr/lib/android/android-sdk-linux/system-images/android-22/android-wear/armeabi-v7a/devices.xml
cvc-enumeration-valid: Value '280dpi' is not facet-valid with respect to enumeration '[ldpi, mdpi, tvdpi, hdpi, xhdpi, 400dpi, xxhdpi, 560dpi, xxxhdpi]'. It must be a value from the enumeration.
Error parsing /usr/lib/android/android-sdk-linux/system-images/android-22/android-wear/x86/devices.xm
它看起来像这样
有趣的是,我甚至无法关闭它(它一次又一次地出现)。但这不是我的问题。问题是如何做到这一点?因为我认为我已经做了我需要的一切(将此库添加到并建立了依赖项),但仍然不想工作(如果我不使用,它绝对可以正常工作,只是标准功能)android.support.v4
libs
adb
android.support.v4