Saturday, December 14, 2013

ADT - Android Developer Tools - with Eclipse: Starters.

Here is a refresher on how to start a new project by copying an old one. In my case, I keep my projects on a Mac in Documents->Android->Workspace folder. That is my default folder for new projects. For this example I have a same, working project that compiles with no errors and runs on a Kindle via USB cable called "Notepad". You must be sure to open the Eclipse IDE correctly. I select Eclipse from Spotlight, but I have more than one installation. It has to be the ADT version. Once Eclipse is open, in the Navigator bar on the left one has to be sure the project being copied is "open" (either double click it, or ctrl-click->open project. Can close projects the same way, for faster loading of Eclipse). 1. Highlight open project -> cmd-c -> unhighlight -> cmd-v -> select name for the project. 2. ctrl-click project -> Android Tools -> Rename Application Package -> follow instructions. 3. Navigate to res->values->strings.xml->app.name to rename the app for the device. This creates a new project in the default folder, opens it in Eclipse, allows you to independently name the folder it is in, the application package, and the app on the target device. All of 3 of these names can be the same or be named independently. This allows one to revert to a project in a skeleton form, but has all the right settings, jars, and so on to allow error-free compilation and installation to the desired target device. To run, click the run button. To stop from running, go to the app page on the target device, hold your finger on the app icon to delete the app.