This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 215526 - PhoneGap build does not work if using Android platform other than version 4.0.3
Summary: PhoneGap build does not work if using Android platform other than version 4.0.3
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: HTML Project (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: Jan Becicka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-13 15:32 UTC by Petr Jiricka
Modified: 2012-07-16 10:05 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2012-07-13 15:32:03 UTC
1. Install Android SDK and download the Android 2.3.3 platform
2. Register PhoneGap and Android SDK in the IDE
3. Create a PhoneGap application
4. Change configuration to Android emulator or device
5. Run the application

Build fails with the following Ant output:

ant -f /Users/petrjiricka/NetBeansProjects/PhoneGap1/nbproject -Dcordova.version=1.8.1 -Dcordova.home=/Users/petrjiricka/software/phonegap-phonegap-ce32a3f -Dandroid.sdk.home=/Users/petrjiricka/software/android-sdk-macosx -Dandroid.target.device.arg=-d sim-android
create-android:
Error: Target id is not valid. Use 'android list targets' to get the target ids.
Result: 1
Copying 1 file to /Users/petrjiricka/NetBeansProjects/PhoneGap1/build/android/PhoneGap1/libs
Copying 2 files to /Users/petrjiricka/NetBeansProjects/PhoneGap1/build/android/PhoneGap1/res/xml
/Users/petrjiricka/NetBeansProjects/PhoneGap1/nbproject/build.xml:36: Replace: source file /Users/petrjiricka/NetBeansProjects/PhoneGap1/build/android/PhoneGap1/AndroidManifest.xml doesn't exist
BUILD FAILED (total time: 1 second)


This is because build.properties has android.build.target=android-15, but my target (obtained by 'android list targets') is:

Available Android targets:
----------
id: 1 or "android-10"
     Name: Android 2.3.3
     Type: Platform
     API level: 10
     Revision: 2
     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WVGA800 (default), WVGA854
     ABIs : armeabi


The workaround is to change android.build.target in build.properties to android-10.