我正在尝试为 Android 4.4 编译 ApiDemos。
我已经修复了支持库未包含的问题。 但是,新的资源文件夹“transition”无法编译。
它表示文件夹转换的资源文件夹名称无效。
从编译的角度来看,我可以将其命名为“_transition”,而 eclipse 会忽略它。 然而,之后它就无法识别了。
R.transition
我正在使用 Android 4.4 编译该项目。
我还尝试通过更改 list 使其仅在 Android 4.4 上运行:
android:minSdkVersion="19" android:targetSdkVersion="19"
还有人能够成功编译并运行它吗?
BR, 贾希尔
编辑:根据需要
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-19
最佳答案
我有同样的问题。即使我用源项目创建一个新项目,它也不起作用。所以我安装了Android 4.3的ApiDemo,发现其中不存在文件夹转换。所以这肯定是Android 4.4的新功能。最后我发现解决方案是我的Android SDK Build-tools版本太旧,无法编译这个项目。所以你需要更新你的Build-tools。
您可以打开Android SDK Manager =>安装版本19的Android SDK Build-tools。 =>将兼容性库“android-support-v4.jar”添加到您的项目中。 希望这可以帮助您。
关于android - 编译 ApiDemos Android 4.4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19853523/