[Documentation] [TitleIndex] [WordIndex

Android Studio

Some of this may no longer be relevant given how fast Android Studio releases have been happening.

Overview

Importing

Two ways to import projects from the android studio welcome window:

  1. Open an existing project
    • Point at the settings.gradle file, not the root directory of your gradle project.

  2. Import project (Gradle)
    • Point at the root directory of your gradle project.
    • Don't change any of the gradle settings away from the gradle wrapper configuration.

Refer to the troubleshooting section if you are having Android Studio woes.

Indexing

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.


2022-05-28 12:26