Cordova 版本:请安装 Android 目标:“android-22".我不想要 android-22.我想要 android-19 - 我该怎么办? [英] Cordova build: Please install Android target: "android-22". I dont want android-22. I want android-19 - what do I do?

查看:30
本文介绍了Cordova 版本:请安装 Android 目标:“android-22".我不想要 android-22.我想要 android-19 - 我该怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的 phonegap 设置和构建我的第一个应用而苦苦挣扎.

I'm struggling with my phonegap setup and building my first app.

我创建了一个 hello1 项目.我添加了android项目

I created a hello1 project. I added the android project

平台android已经添加

Platform android already added

现在,当我运行cordova构建时,出现错误 -

Now when I run the cordova build, I get the error -

错误:请安装 Android 目标:android-22"

Error: Please install Android target: "android-22"

我没有 android-22.我确实有 android-19.我希望我的项目使用 android-19 构建.我怎样才能做到这一点?

I do not have android-22. I do have android-19. I want my project to be built with android-19. How can I make that happen?

我卸载了 android-22(为了解决更大的问题).我不明白我应该更改哪个文件才能使其正常工作.项目中的 project.properties 出现在这一步之后,它自动包含目标为 android-22.

I had android-22 which I uninstalled (for fixing a bigger problem). I do not understand which file should I be making a change in for this to work. The project.properties in the project comes after this step and it automatically contains the target as android-22.

我已正确添加了我的 env 变量.C:Usersuserandroid-sdksplatform-tools;C:Usersuserandroid-sdks ools

I have added my env variables correctly. C:Usersuserandroid-sdksplatform-tools;C:Usersuserandroid-sdks ools

没用.这只是我试图调试的一个更大问题的一部分.请帮忙.

It doesn't help. This is just part of a bigger problem that I'm trying to debug. Please help.

推荐答案

For SDK 21 ("android-21")

$ cordova platforms remove android
$ cordova platforms add android@3.7.1

对于 SDK 22(Android 4.1.1,"android-22")

For SDK 22 (Android 4.1.1, "android-22")

$ cordova platforms remove android
$ cordova platforms add android@4.1.1

更多信息:https://cordova.apache.org/公告/2015/07/21/cordova-android-4.1.0.html

这篇关于Cordova 版本:请安装 Android 目标:“android-22".我不想要 android-22.我想要 android-19 - 我该怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆