Please configure Android SDK - android

I am getting this error:
Please configure Android SDK
Onclick of configure i getting one popup

After changing Build Tool Version on the pop screen
26.0.1 changed into 26.0.3 // else selected the highest available version
then click OK started working for me...
(or)
Simply Restart Andoid Studio File->Invalidate Caches and restart

FIX FOR 3.1.2 OR NEWER VERSIONS
I faced the same issue on Android studio 3.1.2, but a simple Sync didn't work for me.The solution was a bit different:
I go to
File -> Invalidate Caches -> Invalidate
File -> Close Project.
Remove the project from the Android Studio project selector window.
Quit from Android Studio(X)
Start Android studio and open project again

I consumed a few hours to fix this issue:
First Click 'Sync' gradle
Then clean and rebuild the application
And invalidate and restart

You can close this project first.
Then DELETE ALL temp file and generated file,
including .gradle, .idea, build in your project's root directory and also build in app path.
Finally, restart your project, problem should be solved. Good Luck !

After executing these two adb commands, it also works fine for me.
(1) adb kill-server
(2) adb start-server

I had the same issue and tried all of the above and it did not help.
I ended up closing everything and rebooting my Mac.
Reopened Android Studio and it was back to normal :)

In build.gradle (Module: app) I changed "compileSdkVersion 23" to 26
Then it works.
Maybe also work for you.

For me solution was to sync project with gradle files.

Related

Android Studio not Working After update 4.0.1

After update to Android Studio 4.0.1, my total Android Studio stop working! The display cannot resolve symbol ‘AppCompatActivity’
and when click on AppCompatActivity display
When I click on Setup JDK open Select Project SDK Select any Android API and click the OK button nothing happens. If I click on the Configure button Configure SDK cannot be changed here.
If I want to open SDK Manager from Tools menu nothing opens. Also, the Settings option can’t be opened from the File menu.
But my previous version Android Studio works properly. But after I've updated all of my projects, the same problem persists. What can I do now? Please help me?
Somehow Invalidate caches and restart did not fix it for me. I had to manually delete everything from .idea/caches/ folder in the project's root folder. That did the trick.
Steps that worked for me:
[Windows+R] -> %USERPROFILE%
Delete folders .android and .AndroidStudio4.0
Open Android Studio, don't import settings, setup SDK anew (you can target it to where it already resides, so you wouldn't have to download it again), create a new basic project, check if it builds correctly. If it does, then your project will build fine as well.
I've resolved the issues while facing issues in some plugin not supported for android studio 4.0.1. Could you please check it and disable the plugin.
I hope it's working fine.
I faced same problem , delete file called ".android 4.0" from appdata and reopen android studio without load any configuration and start as new
I faced the same problem, but invalidating cache and deleting the .iml file and .idea directory (watch out for code styles, dictionary, etc) didn't help.
The problem was solved when I downgraded the Gradle plugin to classpath 'com.android.tools.build:gradle:4.0.0' (from 4.0.1) and then again set the project SDK as shown in OP's screenshot.

Gradle sync failed: Cause: startup failed (Basic functionality not working)

It is my first time to use android studio V 3.1.3
when i finished installation and trying to build this error is shown
it said that "Basic functioality not working correctly such as building and debugging "
i do not known how to solve it
i use a local gradle distribution like this
Then press on sync project with gradles files
but this error is still shown.
It works well but after that this error is happened
any help
Thanks in advance.
I also have the same problems as you,Now I have solved it.
The following are the steps to be solved
Exit Android Studio.
Delete the .gradle folder eg: C:\Users{userName}}.gradle
Restart androidStudio and wait a moment.
Have you tried
Android studio -> File -> Invalidate Caches/Restart -> Invalidate and Restart
Deleting the .gradle folder was unsuccessfull for me.
Still waiting for another solution.
you should go to settings > build,execution,Deployment > build tool > gradle
and the change the user gradle home that to path of environment variable of JAVA-HOME Address
Like this
and then change gradle JDK to Embedded JDK it will solve your problem

Gradle project sync failed?

When I started up my project this morning it randomly gave me a message saying Gradle project sync failed. Basic Functionality(eg. editing, debugging) will not work properly. in Android Studio. I looked at other answers that people had put up for this problem but they haven't been working. I invalidated my chaches/restarted my project but no luck. I also deleted my .gradle folder from my project folder and still no luck. If any of you guys could help me that would be awesome! This didn't happen yesterday when I was working on the project or anything, I wonder why its happening now. Oh yea it also says this as a gradle message: Error:C:\Users\Dave\.gradle\caches\2.2.1\scripts\settings_ad4t0wp5ikihzl1y1o83b5sbw\SettingsScript\buildscript\cache.properties (The system cannot find the file specified) :
Thanks again for anyone who reads this/ can help!
There is a file - "cache.properties" that gradle creates for you, upon first time inception of any project. The path for this file is "~Home_Directory\.gradle\2.2.1\taskArtifacts". You may find this path in your home directory. So basically, this file - "cache.properties" is missing from the "taskArtifacts" folder.
One of the solution that worked for me is to copy file - "cache.properties" from any test project of yours to this project that's currently experiencing an issue.
Regards
I had to choose using the Default Gradle Wrapper instead of local.
<< SETTINGS -->/ BUILD TOOLS --> Gradle --> radio button switch... >>
It has helped me to fix the same problem.
I had experience similar sync failed problem with gradle based android project (in Android Studio 1.1.0). I solved this problem without deleting .gradle from my user directory,
steps I followed was
Go to File -> Settings -> Compiler(Gradle Based Android Project)
Change VM options to -Xmx512m -XX:MaxPermSize=512m.
Click Apply -> OK and then tap on Try Again option in sync failed message to clean build the project.
Works like charm!!
UPDATE - 1 : For Android Studio 1.3, Compiler option mentioned in above Step-1 is present inside tab Build, Execution, Deployment.
I had faced similar kind of problem earlier!
But don`t know after rebuild the project and cleaning it, it worked normally.
Invalidate dependency cache by running
gradle clean build --refresh-dependencies
from project root and then re-import your project. Worked for me once.
May be you have put Android Studio into offline mode. To fix it, go to Preferences -> Gradle and ensure that the "Offline work" checkbox is not checked.
Than do
File -> Invalidate caches / Restart
Shutdown Android Studio
Rename/remove .gradle folder in the user home directory
Restart Android Studio let it download all the Gradle stuff it needs
android studio 0.4.2: Gradle project sync failed error
Delete the folder C:\Users\.gradle and reopening the android studio solved my problem

Android Studio 0.8.2 "Gradle project sync failed."

I'm completely new to android studio. Installed it plus all the skd packages the installation guide told me to. I've been trying a couple of things for the past two weeks now with no success. Can someone direct me to a solution or where more detailed error messages are found?
Im receiving this error message from the "Messages Gradle Sync" Panel:
"Error:(1, 0) Cause: com.google.common.collect.Sets"
edit : I have ubuntu installed on this computer aswell and I decided to install android studio on it. Its woking there so I guess I'll work from it until studio gets a fix or I find one.
Uncheck "Offline work" in File>Settings>Gradle>Global Gradle Settings
Resync the project, for example by restarting the Android Studio.
Once synced, you can check the option again to work offline
Update java if Android L SDK installed
-File -> Invalidate caches / Restart
-Shutdown Android Studio
-Rename/remove .gradle folder in the user home directory
-Restart Android Studio let it download all the Gradle stuff it needs
-Gradle build success !
Open your project where its located
For example:
MyApplication->gradle->wrapper->gradle-wrapper.properties
go into it and change this row:
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
with this:
distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip
and try to sync with this button in your IDE
At https://code.google.com/p/android/issues/detail?id=71725 I found this answer by (#3 alinmit...#gmail.com) and it solved that problem for me.
In Android Studio go to File>Settings>Gradle>Global Gradle Settings and in Gradle VM options specify the proxy details:
-Dhttp.proxyHost=dummyHost -Dhttp.proxyPort=dummyPort -Dhttp.proxyUser=dummyUser -Dhttp.proxyPassword=dummyPassword
I have Avast antivirus, i closed it and then the problem disappeared! try to disable your firewall and let us know! :-)

Option to "build signed apk" missing

After updating my Android Studio to the latest version, I can no longer find the option to build signed apk.
I have tried installing beta and canary builds of Android Studio but they do not seem to carry the option either. Can someone help me figure out how to generate signed apks?
I've tried re-installing Android SDK Build Tools but that didn't work for me. But I managed to see the option by ensuring that the project is opened in the Android directory instead of the project root.
Try Invalidate restart
Goto File > Invalidate Caches/Restart
If you still face the problem then you have to reinstall the android studio not the build.
Delete the android studio folder from users or where you have given the path while installing.then open the android studio and it will automatically start installing
I solved this issue by deleting and re-downloading Android SDK Build-Tools. Posting this here in case anyone else is facing this issue.
Quick fix is go to File->project Structure->build variants,in build types choose the build you want Debug or Release,scroll down and add a key to Manifest Placeholders apply the changes and click OK,i hope you'll find Generate signed bundle/APK options under build,i don't know if it's the right way to do,it's a rough guess.
Following solution worked for me.
After lot of research, I found this reference. https://developer.android.com/studio/releases/build-tools.
Here as mentioned, we need to specify android build tool version in app\build.gradle file.
android {
buildToolsVersion "29.0.2"
}
I initially had problem with node on my project so I added this on terminal:
sudo ln -s "$(which node)" /usr/local/bin/node
Then on File > Sync Project with Gradle File System.
After this it showed on the Build menu.
Maybe, after this you can also do: File > Invalidate Chaches / Restart....
Just open your project in Android Studio and click where shown below.
After that, the option will become available.
In my case the problem was in build.gradle, verify if you have specify :
apply plugin: 'com.android.application'
You have to connect a testing device or create a new virtual device (if you actually have not).
My problem was also around the Android SDK Build-Tools, but the reinstall was not solving the issue.
I had to look at the logfile and find out, that I was using a platform version which wasn't installed. When I selected the particular verision in the SDK installer, everything started working again.
I had the same problem, open your project directly on android folder

Categories

Resources