Visual Studio 2017 Tools -> Android disabled - android

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!

Related

Where is Android SDK option to install on Android Studio?

I've just formatted and installed a fresh windows 10. Next, I downloaded Android Studio and didn't see the Android SDK option to install.
Android_Studio_Install_Option
I installed it nevertheless. Naturally, after I opened Android Studio, it opened a window saying that it needs Android SDK to work properly. I went to Android Studio homepage again, and downloaded
SDK Command Line
Extracted it to c:\program files\android . I opened Android Studio again and tried to pinpoint the tools folder inside c:\program files\android\tools as the location of SDK and received this warning:
not valid home for SDK
I typed CMD with administrator rights, entered the tools folder, and executed android update sdk and it downloaded some files and wrote after a while repositores.cfg could not be loaded.
I am out of options now. I need the SDK to compile ! I can't find an offline install on internet. How can Android Studio be installed without the SDK ? I do not understand... and before you ask, there's no android folder on c:\users\my_user\AppData\local ...is there a bug on the latest Android Studio install program? I can't have SDK already installed because this is a fresh install of windows 10. Help on this matter will be much aprecciated.
If you can open Android Studio then go to Tools --> Android --> SDK manager and you should be able to install or uninstall SDKs from there
I had similar problem. I had settings imported from my previous Android Studio installation and my Android SDK Location was set to a folder which was empty. I couldn't figure out how to download new Android SDK but after clicking "Edit" next to "Android SDK Location" (in Default Settings > Appearance & Behavior > System Setttins > Android SDK) Android Studio opened a dialog box where I could choose to install/update my SDK or just selected components of it.

Windows update apparently deleted Android SDK files from Visual Studio

I just restarted my Windows 10 machine to install some updates, and afterward I started getting this error in Visual Studio:
Error Xamarin.Android for Visual Studio requires Android SDK.
Please install it or set Android SDK path on Tools->Options->Xamarin->Android Settings menu. 0
Which I thought was weird, since I'd never run into any issues with my Android SDK before. So I went to Tools->Android to open the SDK manager, but all the options were grayed out and not selectable. Here's a screenshot:
So I did a little research, and this post told me to manually start my SDK manager with the .exe file. So I searched my files for the SDK manager, but when I clicked to open it, I got this error message:
The item that this shortcut refers to has been changed or moved.
Would you like to remove this shortcut?
And I got the same error for the Uninstall Android SDK Tools and AVD Manager shortcuts. So it seems that all my Android SDK files were for some reason deleted during my Windows updates.
Then I noticed that under Visual Studio Tools->Options->Xamarin->Android, the "Android SDK Location" was empty. Screenshot:
So then I downloaded Android Studio from the official site, found the location to the .exe file, and then copy-and-pasted the path into the "Android SDK Location" field, and clicked "OK". But the field wasn't saved. No matter what I do, when I open Options, the "Android SDK Location" field is always empty.
I have no idea how to proceed. Anyone have any ideas?
UPDATE
I ran Visual Studio Installer, clicked Modify, and under "Individual Components", it tells me that I already have the latest Android SDK setup (API level 25) installed. Do I need to install something other than that? Screenshot:
Better to Update Visual studio from Visual studio Installer
When you Load Visual Studio Installer, select repair option...
it will fix all issues...
First, Android SDK Location path is Android SDK path not .exe file path.
Second, check the path C:\Program Files (x86)\Android\android-sdk which is default path to store Android SDK by Visual Studio to see whether it exists. In my computer like this:
If it doesn't exists, it maybe have been deleted by your computer update process.
Why the "Android SDK Location" field is always empty is because the path is wrong.
You can also get Android SDK path with the Android Studio which you have downloaded:
Android Stuido -> File -> Settings -> Appearance & Behavior -> System Settings -> Android SDK, then copy-and-pasted the Android SDK Location path to Visual Studio. Find it like this in Android Studio:

Appcelerator Studio will not install Android SDKs

I am using Appcelerator Studio on Mac OS X
Appcelerator Studio, build: 4.4.0.201511241829
Build: jenkins-appcelerator-rcp-master-339 (origin/master)
Date: 24 November 2015, 18:30:16
Titanium SDK version 5.1.2.G
I have been trying to install the Android SDK's without success. I am using the Install from the software under Preferences -> Platforms -> Android
If I browse to the directory with the SDKs I get the error message:
[Android SDK Home] No Android SD...nder the specified SDK location
All the Android SDKs have been loaded by Android Studio so I know they are there.
If I try to install the SDKS through Studio it goes through the motions, downloads and unpacks the files etc and then gives me a completed screen but no sdks is actually saved.
I have tried uninstalling and reinstalling Studio without success
any help is appreciated
Just give path of your android-sdk main directory only. If you are doing correctly then check in that folder having all required folders or not. I attached screenshot for what folders should be there.
If any of folder missing in mentioned image, it means, your SDK not properly installed. And you need to install it again. you can download SDK from here: http://developer.android.com/sdk/index.html#Other
Follow the instruction given in above link and again set path as you were doing before. And install all required SDK using install SDK given in Preferences -> Platforms -> Android.

Error in running Cordova apps in Visual Studio

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.

How to determine the version of android SDK installed in computer?

How to determine the version of Android SDK installed in my computer?
<Program files>\Android\Android-sdk\platforms\<platform SDK's>
On a 32bit machine:
"<Program files>" will be \Program Files\
On a 64bit machine:
If you installed the 32bit ADT, "<Program files>" will be \Program Files (x86)\
If you installed the 64bit ADT, "<Program files>" will be \Program Files\
Type in android list target into your command line to see what android API you are using.
C:\ <path to android sdk> \tools\source.properties (open with notepad)
There you will find it.
Android Studio is now (early 2015) out of beta. If you're using it as your development platform, the SDK Manager is probably the easiest way to see what's available. To start the SDK Manager from within Android Studio, use the menu bar: Tools > Android > SDK Manager.
This will provide not only the SDK version, but the versions of SDK Build Tools and SDK Platform Tools. It also works if you've installed them somewhere other than in Program Files.
You can check following path for Windows 10
C:\Users{user-name}\AppData\Local\Android\sdk\platforms
Also, you can check from android studio
File > Project Structure > SDK Location > Android SDK Location
open android sdk->click on tools tab->about and u get the entire details!
In the case of Linux, You get the version of Android SDK using sdkmanager.
your_path/android-sdk/tools/bin/sdkmanager --version
in my case
/var/lib/jenkins/android-sdk/tools/bin/sdkmanager --version
While some responses have shown how to get the versions of the installed Android SDKs and various Android SDK related tools using the Android SDK Manager GUI, here's a way to get the same information from the command line:
%ANDROID_HOME%\tools\bin\sdkmanager.bat --list
You can redirect the output to a file to ease review and sharing.
Note: In my corporate environment, I also had to use the --proxy, --proxy_host, and --proxy_port command line options. You may need to use them as well.
I develope cross-plateform mobile applications Using Xamarin integrated in Visual Studio 2017.
I prefer to install and check all details of Android SDK from within the Visual Studio 2017. This can be found under the menu TOOLS -> Android -> Android SDK Manager.
Bellow is the Visual representation of the Adroid SDK Manager.
If you prefer to manage from UI, type android in command windows which will open the Android SDK Manager. Or you can directly open from C:\Program Files (x86)\Android\android-sdk\SDK Manager.exe
Create a Batch file (.bat) in Windows with the following command in it:
%ANDROID_HOME%\tools\bin\sdkmanager.bat --list && pause
NOTE: Using && pause is necessary to be able to review the information, once it is listed. If not used, the batch file will simply run, show the information in just mere few seconds and exit right away.

Categories

Resources