简体   繁体   English

使用PhoneGap创建项目的问题

[英]Issue with creating a project using PhoneGap

After using the create command to create an android project in command prompt I get the following message: 使用create命令在命令提示符下创建一个android项目后,我得到以下消息:

You do not have any android targets setup. 您没有设置任何Android目标。 Please create at least one target with the 'android' command. 请使用'android'命令创建至少一个目标。

I'm not sure what this means and any help would be appreciated! 我不确定这意味着什么,任何帮助将不胜感激!

I fixed the error running the create command with my prompt pointing to "tools" folder. 我修复了运行create命令的错误,我的提示指向“tools”文件夹。 In this case, the command is able to check the targets that I had created before. 在这种情况下,该命令可以检查我之前创建的目标。 Example: 例:

D:\adt-bundle-windows-x86_64-20130514\sdk\tools> d:\phonegap-2.7.0\lib\android\bi
n\create d:\AndroidWorkspace\<Project Name> <project package> <activity>

Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

Creating new android project...
Copying template files...
Copying js, jar & config.xml files...
Copying cordova command tools...
Updating AndroidManifest.xml and Main Activity...

You need to specify the target API in your create 您需要在create中指定目标API

http://edoceo.com/notabene/android-phonegap-cli http://edoceo.com/notabene/android-phonegap-cli

android create project \
    --name 'Android_PhoneGap_EXample' \
    --target 12 \
    --path . \
    --package 'com.edoceo.apgex' \
    --activity 'APGEX_Activity'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM