我正在尝试为PhoneGap Android实现一个包含9个补丁的闪屏,但我一直收到编译器异常。
我有一个res/drawables/splash.xml文件,其中包含:
<nine-patch xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/splashimg"
android:dither="false"/>我已经将splashimg.9.png保存到res/drawable。(使用取自Android splash screen image sizes to fit all devices的a test 9-patch image )
我的DroidGap文件中有以下内容:
super.setIntegerProperty("splashscreen", R.drawable.splash);然而,当我尝试构建时,我得到了:
org.xmlpull.v1.XmlPullParserException: Binary XML file line #1: <nine-patch> requires a valid 9-patch source image有什么想法吗?我可以得到一个正常的闪屏,但不是一个9-补丁...
发布于 2013-05-28 00:50:56
找到了问题所在。我在res/drawable目录中只有XML和9.png文件。当我将它们放到其他四个目录中时,一切都开始正常工作。
https://stackoverflow.com/questions/16718552
复制相似问题