You can use a third party JAR in your application by adding it to your Eclipse project as follows:
Alternatively, if you want to include third party JARs with your package, create a new directory for them within your project and select Add Library... instead.
It is not necessary to put external JARs in the assets folder.
Android calls a number of callbacks to let you draw your screen, store data before pausing, and refresh data after closing. You must implement at least some of these methods. See Building an Android Sample Application for more information on using activitycreator.py.
MyApp/ |
|
AndroidManifest.xml | (required) Advertises the screens that this application provides, where they can be launched (from the main program menu or elsewhere), any content providers it implements and what kind of data they handle, where the implementation classes are, and other application-wide information. Syntax details for this file are described in Layout Resources for the syntax of these files. |
values/ arrays classes.xml colors.xml dimens.xml strings.xml styles.xml values.xml |
(optional) XML files describing additional resources such as strings, colors, and styles. The naming, quantity, and number of these files are not enforced--any XML file is compiled, but these are the standard names given to these files. However, the syntax of these files is prescribed by Android, and described in Resources. |
xml/ | (optional) XML files that can be read at run time on the device. |
raw/ | (optional) Any files to be copied directly to the device. |
To write log messages from your application:
android.util.Log
.Log.v()
, Log.d()
, Log.i()
,
Log.w()
, or Log.e()
to log messages.
(See the Log class.)Log.e(this.toString(), "error: " + err.toString())
ddms
in your Android SDK /tools
path.Note: If you are running Eclipse and encounter a warning about the VM debug port when opening DDMS, you can ignore it if you're only interested in logs. However, if you want to further inspect and control your processes from DDMS, then you should close Eclipse before launching DDMS so that it may use the VM debugging port.