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.

Filter by
Sorted by
Tagged with
1747 votes
56 answers
1.3m views

Rename package in Android Studio

How do you rename packages in the new IDE Android Studio, based on IntelliJ IDEA? Is there an automatic refactoring included? I want to make bulk refactoring, but I don't know how. I worked two ...
ramzixp's user avatar
  • 17.7k
1595 votes
26 answers
714k views

Where to place the 'assets' folder in Android Studio?

I am confused about the assets folder. It doesn't come auto-created in Android Studio, and almost all the forums in which this is discussed talk about Eclipse. How can the Assets directory be ...
hxkl's user avatar
  • 17.7k
1453 votes
24 answers
474k views

What is Gradle in Android Studio?

Gradle is a bit confusing to me, and also for any new Android developer. Can anyone explain what Gradle in Android Studio is and what its purpose is? Why is it included in Android Studio?
androidcodehunter's user avatar
1394 votes
32 answers
556k views

What should be in my .gitignore for an Android Studio project?

What files should be in my .gitignore for an Android Studio project? I've seen several examples that all include .iml but IntelliJ docs say that .iml must be included in your source control.
respectTheCode's user avatar
1235 votes
55 answers
619k views

How do I "select Android SDK" in Android Studio?

After a successful import of an Eclipse-Android-Project into "Android Studio 1.4", I get the error "Please select Android SDK" when I click on the button to run the application in ...
delete's user avatar
  • 18.7k
901 votes
46 answers
722k views

Android Studio Error "Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8"

I downloaded the newest Android Studio, and I wanted to run the Android Jetpack Compose Project, but when I ran it, I got the error: > Failed to apply plugin 'com.android.internal.application'. >...
Ven Shine's user avatar
  • 9,116
889 votes
24 answers
694k views

Code formatting shortcuts in Android Studio for Operation Systems

I have started developing with Android Studio. In Eclipse I was using Ctrl + Shift + F, but in Android Studio it does not work. It will be different. How can I jump to any method in a .java file? I ...
Bhavesh Hirpara's user avatar
835 votes
12 answers
505k views

What is the shortcut to Auto import all in Android Studio?

Is there any way of auto importing in Android Studio. Something like the auto-import feature that Eclipse has when you use the keybinding: SHIFT + CTRL + O in Android Studio? Currently I have only ...
Michał Tajchert's user avatar
829 votes
32 answers
652k views

How do I add a library project to Android Studio?

How do I add a library project (such as Sherlock ABS) to Android Studio? (Not to the old ADT Eclipse-based bundle, but to the new Android Studio.)
Alexander's user avatar
  • 48k
807 votes
24 answers
560k views

Error retrieving parent for item: No resource found that matches the given name after upgrading to AppCompat v23

I've always programmed Android with Eclipse and decided to start migrating to Android Studio. I decided to use the same SDK I already had for Eclipse, then: Started a new project Set minimum SDK 4.0 (...
Vini.g.fer's user avatar
  • 11.8k
787 votes
103 answers
1.2m views

"cannot resolve symbol R" in Android Studio

In every instance in all of my classes where I reference R.id.something, the R is in red and it says "cannot resolve symbol R". Also every time there is R.layout.something it is underlined in red and ...
ez4nick's user avatar
  • 9,879
732 votes
53 answers
1.1m views

How to get the SHA-1 fingerprint certificate in Android Studio for debug mode?

I am trying to make a Map app in Android Studio, on Windows. How can I find the SHA-1 fingerprint certificate number? When I was using Eclipse it was right under Windows -> Preferences -> ...
Setu Kumar Basak's user avatar
675 votes
7 answers
438k views

How to completely uninstall Android Studio on Mac?

I recently downloaded Android Studio on my Macbook Pro and I messed up with it every time I open it. It gives me plugin errors and several other errors. I need to uninstall it completely from my mac. ...
Mostafa Addam's user avatar
659 votes
5 answers
281k views

Invoke-customs are only supported starting with android 0 --min-api 26

before i'm use build version gradle 26 but after change buildtoolsversion to 27 like as this image I am using android studio 4.2.2 recently i update all my dependency and sourceCompatibility ...
Rona Idea's user avatar
  • 6,754
650 votes
35 answers
757k views

No matching client found for package name (Google Analytics) - multiple productFlavors & buildTypes

Context: I'm trying to set up Google Analytics for my app. (having 4 custom buildTypes and more than a few productFlavors) It works fine when I select the Build Variant which has the applicationId ...
Viral Patel's user avatar
  • 32.9k
648 votes
15 answers
413k views

Search all the occurrences of a string in the entire project in Android Studio

I've just started using Android Studio (IntelliJ), and I now look for the feature to find the occurrence of a string in any of the files in my project. For example: I want to find all the files that ...
kramer65's user avatar
  • 52.2k
623 votes
15 answers
848k views

You have not accepted the license agreements of the following SDK components [duplicate]

I downloaded the latest Android SDK tools version 24.4.1. I used the command line to install SDKs. I typed y when asked Do you accept the license 'android-sdk-license-c81a61d9' [y/n]: y after ...
codable's user avatar
  • 6,509
588 votes
25 answers
579k views

I am getting error "cmdline-tools component is missing" after installing Flutter and Android Studio... I added the Android SDK. How can I solve them?

Android toolchain - I develop for Android devices (Android SDK version 30.0.3): X cmdline-tools component is missing Run `path/to/sdkmanager --install "cmdline-tools;latest"` See https://...
Ashfaq's user avatar
  • 5,883
586 votes
16 answers
191k views

How to view method information in Android Studio

In Eclipse, when you hover your mouse over a method, a window would appear with a description of what the method does, what the parameters mean and what it returns. Is there a way to get Android ...
tyczj's user avatar
  • 72.5k
575 votes
41 answers
605k views

Android Studio error "Installed Build Tools revision 31.0.0 is corrupted"

I'm on Android Studio 4.2.2. I created a new project and haven't added anything to the starter code and whenever I click build or run, I get this error: Installed Build Tools revision 31.0.0 is ...
mr_broccoli's user avatar
  • 6,069
574 votes
53 answers
1.0m views

SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable

I recently tried to import sample Android games I downloaded from Google's developer website. After importing them into Android Studio, I'm getting the following error: Error: SDK location not ...
Sameer Shamsudeen's user avatar
565 votes
95 answers
505k views

Error type 3 Error: Activity class {} does not exist

I have an IntelliJ Android project, that I successfully imported to Android Studio 0.4.0. It works perfectly if I don't change anything in manifest. However, when I want to change the launcher ...
Jacob's user avatar
  • 15.2k
563 votes
75 answers
687k views

"Default Activity Not Found" on Android Studio upgrade

I upgraded IntelliJ IDEA from 12.0.4 to 12.10. Now all the modules in my Android project give the error: Error: Default Activity Not Found I reverted back to 12.0.4 and it everything works again. ...
Saad Farooq's user avatar
  • 13.3k
544 votes
35 answers
706k views

How to change or add theme to Android Studio?

I have just installed Android Studio in my Window 7 64bit. When I launch the application the background of the screen where we write the code is white. I would prefer black or any other color. I am ...
kongkea's user avatar
  • 9,908
529 votes
30 answers
997k views

Android Studio - How to Change Android SDK Path

When I open Android SDK Manager from Android Studio, the SDK Path displayed is: \android-studio\sdk I want to change this path. How do I do it?
dira's user avatar
  • 30.5k
503 votes
21 answers
431k views

gradlew: Permission Denied

I am attempting to run gradlew from my command line, but am constantly facing the following error. Brendas-MacBook-Pro:appx_android brendalogy$ ./gradlew compileDebug --stacktrace -bash: ./gradlew: ...
Brenda Nicole Tan's user avatar
501 votes
73 answers
1.1m views

Android Studio doesn't detect my connected physical devices [closed]

The AVD Manager in Android Studio doesn't show my device but adb devices command in teminal shows it. How to resolve my issues ?
amnesyc's user avatar
  • 5,251
499 votes
17 answers
785k views

Changing API level Android Studio

I want to change the minimum SDK version in Android Studio from API 12 to API 14. I have tried changing it in the manifest file, i.e., <uses-sdk android:minSdkVersion="14" android:...
James B's user avatar
  • 9,223
490 votes
28 answers
422k views

No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp() in Flutter and Firebase

I am building a Flutter application and I have integrated Firebase, but I keep getting this error when I click on a button either to register, login, or logout. I have seen other people have asked the ...
Kennedy Owusu's user avatar
484 votes
38 answers
580k views

Filter LogCat to get only the messages from My Application in Android?

I observed that when i use Logcat with Eclipse with ADT for Android, I get messages from many other applications as well. Is there a way to filter this and show only messages from my own application ...
Vinod's user avatar
  • 32.5k
476 votes
28 answers
228k views

Building and running app via Gradle and Android Studio is slower than via Eclipse

I have a multi-project (~10 modules) of which building takes about 20-30 seconds each time. When I press Run in Android Studio, I have to wait every time to rebuild the app, which is extremely slow. ...
froger_mcs's user avatar
453 votes
18 answers
1.0m views

How to update gradle in android studio?

I installed Android Studio 0.1.9. Today I got and update to version 0.2 and of course I updated. After the installation I restarted Android Studio but now I get this message: Project is using an ...
7heViking's user avatar
  • 7,357
450 votes
24 answers
341k views

ADB.exe is obsolete and has serious performance problems

I am using Windows 10 and when I launch the Virtual Device Emulator in Android Studio I keep getting the message which reads: "The ADB binary at C:\Users\siviw\AppData\Local\Android\Sdk\platform-...
Siviwe's user avatar
  • 4,524
441 votes
31 answers
358k views

Android Studio is slow (how to speed up)?

I recently upgraded from Eclipse to Android Studio and I'm not really liking the experience. I'm comparing them both on a Windows 7 64 bit ultimate with 16GB of ram and Intel i7 4770 running NVidia ...
kha's user avatar
  • 19.6k
438 votes
39 answers
637k views

Change project name on Android Studio

I want to change the name of my project and module. But if I try to rename them Android Studio notify me some errors... e.g. I want to change the name from "MyApplication" to "AndroidApp" as shown in ...
RobertoAV96's user avatar
  • 5,933
435 votes
32 answers
535k views

"Failed to install the following Android SDK packages as some licences have not been accepted" error

I am getting this error in jitpack, I've tried everything on the internet. Below is my error Failed to install the following Android SDK packages as some licences have not been accepted. ...
Reenath Reddy Thummala's user avatar
426 votes
20 answers
290k views

How to delete a module in Android Studio

Is there a way to delete a module within Android Studio? When I right click on a module I can't find an option for deletion, is it elsewhere?
Stephan's user avatar
  • 16.4k
420 votes
33 answers
256k views

Android studio Error "Unsupported Modules Detected: Compilation is not supported for following modules"

I am using Android studio 1.0.1. I have a java module referred by other modules in my project. I have checked it out from SVN But now every Unsupported Modules Detected: Compilation is not supported ...
sappu's user avatar
  • 6,895
405 votes
23 answers
1.1m views

How to add an image to the "drawable" folder in Android Studio?

I need to add an image to the res/drawable folder... When I choose new > Image Asset, it comes out a dialog to choose Asset Type... How can I add an image to res/drawable folder?
Alan W.'s user avatar
  • 4,656
404 votes
37 answers
479k views

Dart SDK is not configured

I installed Flutter and set up Android Studio. Then I cloned an example of flutter on GitHub (https://github.com/flutter/flutter) and launched it in Android Studio, but it warns me "Dart SDK is ...
Katelyn's user avatar
  • 4,051
385 votes
29 answers
474k views

INSTALL_FAILED_USER_RESTRICTED : android studio using redmi 4 device

Got this freaky error Installation failed with message Failed to finalize session : INSTALL_FAILED_USER_RESTRICTED: Install canceled by user. It is possible that this issue is resolved by uninstalling ...
brainLoop's user avatar
  • 3,990
385 votes
62 answers
468k views

A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution

All of sudden I start getting this error, and I am not getting idea why if anyone just let me know where this error is, will be enough helpful. As much I am able to get is this because of new update ...
Shubham Tater's user avatar
380 votes
62 answers
596k views

Message "flutter run: No connected devices"

I am trying to create a sample application with Flutter (fresh installation). Android Studio is also installed (fresh installation). Here is the output of flutter run flutter run No connected devices. ...
FULL STACK DEV's user avatar
380 votes
15 answers
94k views

How to prevent open last projects when IntelliJ IDEA starts?

By default IntelliJ IDEA opens the last project when starting. How to start IntelliJ without opening last project?
qwazer's user avatar
  • 7,354
375 votes
12 answers
330k views

Find and replace Android studio

Is there a way to find and replace all occurrences of a word in an entire project (not just a single class using refactor -> rename) and also maintain case, either in Android Studio or using a ...
sirFunkenstine's user avatar
372 votes
29 answers
367k views

Android Studio installation on Windows 7 fails, no JDK found

I downloaded Android Studio and attempted to launch the program. This is running on Windows 7 64-bit with Java 1.7. During the installation, my Java 1.7 is detected, and the rest of the installation ...
Jaison Brooks's user avatar
367 votes
13 answers
220k views

Can Android Studio be used to run standard Java projects?

For those times when you want to isolate the Java and give it a quick test.. Can you run non-Android Java projects in Android studio as in Eclipse?
mgibson's user avatar
  • 6,163
366 votes
69 answers
329k views

Android studio logcat nothing to show

I installed Android Studio yesterday, and I tried to use the LogCat to see the logs. But there is nothing to show in the logcat. I used the terminal to run ./adb logcat and it works. Is there ...
user2506173's user avatar
  • 4,019
355 votes
7 answers
200k views

What is the difference between "min SDK version", "target SDK version" and "compile SDK" version?

What are the differences between "min sdk version", "target sdk version" and "compile sdk version"? I know what "min sdk version" and "target sdk version&...
Tobias's user avatar
  • 5,143
347 votes
14 answers
515k views

Setting ANDROID_HOME enviromental variable on Mac OS X

Could anybody post a working solution for setting ANDROID_HOME via the terminal? My path to the Android-SDK is /Applications/ADT/sdk.
Jacek Kwiecień's user avatar

1
2 3 4 5
1813