Questions tagged [android]

Android is Google's mobile operating system, used for programming or developing digital devices (Smartphones, Tablets, Automobiles, TVs, Wear, Glass, IoT). For topics related to Android, use Android-specific tags such as android-intent, android-activity, android-adapter, etc. For questions other than development or programming but related to the Android framework, use this link:

Android is a mobile operating system developed by a consortium of developers known as the Open Handset Alliance, with the main contributor and commercial marketer being Google. It is based on a modified version of the Linux kernel and other open source software and is designed primarily for touchscreen mobile devices such as smartphones and tablets. In addition, Google has further developed Android TV for televisions, Android Auto for cars, and Wear OS for wrist watches, each with a specialized user interface. Variants of Android are also used on game consoles, digital cameras, PCs, and other electronics.

Tag Usage

When asking about your app force closing or crashing, you have to include an MCVE, which has to include a stacktrace. See also: How to Ask

When adding additional tags to questions, please use the Android-specific tags such as , , , and not individual tags like , or .

For non-developer Android questions, see Android Enthusiasts Stack Exchange.

Manufacturer-Monitored Tags

These tags are used for developer assistance by Android device manufacturers for their specific devices:

ISV-Monitored Tags

These tags are meant for libraries, services, etc. for Android that are monitored by their respective developers:

( (now deprecated))


Android Versions

Official API Documentation


Source Code and Building


Playlist of videos for Google I/O.

  • Android Tools Project Site
    On this site, you will find information about the Developer Tools for Android (Dalvik Debug Monitor Server (DDMS), hierarchy viewer, lint) and various tips & how-to documents.

In addition, there are other Android developer support sites, operating in other languages.

For non-developer questions, see the Android Enthusiasts Stack Exchange site.

Android Programming Books

Android Loggers

  • logger - Simple, pretty and powerful logger for android
  • timber - A logger with a small, extensible API that provides utility on top of Android's normal Log class.
  • LoggingInterceptor - An OkHttp interceptor which pretty logs request and response data.
  • Bugfender - Upload your logs and check them online, specially made for mobile
  • EzyLogger - Simple Lightweight logger
  • Logback Android - Logback port to Android which provides a highly configurable logging framework for Android apps.

Chat Rooms

Chat about Android with other Stack Overflow users:

Stack Exchange


Development IDEs

Tutorials & Examples

Online Courses

Online Specialization Verified Courses

Sites that list Android libraries

Open-sourced Android apps


Podcasts for Android


Frequently Asked Questions

1409497 questions
32 answers

What is the difference between px, dip, dp, and sp?

What is the difference between the units of measure px, dip, dp, and sp?
128 answers

How to close/hide the Android soft keyboard programmatically?

I have an EditText and a Button in my layout. After writing in the edit field and clicking on the Button, I want to hide the virtual keyboard when touching outside the keyboard. I assume that this is a simple piece of code, but where can I find an…
12 answers

Proper use cases for Android UserManager.isUserAGoat()?

I was looking at the new APIs introduced in Android 4.2. While looking at the UserManager class I came across the following method: public boolean isUserAGoat() Used to determine whether the user making this call is subject to…
Ovidiu Latcu
  • 71,607
  • 15
  • 76
  • 84
77 answers

Why is the Android emulator so slow? How can we speed up the Android emulator?

I have got a 2.67  GHz Celeron processor, and 1.21  GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android Emulator should start fairly quickly on such a machine, but for me, it doesn't. I have followed all the…
  • 3,451
  • 3
  • 16
  • 3
54 answers

How to stop EditText from gaining focus when an activity starts in Android?

I have an Activity in Android, with two elements: EditText ListView When my Activity starts, the EditText immediately has the input focus (flashing cursor). I don't want any control to have input focus at startup. I…
  • 39,551
  • 15
  • 41
  • 47
54 answers

Is there a unique Android device ID?

Do Android devices have a unique ID, and if so, what is a simple way to access it using Java?
  • 31,237
  • 8
  • 21
  • 22
35 answers

How can I save an activity state using the save instance state?

I've been working on the Android SDK platform, and it is a little unclear how to save an application's state. So given this minor re-tooling of the 'Hello, Android' example: package; import; import…
  • 45,296
  • 18
  • 54
  • 69
64 answers

How can I fix 'android.os.NetworkOnMainThreadException'?

I got an error while running my Android project for RssReader. Code: URL url = new URL(urlToRssFeed); SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParser parser = factory.newSAXParser(); XMLReader xmlreader =…
bejoy george
  • 29,385
  • 5
  • 19
  • 15
74 answers

How do I center text horizontally and vertically in a TextView?

How do I center the text horizontally and vertically in a TextView, so that it appears exactly in the middle of the TextView in Android?
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
32 answers

What is 'Context' on Android?

In Android programming, what exactly is a Context class and what is it used for? I read about it on the developer site, but I am unable to understand it clearly.
  • 23,191
  • 4
  • 18
  • 9
23 answers

Is there a way to run Python on Android?

We are working on an S60 version and this platform has a nice Python API.. However, there is nothing official about Python on Android, but since Jython exists, is there a way to let the snake and the robot work together??
Bite code
  • 578,959
  • 113
  • 301
  • 329
41 answers

How to lazy load images in ListView in Android

I am using a ListView to display some images and captions associated with those images. I am getting the images from the Internet. Is there a way to lazy load images so while the text displays, the UI is not blocked and images are displayed as they…
  • 70,519
  • 61
  • 198
  • 274
18 answers

"Debug certificate expired" error in Eclipse Android plugins

I am using Eclipse Android plugins to build a project, but I am getting this error in the console window: [2010-02-03 10:31:14 - androidVNC]Error generating final archive: Debug certificate expired on 1/30/10 2:35 PM! How do I fix it?
  • 154,439
  • 43
  • 83
  • 99
46 answers

How to get screen dimensions as pixels in Android

I created some custom elements, and I want to programmatically place them to the upper right corner (n pixels from the top edge and m pixels from the right edge). Therefore I need to get the screen width and screen height and then set position: int…
Niko Gamulin
  • 66,025
  • 95
  • 221
  • 286
37 answers

Android 8: Cleartext HTTP traffic not permitted

I had reports from users with Android 8 that my app (that uses back-end feed) does not show content. After investigation I found following Exception happening on Android 8: 08-29 12:03:11.246 11285-11285/ E/: [12:03:11.245, main]: Exception:…
  • 16,880
  • 3
  • 13
  • 11
2 3
99 100