Jay Scott
Jay Scott

Reputation: 26

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:

You do not have any android targets setup. Please create at least one target with the 'android' command.

I'm not sure what this means and any help would be appreciated!

Upvotes: 1

Views: 1223

Answers (2)

luizs81
luizs81

Reputation: 397

I fixed the error running the create command with my prompt pointing to "tools" folder. 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...

Upvotes: 3

ElefantPhace
ElefantPhace

Reputation: 3814

You need to specify the target API in your create

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

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

Upvotes: 0

Related Questions