为什么我在编译时不能将 android 平台设置为低于 22?
Why I can't set android-platform lower then 22 when I compile?
当我编译由cocos控制台(cocos2d-x 3.6
)和--ap android-16
(android平台16)创建的标准hello-world项目时,它写下:
The android-platform of project "E:projectscocos_projectstestproj.android" s
hould be equal/larger than 22, but 16 is specified.
在AndroidManifest.xml中,我有:<uses-sdk android:minSdkVersion="9"/>
。
在SDK manager中,我安装了所有平台,在...sdkplatforms
中,我有8、10、15-22和MNC文件夹。
@Andrey的回答基本上是正确的,但为了其他寻找如何解决这个问题的cocos2d-x开发人员,我将用一些缺失的信息来完成它。
此错误:
项目的android平台"E:\projects\cocos_projects\test\proj.android"应等于/大于大于22,但指定了16。
当您告诉cocos
命令使用与project properties
配置冲突的Android API版本(--ap android-XX
)时显示。
假设你的proj.android/project.properties
是这样的:
target=android-22
android.library.reference.1=../cocos2d/cocos/platform/android/java
因此,在启动请求使用不同Android API版本(例如cocos compile -p android --ap android-16
)的命令之前,您应该手动编辑project.properties
并将target
密钥更改为与您要使用的新Android API版本相匹配的值。
当我修改...proj.androidproject.properties
时,它工作于
相关文章:
- 为不同配置设置MSVC_RUNTIME_LIBRARY的正确方法是什么
- 正在查找文档以获得PS4平台的C++中的设备信息
- 在C++/Linux中设置单调时钟的一些技巧
- 如何在选项卡视图Qt中设置一个新项目,并保存以前的项目
- 嵌套在类中时无法设置成员数据
- 需要帮助设置在C++中使用的Potrace
- 如何在自删除后将对象设置为nullptr
- 将指针设置为"nullptr"并不能防止双重删除?
- 如何在Ubuntu中使用cmake设置qt4
- ld:bind_at_load和-bitcode_bundle(Xcode设置ENABLE_bitcode=YES)不能
- 如何在boost beast http请求中设置http头
- 如何解决gcc编译器优化导致的centos双编译器设置中的分段错误
- 如何将这个C++哈希表转换为动态扩展和收缩,而不是使用硬设置的最大值
- 如何使用 CMake 设置 VS 平台工具集属性
- 在 MSVC 中将某些库的目标平台版本设置为 10.x 是否使程序与在 Windows Vista/7/8 上运行不兼容
- 使用 VS2010 的 msbuild 构建时,我可以从命令行设置平台工具集吗?
- 为什么我不能在visual studio 2012的调试配置中将平台设置为x64
- 如何以与平台无关的方式设置对齐
- 多平台C++项目设置和工具
- 为什么我在编译时不能将 android 平台设置为低于 22?