Android Studio doesn't detect custom SDK - android

I'm developing an app to be executed in Datalogic devices. I'm following this guide to set up the environment. I have carried out all the steps, but when I try to run the app, Android Studio is not able to detect the Datalogic SDK and shows this error:
Error: Please select Android SDK
In build.gradle, I have this:
compileSdkVersion 'Datalogic:Datalogic SDK v1:23'
as the guide says. Of course I have installed the Datalogic SDK API 23 from SDK Manager and I can use all the Datalogic's classes.
In my app's Module Settings -> Compile Sdk Version I have selected the Datalogic's one but still not working. If I build the app with gradlew assemble everything works. So, it seems to be something about IDE configuration.
I have also tried to invalidate cache and restart.

I found a solution in #rocciax 's answer of this question:
File -> Settings -> Android SDK -> Android SDK Location Edit -> Next, Next
Done!

Related

android sdk error when import some projects

I have SDK version 25, when i import a project in android studio this error occurs.
"Install missing platform(s) and sync project".
If I click this link, I get another error, which says:
"The following packages are not available: - Package id
platforms;android-23".
sdk error
my SDK version
You need to change the gradle version manually. For example if you are using Android Studio here is how:
Change the project view to Android if it's needed.
Go to the app folder.
Open the build.gradle (Module:app).
Change wherever you see the current SDK version (here, 23) to your desired version (here, 25).
5. Sync the project again.
And it's done.
Note that if you forgot anything needed the change, Android Studio will display a message and change it automatically.
Your sdk platforms are missing. It must be from version 2.1 to 8.0. Try to reinstall your Studio and Sdk Manager.
Note: This only works if you are getting sdk issue in a particular project and other project works fine
One of the simplest fix I can suggest that worked for me
create a new android project and see if it works fine
If yes the Click File-->Export Settings(make sure to check all options) --->choose any location to save settings.
Go back to your project click File-->Import Settings from the saved location (make sure you select all options)
let the IDE Restart
Hope this fixes the issue

Cannot run my app, asking to select Android SDK

Today I've installed Android Studio Canary 1
Now I cannot run my app. This following dialog appears.
I've already set the right SDK location through File-> Project Structure-> Android SDK location.
Expecting your help to solve this problem.
Warning Dialog image:
Go to project structure settings and set Source Compatibility and Target Compatibility to your current java development kit version:
Just you need to sync your project file with your gradle file.
File -> Sync Project with Gradle Files
I tried every answer in this post but my problem only got resolved when I made these steps:
File -> Close project -> Remove project -> Open existing project (same
project)
Maybe this will save a morning to another person with the same bug.
EDIT
This happened to me a lot on a MacBook. After I posted this answer it just kept happening so what I did was:
uninstall the Android Studio version I had from the App Store;
download the desktop stable version from Android Studio website;
start using the desktop version of Android Studio.
Never happened again.
Sometimes the SDK path will be incorrectly configured. You would need to fix it.
To Settings/Preferences( command + , on mac).
Search for SDK
Under Android SDK, click on edit and point it the root of sdk directory on your file system. (If ther is no SDk installed then install in from the below list).
i suggest you go to build.gradle and sync again.
Or Tools -> Android -> Sync Project with Gradle Files (Android 3+)
You need to insall SDK api 19 check this out.
https://developer.android.com/studio/releases/platforms
Go to sdk manager and install sdk according to your device and check your device api. Example if your device is jellybean then install api 19 sdk.
Go to Tools> Android > SDK Manager and make sure you have selected default Setting under System Setting. In this image I have selected Android 7.1.1 as default SDK
Just click on the button ..."Sync Project with gradle file"
Error will be remove
I had the same problem and what it worked for me was just sync with gradle.
I just did what I've found in this similar question:
How do I "select Android SDK" in Android Studio?
The original answer:
go to build.gradle and click sync now. Then it worked.
Update :
File -> Sync Project with Gradle Files (Android Studio 3.1.1)
Tools -> Android -> Sync Project with Gradle Files (Android Studio
3.0.1) Or You can click on the icon from the toolbar.
Sync Project Icon
This answer may not help works for later version as Android studio Team work on making the tool more better, the way to sync may be
different in the next version of Android Studio.
COMMON WAY that may helps is try to sync project and then Invalidate
Caches and Restart Android Studio.
Solution for Android Studio 3.1.2
Before that, by the way, I had invalidated cache and restarted too, but it didn't work.
Please, try and let us know.
P.S.
I had this problem after I imported a project from Git, just in case someone would like to replicate.

Android Application Configuration Missing and Android Studio SDK Manager does not exist

After downloading Android Studio and opening an existing project, when I went to edit configuration (after trying to run an existing project) but when I attempted to configure it as an Android Application, I did not find the android application option, which when I compared to my other computer, is required to run the program.
Furthermore, I am missing the Android SDK Manager, both in the IDE and on the startup screen. I don't have SDKs installed on this computer, and I think they are needed to run my project, so I kind of want the SDK Manager.
I have also re-installed Android Studio 8 times, including several older versions. I also installed the packages, which do come with SDK tools, and I made sure everything was selected on installation.
In my case it helps: just File -> invalidate caches/Restart
hope it also can be usefull to someone ;-)
check the sdk manager present in the location "C:\Users\"user-name"\AppData\Local\Android\sdk"
launch the SDK manager install the package that you needed
paste the link
"C:\Users\"user-name"\AppData\Local\Android\sdk"
[Android Studio>configure>Settings>Android SDK ]
Maybe try deleting everything of Android Studio and then installing the latest version. It might be because of the leftovers of the previous versions that caused this problem to occur. The best way is to try restoring your PC to the time you hadn't have Android Studio.
Click on File -> Sync Project with Gradle Files

Cannot create new AVD Device

i am using android studio version 0.8.2,
i am trying to create an avd, but the OK button cannot be pressed.
didn't find anything relevant to my version online.
You have to setup everything properly, if the cpu is not able to choose, you need to install the corresponding package in SDK manager
check my answer here:
https://stackoverflow.com/a/24980033/2777381
Do you install gradle? Make sure your Android Studio installs the gradle when you first start and create a project.
Also make sure File -> Project Structure -> SDKs list your Android SDK and you have given the right PATH there.
Also check:
I can't see AVD manager window in android studio 0.4.0
AVD not working correctly in android studio

Android studio - Invalid App-Engine SDK Path

I am trying to run my first android application in Android studio. Application created successfully with new project vizard but cant run that as getting this error--
Invalid App-Engine SDK Path
Please help
All answers about disabling the plugin are incorrect.
You need to execute ./gradlew appengineDownloadSdk in the root of your project. Alternatively you can execute the task via the gradle sidebar in Android Studio.
This task will create the folders given the current versions in your build.gradle file. You have to run this when you update versions in your dependency list.
One solution is to disable the Google Cloud Tools for Android Studio plugin.
In Android Studio, click on:
File > Settings
Then click on Plugins (on the left), and uncheck "Google Cloud Tools For Android Studio". Then Apply.
It asks you to restart Android Studio. Click on Restart and it will work now.
Seems like this is the problem--
exception in plugin Google cloud tools for android studio
After disabling this plugin its working now!!
In other scenario if you want to setup Google app engine this might help
https://stackoverflow.com/a/20986031/472336
I've created folder
c:\Users\[user_name]\.gradle\appengine-sdk\appengine-java-sdk-1.9.18\
And copy sdk that download there
https://cloud.google.com/appengine/downloads
So currently project compiles and works for me

Categories

Resources