[Documentation] [TitleIndex] [WordIndex

Android Studio

Importing

Importing projects into studio:

Building

See the faq above about incremental compilations. It doesn't do them, but intelligently updates the ide with knowledge about changes without actually compiling.

To compile, right click a build.gradle file somewhere (e.g. some subproject) and tell it to make or compile, or go to the Build dropdown in the upper menu. To clean your projects Build->Rebuild Project.

Running

For convenience, I usually setup two or three variations on the configuration for an android application - make/deploy/launch, deploy/launch and deploy only. Connect your device and then choose your configuration from the mini run menu on the toolbar at the top.

Debugging

Logcat

Use the monitor via the android studio menu, Tools->Monitor. Here you can filter logcat by application name (e.g. org.rocon.android.apps.robot_remocon).

Debugger

The toolbar at the top of the ide lets you define configurations for debug/run executions. Debug execution lets you set breakpoints and move through as usual. However, if you have code which is in binary compiled .aar's (of which there is alot), you'll need to associate those .aar's with source locations.

Troubleshooting

v0.1.7 Build Errors

No ANDROID_HOME, duplicate classes, not found - all sorts of errors introduced in 0.1.7 when it disabled external builds. Simply re-enable them in File->Settings->Compiler.


2023-10-28 13:04