Skip to main content

How to create an android sub project?

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
4 replies [Last post]
hotszkin
Offline
Joined: 2008-11-23

I have just create a tiny project from the latest resource editor. I am very impressive about the "Generate netbean project" fucntion. As I've never make a RIM program before, now I can easy create a running RIM program with the help of this function. All I need to do is to install "blackberry jdes" then resolve reference problem in netbean, and then a RIM program can be run. No need to worry about things mentioned here http://lwuit.blogspot.com/2009/11/building-project-on-blackberry.html :)

In the mean while, only desktop, midp and rim subproject are created. Is there a way such that I can create an android sub project in netbean after creating the project from resource editor? Or anyone can create a script to do that?

BTW, I am looking forward to see an android project can be auto generated in the near future although Shai said this in his blog

"Sadly we aren't allowed to even discuss Android right now, my personal device is a Nexus One though and Thorsten's port run's quite well on it. We would love to release an official Android port but the decision is not in our hands."

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
thorsten_s
Offline
Joined: 2008-08-15

You could use the following netbeans project and build yourself a more or less empty template project:

http://www.pader-sync.com/LWUITDemo.zip

You should probably remove the LWUIT sources that are directly part of the project and add project dependencies to your LWUIT copy. The build.xml file contains a few targets to build and install android binaries.

essequadra
Offline
Joined: 2011-09-09

Hi,
sorry for my bad english

I'have been trying to execute your demo application, but I received this mistake at run-time:
"An internal application error occurred: java.lang.NullPointerException"
I have tryed to do both NetBeans and Eclipse, but the error is the same.

I used "LWUIT_1_5" rev. 1581 (modifyed whith Thorson's port "android" rev. 163), NetBeans 7.0.1 and latest nbandroid.

can you help me?

essequadra
Offline
Joined: 2011-09-09

Hi,
I've solve my problem.
I created a new folder in the root of project and I named it "assets". After I moved res files into new folder.
Now all work right.

hotszkin
Offline
Joined: 2008-11-23

Hi thorsten_s,

I have download the LWUITDemo and open the project in netbean. It said that android.jar/"UI"/"IO"/"LWUIT_Android_incubator" project (in LWUITDemo) could not be found. I can only resolve the android.jar reference. I think the problem may be solved by what you said "You should probably remove the LWUIT sources that are directly part of the project and add project dependencies to your LWUIT copy". But I can't get it work after many attempt. Wouild you please give me more detail steps?

Thanks