Questions tagged [android-studio]

Use for questions about using Android Studio, an official IDE by Google targeted at Android app development. Do NOT use for questions about programming for Android in general; instead, use the [android] tag.

Android Studio is the official Android development environment that is based on IntelliJ IDEA. Android Studio provides integrated Android developer tools for development and debugging.

Android Studio offers:

  • Gradle-based build support.
  • Clean Logcat for different packages with filtering options.
  • Android-specific refactoring and quick fixes.
  • Lint tools to catch performance, usability, version compatibility and other problems. ProGuard and app-signing capabilities.
  • Template-based wizards to create common Android designs and components.
  • A rich layout editor that allows you to drag-and-drop UI components, preview layouts on multiple screen configurations, and much more.
  • Built-in support for Google Cloud Platform, making it easy to integrate Google Cloud Messaging, App Engine, and Firebase as server-side components.
  • Android Native Development (NDK) support, including single-step debugging of JNI C++ code, code completion, Gradle build support for JNI C++ code
  • Image Asset Studio, a tool which generates a set of icons for your Android applications from an existing image, clipart, or text-string resources
  • Vector Asset Studio, a tool which enables the developer to import and manage vector graphics as a drawable resource
  • Instant preview and review of incremental code changes on the emulator or physical device without redeploying a new debug build or, in many cases, without restarting the app
  • Built-in Git Client with GitHub integration
  • New and improved Compose View Library for better alternating Layouts with different designs.
  • Various debugging and analysis tools are available: Android Profiler, Android Debug Bridge, Android Emulator, Device File Explorer, CPU Profiler, systrace, Layout Inspector, Network Profiler and an Emulator for Wear OS.

The current stable version is Android Studio Flamingo | 2022.2.1 Patch 2 May 24, 2023.

References:

Related tags for specific editions:

90012 questions
31
votes
2 answers

'kapt.generateStubs' is not used by the 'kotlin-kapt' plugin

I recently updated from Android Studio 2.3 to 3.0, and kotlin 1.1.4 to 1.1.51. Now I'm seeing this message in my gradle console: 'kapt.generateStubs' is not used by the 'kotlin-kapt' plugin I have this in my build.gradle to get my project working…
triad
  • 20,407
  • 13
  • 45
  • 50
31
votes
1 answer

expected, got '?'

When typing a SQLite statement as a string literal in a class in Android Studio, the IDE gives me this warning: " expected, got '?'". I don't understand what this means, but the code is working fine, and I'd like to disable the inspection. But…
Flarosa
  • 1,287
  • 1
  • 13
  • 27
31
votes
1 answer

Android build get error message "Emulator: OpenGL backend 'angle' without OpenGL ES 1.x library detected. Using GLESv2 only."

After running my Android project in Android Studio version 3 beta 7 I get the following error in Event log: Emulator: OpenGL backend 'angle' without OpenGL ES 1.x library detected. Using GLESv2 only. Is there any way to fix this?
31
votes
1 answer

What is the purpose of HACKED-META-INF folder in Android app APK

Recently I noticed that APKs generated in Android Studio (v. 2.3.3) have different inner structure than before. What caught my attention was especially the folder named HACKED-META-INF. Does anybody know what is the purpose of this folder? It…
Lubos
  • 321
  • 3
  • 3
31
votes
8 answers

Kotlin suppress 'condition is always true'

Wasting more time scouring through the COUNTLESS number of inspections (which I know how to enable and disable), I cannot find ANY way to disable the particular inspection of 'Condition is always true' for my Kotlin (not Java) file in Android…
rmirabelle
  • 6,268
  • 7
  • 45
  • 42
31
votes
5 answers

How to put new placeholder resources into Android Studio project ("tools:sample" resources)?

Background Sometimes, you wish to put some placeholders to be shown only on the IDE, in layout files. As an example, you can use this: And get this in the preview: Such files are not part of the…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
31
votes
3 answers

What is gradle wrapper and the gradlew.bat file?

Lately I came to know the power of Gradle as a build system and as an Android developer I wanna understand it deeply. One article said the following: You can execute all the build tasks available to your Android project using the Gradle wrapper…
Abhishek Kumar
  • 4,532
  • 5
  • 31
  • 53
31
votes
2 answers

Disable mouse wheel integration in Android emulator

Is it possible to disable mouse wheel scrolling in AVD? Because I am using apple magic mouse and almost every mouse touch (not click - just touch) acts as click in Emulator and it drives me crazy. Same thing is happening even on BlueStacks emulator…
31
votes
6 answers

Cannot resolve symbol 'build' on line import com.android.build.OutputFile in app/build.gradle

So I just created a react native project using the command react-native init "project-name" I went into the app level build.gradle to connect firebase and I had an error saying could not resolve symbol 'android' on the line import…
Dfarrelly
  • 695
  • 2
  • 7
  • 24
31
votes
4 answers

Generate SHA1 Fingerprint in Android studio 2.2+

Today I have just upgraded my android studio from Studio 2.1 to Studio 2.2. I just check all android studio 2.2 Feature and it's a great experience to work in studio 2.2, but I'm facing one problem at now. I know it's not a problem but it occurs…
Chirag Solanki
  • 1,107
  • 2
  • 13
  • 23
31
votes
3 answers

How to import android.support.v7.app.NotificationCompat.Builder class in Android Studio

I am trying to implement simple notifications in my android app. I am reffering this developer guide But getting this error message : Incompatible types. Required: android.support.v7app.NotificationCompat.Builder Found:…
Kuldeep Kumar
  • 905
  • 3
  • 9
  • 22
31
votes
15 answers

com.android.ddmlib.AdbCommandRejectedException: device offline (Even when device is connected)

After update of Android Studio to 2.1.2 I've been getting the following error too many times when i make a change. com.android.ddmlib.AdbCommandRejectedException: device offline Error while Installing APK The problem is device was never connected…
Viral Patel
  • 32,418
  • 18
  • 82
  • 110
31
votes
9 answers

Android Studio 2.1 debugger does not show local variables

I am trying to debug over network in Android Studio. I connected via port 5555 and generally it is possible step through break points. But it often takes minutes just to execute one line of code and the other thing is that I don't see any variables…
4ndro1d
  • 2,926
  • 7
  • 35
  • 65
31
votes
5 answers

Android Studio Resetting Changes to Default Code Style

I'm here today because I'm having an issue with Android Studio. I don't know if it existed on previous versions (I don't remember this being an issue, so I doubt it was a problem on a previous version), but currently I am using the Android Studio…
Nathan Blair
  • 943
  • 13
  • 21
31
votes
2 answers

Android Studio 2.0 - pause/white screen on App first run

Since upgrading to Android Studio 2.0 (stable) I've noticed an issue that wasn't there in the previous version of Android Studio 1.5 I had installed. I'm working on a current project, which I would build (debug version) and run, both on a real…
Mark
  • 9,604
  • 5
  • 36
  • 64
1 2 3
99
100