android - 编译 ApiDemos Android 4.4

标签 android eclipse

我正在尝试为 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/

相关文章:

android - 将 ImageView 更改为黑色和白色而不是可绘制对象

java - ResourceHandler 停止托管带有 jetty 9 的文件 - 404 未找到错误(适用于 jetty 8)

java - Android:资源不包含资源编号 0x 的包

linux - Tomcat7 日志记录 hell - 为什么会出现两种不同的格式?

android - 世博会( react native ): Statusbar is not showing on android and adds a padding top

android - 下载内容的缓存与数据存储

android - DDMS 分配跟踪器中缺少列

android - 为什么在构建APK后我的EXPO应用程序崩溃

Android Eclipse DDMS - 如何删除设备上的目录?

java - Eclipse Linux 无法将 Spring boot 项目识别为 Eclipse Window