cordova build android 出错?在打包APP的时候出错
伊谢尔伦
伊谢尔伦 2017-04-17 16:55:21
[Android讨论组]
伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

全部回复(4)
ringa_lee

里面提示的非常清楚了,它说你打包 缺少必要的环境。

  1. 可能 android 的环境变量没有配置

  2. 需要 安装 Android build tools 版本大于等于 19.1.0

点击这里下载

补充信息

  1. 你好这里的 android-23 不是不是指 Android SDK Tools 而是指 android-sdk 的api等级。比如说,你的 android5.0(API 21) 它就是 android-21
    具体查看下图:

  2. 为了解决这个问题,你可以修改你现有的 android 项目的指定版本即可(修改project.properties文件即可)。具体查看下图:

3月4日补充

  1. android list 提示无法载入你之前创建的 emulator 模拟器,建议你删除它,再执行此命令。(另外我推荐一款软件。Genymotion 会比 emulator 性能更高。)

  2. 修改android 的 target 版本,不一定要按照我的截图来,你需要根据你实际安装的sdk api 版本来指定。因为我是使用 android studio 修改 project.properties 会自动刷新整个项目.
    在 project.properties 里面有这样一段话:

# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
你如果想自定义属性使用 ant 编译系统请修改 ant.properties 文件,覆盖和调整属性值在你的项目结构中。(翻译的不好,也就是说,你如果不使用IDE的话,需要自己建立ant.properties)

高洛峰

ERROR building one of the platforms: Please install Android target: "android-23".

Hint: Open the SDK manager by running: "C:\Program Files (x86)\Android\android-sdk\tools\android.bat"
You will require:

  1. "SDK Platform" for android-23

  2. "Android SDK Platform-tools (latest)

  3. "Android SDK Build-tools" (latest)
    You may not have the required environment or OS to build this project

我按照你给的链接更新过,可是还是出错。好象说缺少了android-23??版本不是最更的?
我已经更新到最新的吧?

大家讲道理

我也是碰到了这个问题,我重新start了一个项目就能成功。我把www替换进去,还是失败。于是我逐个替换我改动过的www文件,打包成功了

大家讲道理

android环境配置问题,具体可以看看代码山—android打包环境基本配置

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号