Issue Details (XML | Word | Printable)

Key: NBANDROID-72
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Duplicate
Priority: Major Major
Assignee: Unassigned
Reporter: jn0101
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
nbandroid

Create project from existing source

Created: 19/Aug/10 08:51 AM   Updated: 30/Sep/10 08:14 AM   Resolved: 19/Aug/10 01:18 PM
Component/s: None
Affects Version/s: 0.10
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. File make_nbproject.tgz (7 kB) 30/Sep/10 08:14 AM - jn0101

Issue Links:
Duplicate
 

Tags: nbandroid source


 Description  « Hide

While it's easy to create a new project from scratch there is no way to create a project from existing source code.

This would be extremely useful first to new users who want to create projects from the examples and second to active users who don't save project files in version repositories.

Please see http://kenai.com/projects/nbandroid/forums/forum/topics/3051-Create-project-from-existing-source#p8441



jglick added a comment - 19/Aug/10 01:18 PM

Already working on using standard Android project layout, in which case you would just open your sources directly from Open Project.


jn0101 added a comment - 30/Sep/10 07:37 AM

Until http://kenai.com/jira/browse/NBANDROID-65 is fixed, Ive made a small script to create netbeans projects from existing sources.

To run the script you need Linux.
The generated projects have been reported to work fine on Windows as well.

I have generated Netbeans projects for the Android SDK samples and also http://pragprog.com/titles/eband3/source_code and a few other projects. As this is a temporary fix until the much longed http://kenai.com/jira/browse/NBANDROID-65 is fixed I think I wont post them.


jn0101 added a comment - 30/Sep/10 08:14 AM

Works on Linux and probably also Mac.

Generated projects works also on Windows.

Install: Unpack the file in your home folder:

cd ~
tar -xzvf make_nbproject.tgz

Use: Now go to a directory with samples you want to open in Netbeans. For example:

cd android/android-sdk-linux_86/samples/android-8/Notepad/

Execute the script:

~/bin/make_nbproject

In Netbeans, choose File | Open Project and open it. The Android platform is called "Android", you will probable want to change that (Project Properties | Libraries).

To mass convert a lot of projects, you can do e.g.

cd android/android-sdk-linux_86/samples/android-8/
for i in *; do (cd $i && ~/bin/make_nbproject && cd ..); done

Jacob