I just started using Linux Ubuntu, and downloaded and maybe set up Android Studio.
When I launch it, it does successfully, though it took hours to come here. But it gives me now :
Your Android SDK is missing, out of date, or is missing templates. Please ensure you are using SDK version 22 or later. You can configure your SDK via Configure | Project Defaults | Project Structure | SDKs
I tried to do so and at SDKs I added Android SDK. But when I clicked "ok", the prompt was dismissed but nothing happened, that is, not added.
I tried "Android SDK" two items below SDKs, because Android SDK was empty. But this time, Apply button and OK button doesn't respond. When I look at command line at the moment this error was being displayed.
[ 550663] ERROR - llij.ide.plugins.PluginManager - Android Studio (Preview) 0.4.6 Build #AI-133.1028713
[ 550663] ERROR - llij.ide.plugins.PluginManager - JDK: 1.8.0_05
[ 550663] ERROR - llij.ide.plugins.PluginManager - VM: Java HotSpot(TM) 64-Bit Server VM
[ 550664] ERROR - llij.ide.plugins.PluginManager - Vendor: Oracle Corporation
[ 550670] ERROR - llij.ide.plugins.PluginManager - OS: Linux
It looks like there isn't relavant answer to this. All the questions tend to end with concluding "That's easy. Go Config, project default, project structure, and add Android SDK and Voila! You're good to go." Unfortunately no voila to me, so I here post this.
If anyone has an idea.
I have fix this ishue on Ubuntu 14.04, Android Studio 0.8 ::
sudo chmod 775 -R {your path}/android-studio/
In my case Studio were placed in /usr/local/android-studio ::
/usr/local/android-studio/android-studio/
I'm using Android Studio 5.7 and jdk 7 in Ubuntu 14.04 without problems.
I'm not expert but i thought you was using an old android studio version and a new jdk version.
I searched:
You are using android studio 0.4.6 based on IntelliJ 13.0
http://tools.android.com/recent/androidstudio050released
And IntelliJ adds support for JDK 8 in 13.1 version
http://blog.jetbrains.com/idea/2014/03/intellij-idea-13-1-released/
So try to upgrade Android Studio to 5.0 (based on 13.1) or better downgrade JDK version to 7 if you dont need it, perhaps not completely supported.
I was having a similar issue but on a clean install of Ubuntu 14.04, a fresh download of Android Studio 0.5.7, Oracle Java 8, Gradle 1.12 and the Android ADT Bundle 20140321. Every time I tried to bring up the Project Defaults to set the Android SDK location an exception appeared on the console with the same message you posted.
Before starting I set the various tool HOME environment variables to where those tools were installed, (which could be optional if you're installing all of these through the Ubuntu package manager..)
export GRADLE_HOME=/opt/DEV/gradle
export JAVA_HOME=/opt/DEV/jdk
export ANDROID_HOME=/opt/DEV/adt-bundle-linux-x86_64-20140321/sdk
export PATH=$PATH:$GRADLE_HOME/bin:$JAVA_HOME/bin:$ANDROID_HOME/tools
Then,
From the quick start dialog (presented when you first open Android Studio if you don't have a project already created) disable the Android Plugins found under Configure -> Plugins. Also disable any plugins Android Studio recommends when you disable the Android ones.
Restart Android Studio when prompted.
Add the Java JDK via Configure -> Project Defaults -> Project Structure -> Platform Settings: SDKs
Apply changes, head back into Configure -> Plugins and re-enable the Android Plugins.
Restart Android Studio when prompted.
Set the Android SDK Location and JDK Location under Configure -> Project Defaults -> Project Structure. When I did it, it was pre-filled so I just hit Apply.
Restart Android Studio
The SDK Manager is now a visible button under Configure and you can now create a new Android Project.
Upon creating a new Android Project, Android Studio then went off and download the various dependencies and Gradle 1.10. Annoying that it downloaded Gradle again, but at least Android Studio started to work after that.
Related
I installed Android Studio Arctic Fox 2020.3.1 on Ubuntu via the Ubuntu Software Center having previously installed the Java and android SDK's using apt from a terminal, following the official installation instructions and I had no reported issues while installing or after. When I ran Android Studio, its seems to have detected the Android SDK location which is installed at:
/usr/lib/android-sdk
but when I tried to add additional platform and tools for android nougat in:
Tools->Android SDK->Android SDK Location
The Android SDK location is:
/usr/lib/android-sdk
Which is correct, but when I click Edit and the SDK Components Setup dialog is loaded, the Android SDK location is again displayed and is also correct, however there's a warning message underneath which states:
<!> An existing Android SDK was detected. The setup wizard will only download missing or outdated SDK components.
When that appears to be merely stating the obvious and doesn't need to be said, so why the warning?. I just ignored it anyway and tried to add some additional plaform support. Prior to that, to test android studio was working after install, I rebuilt an existing hello-world project and the target platform from previous builds was 27.0.1 and as a result of rebuiding that existing project Android Studio appears to have created a hard link from 27.0.1 which it installed to the 'debian' folder, so when I list that location in a terminal I get:
$ls -al /usr/lib/android-sdk/build-tools/
lrwxrwxrwx 1 root root 6 Aug 29 2019 27.0.1 -> debian
drwxr-xr-x 3 root root 4096 Aug 11 00:22 debian
As you can see '27.0.1' is a hard link to the debian folder and by checking the properties of the link I can confirm it was created by Android Studio on 11th August which is the date it was installed:
27.0.1 Properties
Name: 27.0.1
Type: Link to folder (inode/ directory)
Parent folder: /usr/lib/android-sdk/build-tools
Modified Wed 11 Aug 2021 12:22:55 BST
When I attempt to install any additional platforms and tools, Android Studio now complains and cannot continue, it tells me to check the log and when I examined the Idea.log it says:
'build-tools;debian' in inconsistent location '/usr/lib/android-sdk/build-tools/27.0.1' (Expected '/usr/lib/android-sdk/build-tools/debian')
when the expected location exists and there appears to be no such issue, since the Android SDK is exactly where the installer put it and exactly where it should be, I dont know why it thinks there is a problem, where there doesn't appear to be one. However I dont know why Android Studio created the hard link for platform 27.0.1 -> debian when it added that platform to build hello world?
I worked out the solution myself. The solution is:
(Note: you need to ensure your PC is connected to the internet, so Android Studio can download the Android SDK)
Uninstall the Android SDK.
In my case, I installed the Android SDK via apt in a terminal, so I uninstalled using the following commands:
sudo apt-get remove android-sdk
and then
sudo apt-get --purge remove android-sdk
Launch Android Studio and it will automatically start the Android Studio Setup Wizard and issue the pop-message:
Title: Missing Components
Message: No Android SDK found
Follow the wizard to install the SDK.
This time the SDK is installed to your home directory and Android Studio has no issues with the SDK.
To test it all works, I installed the additional build-tools and target platforms for my test app and built and ran it on an AVD and everything works fine.
When I try to run a new blank Android app I get an error:
"The Android SDK Directory could not be found...".
I searched in google for a solution and I found out that I need to go to Tools -> Android -> Android SDK Manager, and then I realized the buttons are disabled.
I did some checks:
in Tools -> Options -> Android Setting for Android SDK Location and it's empty. Furthermore, the folder Programs Files(x86)\Android\android-sdk contain only 1 folder named extras
I did a VS repair, twice, and nothing changed.
As I understand the problem, I don't have SDK and somehow VS can't install it properly.
Is there any manual way to install it or any other solution?
Edit: I've tried to uninstall Visual Studio and install again. It couldn't install everything successfully, here is the log:
Package 'JavaJDKV2,version=1.8.6,chip=x64' failed to install.
Search URL
https://aka.ms/VSSetupErrorReports?q=PackageId=JavaJDKV2;PackageAction=Install;ReturnCode=-1
Details
Command executed: "C:\ProgramData\Microsoft\VisualStudio\Packages\JavaJDKV2,version=1.8.6,chip=x64\jdk-8u181-windows-x64.exe" /quiet
Return code: -1
Return code details: Unknown error (0xffffffff)
Log
C:\Users******\AppData\Local\Temp\dd_setup_20180828172213_290_JavaJDKV2.log
Impacted workloads
Mobile development with .NET (Microsoft.VisualStudio.Workload.NetCrossPlat,version=15.8.27906.1)
Impacted components
Android SDK setup (API level 27) (Component.Android.SDK27,version=15.8.27906.1)
Google Android Emulator (API Level 27) (Component.Google.Android.Emulator.API27,version=15.8.27906.1)
Java SE Development Kit (8.0.1120.15) (Component.JavaJDK,version=15.6.27406.0)
I fixed it and here is what worked for me:
I downloaded the Android Command line tools
I put the downloaded folder in C:\Program Files (x86)\Android\android-sdk
I opened CMD and directed to that folder.
I've checked the command sdkmanager --list, see sdkmanager page for more information
And I downloaded via the sdkmanager commands the SDKs I needed
Also, VS2017's SDK manager started to work as well after I downloaded what I needed from the command line.
download the latest version of "sdk-tools-windows-4333796.zip" in https://developer.android.com/studio this web site and update your visual studio to latest version
this will surely work because even in my case it was same error for 3days then i did these changes and now it works fine
Install Android studio - https://developer.android.com/studio
Open Android studio -> configure -> copy Android SDK location
Open Visual studio -> Tools -> Options -> Xamarin -> paste your SDK location
Done!
I installed Visual Studio on Windows running in Parallels on my Mac.
When creating a new Cordova project and to debug with VS Android Emulator, it fails with:
java.lang.IllegalArgumentException: URI has an authority component
I read somewhere that this happens when sharing is enabled with Parallels. If I disable sharing I get a new error:
java.io.FileNotFoundException: \\Mac\Home\.gradle\wrapper\dists\gradle-2.2.1-all\2m8005s69iu8v0oiejfej094b\gradle-2.2.1-all.zip.lck (The network path was not found)
Which I understand, because \Mac\Home will obviously no longer be available.
What I can't figure out is who or what is looking in \Mac\Home for Gradle, or anything else for that matter. Is it my VS installation? Something in my application? Android SDK? Java? Some NPM package?
Edit:
I'd done a full repair install of Visual Studio, I've reinstalled Node from scratch, Android SDK, and JDK - who knows about \Mac\Home?????
It was Java. \\Mac\Home existed when the JDK was installed, and installing a newer version of the JDK didn't make VS use it - I manually set it in Tools -> Options -> Tools for Apache Cordove -> Environment Variable Overrides
When I make a new typescript Cordova application in Visual Studio, a page comes open with:
Please fix the following issues to ensure that your app builds and runs successfully.
Android SDK : The override value set on the Environment Variable Option Page pointed to an invalid or nonexistent location for this software.
When I run the app with ripple -Nexus (Galaxy), in error list I have 2 errors:
Please install Android targer " Android-19 "
cmd: Command failed with exit code 8
Does anyone have the answer?
You did not installed the SDK right!
click "Start" and look for "Android SDK Tools" - "SDK Manager", under "Tools", the following should be installed:
Android SDK Tools
Android SDK Platform Tools
Android SDK Build Tools for rev 19.1
Then install everything inside Android 4.4.2 (API 19)
If you cannot find SDK Manager, which means that you did not install Cordova correctly.
If you are using Visual Studio 2013 Community Update 4, you need to install Tools for Apache Cordova CTP3.1
If you are using Visual Studio 2015 Community RC, you need to select "Tools for Apache Cordova" during the installation of VS 2015.
If you are inside China or some other countries that block access to Google, you need to make sure you can access dl.google.com before you install Tools for Apache Cordova.
If you think that you install everything properly and still get the error, in Visual Studio, go to "Tools" - "Options" - "Tools for Apache Cordova" - "Environment Variables Override" and check the ADT_HOME variable, is your Android SDK installed in the path stated in the ADT_HOME?
Still not ok? in "Tools" - "Options" - "Tools for Apache Cordova", use "Clear Cordova Cache", then the system hangs about a minute or two, then it will ok, and you can rebuild again.
Your Android SDK is out of date or is missing templates. Please ensure you are using SDK version 22 or later.
The machine I'm using I've not had Eclipse on before, but had to because of the SDK Issue,
I've installed
SDK 64bit here:
C:\Program Files\Java\jdk1.7.0_21
SDK 32bit here:
C:\Program Files (x86)\Java\jdk1.7.0_21
Android-Studio is install here:
C:\Program Files (x86)\Android\android-studio
Eclipse
C:\Program Files (x86)\Android\Eclipse
Now on another part of this forum a nice post said to change the settings in Configure -> Project Defaults -> Project Structures, but I'm not to sure what to change. I did go into project in (project settings), the list in there is:
None
1.7 (java version 1.7.0_21)
Android SDK (java version 1.7.0_21)
I selected Android SDK (java version 1.7.0_21). Then there are the NEW and Edit buttons. But when I try to give it a path C:\Program Files\Java\jdk1.7.0_21 etc it says it's incompatible.
My environment variables are:
ANDROID_HOME = C:\Program Files (x86)\Java\jdk1.7.0_21
JAVA_HOME = C:\Program Files\Java\jdk1.7.0_21
Does anybody know how to fix this???
Also make sure that inside Configure > Projects Defaults > Projects Structure > Click on the "Android SDK" section at the bottom left panel and insert the path of your Android SDK like this: /Applications/Android Studio.app/sdk (Use the browser to point to the sdk folder).
Android SDK is different from Android API level.
I had this issue when i tried to migrate from Eclipse to Android Studio IDE.
The problem is the version of Android SDK Tools as the error message supposes.
Presuming you have installed Android SDK from Eclipse before:
1. Open Eclipse
2. Go to Help->Check For Updates and update to latest version (just to be sure)
3. Go to Window->Android SDK Manager
4. on the SDK Manager make sure you have selected Tools.Android SDK Tools,Platform-tools and SDK Build-tools![first 3 on the picture][1]
5. Press 'Install packages'
6. Restart Eclipse and Package Manager
7. Repeat steps 4, 5 and 6 until there is nothing left to update.
8. Close Eclipse, start Android Studio and try to 'create new project' again. This time it should work!
If you are able to start Android Studio, you can open SDK Manager from there (in the toolbox by defaut), and go on from p.4
if using Eclipse also be sure to have set the SDK path the same as in Eclipse
Android Studio - configure - Project Defaults - Project structure - Press plus- Android SDK - put path to the same sdk that you use in eclipse (run SDK and in top panel you can see this path) from here
In your eclipse
Go to Help → Install New Software.
On Work with: type https://dl-ssl.google.com/android/eclipse/ and press ENTER.
Wait for Eclipse to fetch the repository. An item named Developer tools will appear in the list.
Mark it for install, press Next and follow the steps to install the ADT tools.
When finished, it will ask to restart Eclipse. Make sure you do this.
When Eclipse restarts, all your Android SDK packages should show up again.