Unable to add the android platform in netbean 6.5 (contains OBSOLETE and WRONG suggestions)

  17 posts   Feedicon  
Replies: 16 - Last Post: October 05, 2009 16:29
by: AmitKumarDubey
showing 1 - 17 of 17
 
Posted: April 28, 2009 07:27 by hanwee
Just installed the Android plugin for Netbeans and the Android SDK.
I am following the steps at http://wiki.netbeans.org/IntroAndroidDevNetBeans


but i cannot add the android platform in the diag 'add java platform'

i'm using vista ultimate ,jdk_1.6_update13,netbean6.5

i cannot build any project.

please ,help.
 
Posted: April 28, 2009 14:28 by trauter
youre using android 1.5 right? its because the new file structure in the android folder.

simply cut and paste the yourandroidlocation/platforms/android-1.1 or android-1.5 (what you prefer) folder to the yourandroidlocation/. no files will be overwritten and now the android.jar and the other folders are on the right position.

tr
 
Posted: May 02, 2009 01:04 by mbaranczak
Sorry, didn't work for me.

I have NetBeans 6.5 on Ubuntu. I installed the Android SDK under /usr/local/android/android-sdk-linux_x86-1.5_r1. I moved the platforms/android-1.5 directory to the parent directory, and the NetBeans platform wizard still won't let me select the SDK directory (or the android-1.5 directory, or anything else).

Is this what you were talking about? Or did you mean that I should copy the contents of platforms/android-1.5 to the root SDK directory? Because if so, I would, in fact, have to overwrite some of the stuff that's in there.
 
Posted: July 24, 2009 04:03 by radim
Don't do this. No linking, copying. Android 1.5 SDK is supported in current versions.
 
Posted: April 29, 2009 18:39 by teifrgi
I h!
I have the same configuration and the same problem!

Still looking around for a solution!
Pls, let me know in case you solve!

Thx!
 
Posted: April 28, 2009 09:59 by javafxdude
Have a look at this. Not sure if it helps...
http://javadude.wordpress.com/2009/02/21/how-to-get-started-with-android-and-netbeans/
 
Posted: April 30, 2009 14:48 by twilightwolf90
Android 1.5 is very different from 1.1. I believe that it is totally incompatible, structure-wise.

I'll have a better answer tonight, when I actually get the SDK installed on my dev machine. I have 1.1 working fine, but the lack of internet at home hasn't helped.

Course... that come after I finish building my own copy of Android out of the repo... Yay for 64-bit arc... </sarcasm>


EDIT~ Are you using 64- or 32-bit architecture? Android works best in 32-bit...
 
Posted: May 02, 2009 22:41 by manawiz
I was able to set up the 1.5 platform on debian (squeeze) with no problems, either using the 1.5 version:

chuck@fire-mana:~/OpenSource/Google/android/android-sdk-linux_x86-1.5_r1$ cp -r platforms/android-1.5/* ./

or the 1.1 version:

chuck@fire-mana:~/OpenSource/Google/android/android-sdk-linux_x86-1.5_r1$ cp -r platforms/android-1.1/* ./

I can build a simple project in either config, but run hangs, failing to ever bring up the emulator in both cases. All works fine with my native 1.1 sdk. It seems likely that changes are required to the NB Android plug-in, although perhaps a little more effort will find a work-around.
 
Posted: May 02, 2009 23:11 by manawiz
OK, the rest was easy. Here are the complete steps:

1. Configure 1.5 sdk to use the 1.5 target in a way that the NB Android platform expects:

chuck@fire-mana:~/OpenSource/Google/android/android-sdk-linux_x86-1.5_r1$ cp -r platforms/android-1.5/* ./

Now you can create the Android_1.5 platform in NB Tools - Java Platforms. Creating and building Android projects now works fine.

2. To run an Android project you net to set up an Android Virtual Device:

chuck@fire-mana:~/OpenSource/Google/android/android-sdk-linux_x86-1.5_r1$ android create avd -n avd_1.5_1 -t 2

Target 2 (-t 2) is Android_1.5 in my sdk install (see below).

3. The NB Android project build needs to be extended to specify the virtual device:

Edit your project's build.xml file and add this:

<target name="-pre-init">
<property name="emulator.options" value="-avd avd_1.5_1"/>
</target>

After this at least a simple app runs fine. I did experience one issue in the case where Run had to start the emulator, failing with package manager not ready to install packages. I expect that was a timeout or similar glitch. Simply do Run a second time (now with emulator up from the first Run) and the app ran fine.

Addenum with some useful commands to see what's going on:

chuck@fire-mana:~/OpenSource/Google/android/android-sdk-linux_x86-1.5_r1$ android list target
Available Android targets:
id: 1
Name: Android 1.1
Type: Platform
API level: 2
Skins: HVGA (default), QVGA-L, HVGA-P, QVGA-P, HVGA-L
id: 2
Name: Android 1.5
Type: Platform
API level: 3
Skins: HVGA (default), QVGA-L, HVGA-P, QVGA-P, HVGA-L
id: 3
Name: Google APIs
Type: Add-On
Vendor: Google Inc.
Description: Android + Google APIs
Based on Android 1.5 (API level 3)
Libraries:
* com.google.android.maps (maps.jar)
API for Google Maps
Skins: QVGA-P, HVGA-L, HVGA (default), QVGA-L, HVGA-P

chuck@fire-mana:~/OpenSource/Google/android/android-sdk-linux_x86-1.5_r1$ android list avd
Available Android Virtual Devices:
Name: avd_1.5_1
Path: /home/chuck/.android/avd/avd_1.5_1.avd
Target: Android 1.5 (API level 3)
Skin: HVGA
 
Posted: May 03, 2009 12:07 by teifrgi
Ciao Manawiz!
thanks, I'll check and let u know!

Giovanni
 
Posted: May 09, 2009 21:24 by teifrgi
Hi manaviz!
thanks for your insights!

It works...at the list the simplest code.

When I try to include the following (from http://wiki.netbeans.org/IntroAndroidDevNetBeans)

TextView tv = new TextView(this);
tv.setText("Hello, Android");
setContentView(tv);

I get the following errors:

Error cannot find symbol symbol : constructor TextView(org.me.helloworld.MainActivity) location: class org.me.helloworld.TextView MainActivity.java 21 home/giovanni/NetBeansProjects/HelloWorld/src/org/me/helloworld

Error cannot find symbol symbol : method setText(java.lang.String) location: class org.me.helloworld.TextView MainActivity.java 22 home/giovanni/NetBeansProjects/HelloWorld/src/org/me/helloworld

Error cannot find symbol symbol : method setContentView(org.me.helloworld.TextView) location: class org.me.helloworld.MainActivity MainActivity.java 23 home/giovanni/NetBeansProjects/HelloWorld/src/org/me/helloworld

Any idea how to fix?

Many thx! ...I think there is something to do to include Android 1.5 into Neatbean6.5 Frown

Many thx!
 
Posted: May 11, 2009 06:03 by toddbrunhoff
Although the basis for your description above is clear (copy platform tree to the top of the android distribution tree) this appears not to work on Windows. I am currently using NB 6.7M3 (see below) which may be relevant. I have also loaded the source code for this plugin and successfully compiled and run it... still not able to add the android platform.

Something that is a bit mysterious is the lack of a definition for what contents in a folder makes it appear (to netbeans) as a platform. From your description, it would seem that a folder that contained a folder named android-1.5 as a top level child is the defining factor. But it is either more than this or the 6.7M3 version requires something different. Perhaps you could explain this.

Todd

Product Version: NetBeans IDE Dev (Build 200904011705)
Java: 1.6.0_05; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Userdir: C:\Documents and Settings\toddb\.netbeans\6.7m3
 
Posted: May 14, 2009 10:58 by PaoloCorno
Go into the folder you have installed Android SDK

ln -s platforms/android-1.5/android.jar android.jar
cd tools
ln -s ../platforms/android-1.5/tools/aapt aapt
ln -s ../platforms/android-1.5/tools/aidl aidl
ln -s ../platforms/android-1.5/tools/dexdump dexdump
ln -s ../platforms/android-1.5/tools/dx dx
cd lib
ln -s ../../platforms/android-1.5/tools/lib/dx.jar dx.jar

It seems that it works

Cheers
 
Posted: May 15, 2009 14:46 by xooox
but how can I configure in windows? all you say is about in linux,so I still confused
 
Posted: May 19, 2009 09:46 by EliteMonk
For windows:

copy .\platforms\android-1.5\android.jar .\
cd .\tools
copy ..\platforms\android-1.5\tools\aapt.exe .\
copy ..\platforms\android-1.5\tools\aidl.exe .\
copy ..\platforms\android-1.5\tools\dexdump.exe .\
copy ..\platforms\android-1.5\tools\dx.bat .\
cd .\lib
copy ..\..\platforms\android-1.5\tools\lib\dx.jar .\
pause
 
Posted: July 24, 2009 04:05 by radim
Again: Ignore these instructions - Android SDK 1.5 is working in current version of plugin.
 
Posted: October 05, 2009 16:29 by AmitKumarDubey
Hi radim,
i am facing the same problem..

i am working in ubuntu and using Netbeans 6.7.1.I have done as below..

root@amitbugs-laptop:~/MYFOLDER/android-sdk-linux_x86-1.5_r1/tools# ./android create avd -n Amit_Phone -t 2

root@amitbugs-laptop:~/MYFOLDER/android-sdk-linux_x86-1.5_r1/tools# ./android list avd
Available Android Virtual Devices:
Name: Amit_Phone
Path: /root/.android/avd/Amit_Phone.avd
Target: Android 1.5 (API level 3)
Skin: HVGA

but still it could not find the AVD while running android application..while running this project instead of opening the emulator, select device screen is opening with two radio button option i) select running device ii) start AVD. Both of them doesn't have any device list on it. And OK button on that screen has always disabled. i able to do only cancel.

Any idea..??
showing 1 - 17 of 17
Replies: 16 - Last Post: October 05, 2009 16:29
by: AmitKumarDubey
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close