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
33
votes
7 answers

Gradle Error: Path is not a readable directory for an Android Project saved in OneDrive

I tried to use a OneDrive folder to store my Flutter project [Windows 10, Android Studio]. I then made edits to it on another machine [same configurations]. The project compiled fine on the first machine initially and on the second one after the…
Pjotr Gainullin
  • 948
  • 1
  • 9
  • 16
33
votes
7 answers

Entry name 'AndroidManifest.xml' collided (Build failed after updating the android gradle plugin to 3.6.0)

I have recently updated the Android Studio from 3.5(stable) to 3.6(stable). Then I saw the plugin update was also available, so I have updated the version of "com.android.tools.build:gradle" from 3.5.0 to 3.6.0 and also updated the gradle version to…
33
votes
13 answers

Reference to an enclosing class method cannot be extracted on refactoring

When I want to do "Extract to widget", it raises an error : "reference to an enclosing class method cannot be extracted" I know there is some variables that must get their data from class constructor but I want Android studio to extract the widget…
Behzad
  • 1,740
  • 1
  • 22
  • 49
33
votes
22 answers

How to fix this error "A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade"

I can't run my app on AVD. I get this error. A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade My build.gradle android { compileSdkVersion 29 buildToolsVersion "29.0.2" defaultConfig { …
33
votes
1 answer

Gradle KTS Build Files

Google released an updated version of Android Studio 3.5. After having updated to this version I get this warning below: This project uses Gradle KTS build files which are not fully supported. Some functions may be affected. However, I believe…
Mayur Patel
  • 2,300
  • 11
  • 30
33
votes
2 answers

Could not get unknown property 'config' for type com.google.gms.googleservices.GoogleServicesPlugin$GoogleServicesPluginConfig

I'm trying to upgrade my libraries from : classpath 'com.google.gms:google-services:4.2.0' to classpath 'com.google.gms:google-services:4.3.0' and I'm getting below error :
Solanki Zeel
  • 548
  • 1
  • 7
  • 18
33
votes
7 answers

Android Studio is using this JDK location ... which is different to what Gradle uses by default

After Android Studio sync my gradle project, I see the following message in the event log: Android Studio is using this JDK location: /path/to/my/project/specific/jdk which is different to what Gradle uses by default: …
Heath Borders
  • 30,998
  • 16
  • 147
  • 256
33
votes
8 answers

Unable to migrate Flutter project to AndroidX

I have a Flutter project in Android Studio. I am planning to migrate to AndroidX. Whenever I do Refactor -> Migrate to AndroidX, Android Studio shows error message: You need to have compileSdk set to at least 28 in your module build.gradle to…
Sam
  • 2,972
  • 6
  • 34
  • 62
33
votes
2 answers

Unexpected auto-formatting of XML layout in Android Studio

I am using AS since 4 years. After last update I observed unexpected auto-formatting of XML layout (while typing and with Code -> Reformat Code too). Here is an example: When I started typing relative layout, it expanded start tag, width property,…
33
votes
5 answers

AndroidStudio import SVG with ERROR@ is not supported

I got message "ERROR@ is not supported" when try to import SVG using Android Studio 3.0.1 Build #AI-171.4443003, built on November 10, 2017 JRE: 1.8.0_152-release-915-b08 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Mac OS X…
UmAnusorn
  • 10,420
  • 10
  • 72
  • 100
33
votes
7 answers

Error initializing ADB: Unable to create Debug Bridge: Unable to start ADB server

When no other of these questions are helping me, then this means I need to remove and reinstall Android Studio. Here's the error: Error initializing ADB: Unable to create Debug Bridge: Unable to start ADB server: adb server version (36) doesn't…
user9370880
33
votes
4 answers

Failed to execute aapt with cordova

I am working on a cordova project that has been working fine for a while, and suddenly I started to get a very strange error whenever the build reaches ":app:processArm64DebugResources" when builing with the command "cordova run android --device". I…
Melkor
  • 779
  • 1
  • 12
  • 29
33
votes
2 answers

INSTALL_FAILED_DUPLICATE_PERMISSION with Samsung Galaxy S8

I am attempting to install my app on my new Samsung Galaxy S8 for the first time from Android Studio. When I do so, I get the following error message: Installation failed with message Failed to finalize session :…
Code-Apprentice
  • 81,660
  • 23
  • 145
  • 268
33
votes
3 answers

Private property name doesn't match regex

The following code returns this warning in Kotlin project using Android studio 3.0 on Mac. private val REQUEST_CODE = 11 private val TAG = "RecentCallsActivity" Private property name 'REQUEST_CODE' doesn't match regex '_?[a-z][A-Za-z\d]*' less...…
Ashildr
  • 1,783
  • 3
  • 16
  • 25
33
votes
3 answers

Can I run the Android Emulator within (or on top of) the Android Studio window?

I use Android Studio on macOS in full screen (maximised). When launching the Android Emulator, its window is shown on the regular desktop. This requires switching from one window to another. I'd like to be able to look at both windows at the same…
Erik
  • 4,305
  • 3
  • 36
  • 54