Android Windows 10 installation - android

=)
"tns doctor", "tns run" or "tns run android" tells me it has issues with
"WARNING: adb from the Android SDK is not installed or is not
configured properly.", "WARNING: adb from the Android SDK is not
installed or is not configured properly.", "Cannot find a compatible
Android SDK for compilation. To be able to build for Android, install
Android SDK 28 or later.", "You need to have the Android SDK
Build-tools installed on your system. You can install any version in
the following range: '>=23 <=28'."
Here is my configuration :
Windows 10 - Pro 64-Bit,
System Environment Variables:
Variable: "ANDROID_HOME" --> Value: "C:\Android\android-sdk"
Variable: "Path" --> Values "C:\Android\android-sdk\tools; C:\Android\android-sdk\platform-tools; C:\Android\android-sdk\tools\bin; C:\adbDevices\adb-tools;"
At my very first try to install nativescript Android Studio was already installed, so i deinstalled Android Studio and let it install via choco.
I followed exactly the instructions of https://docs.nativescript.org/start/ns-setup-win. If I start via CMD "tns run" or "tns doctor" I get the errors mentioned above.
Everything else like java-jdk or chocolatey and so on is installed and set in the environment variables...
enter image description hereenter image description here
Any help is appreciated... Of course I searched for these warning/errors in the internet but all related posts are from 2017 and they do not provide a solution.

Ok thank you very much #Vladimirov the issue was my User Enviornment Variable had the path to the adb instead of the path to the sdk... So I changed my User Environment Variable like my System Environment Variable to the path to my SDK and it is working fine now. :))))))
<3
Thank you very much Vladimirov!

Related

Error while doing Ionic build android

I have followed all the tutorials that is to be followed and done the settings correctly. I am getting the following error
[Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually.
Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.]
Now possible solution to the problem is to add the path to your Android sdk in the $ANDROID_HOME and $PATH variable
Here is the output
echo $PATH
/home/samyak/anaconda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/java/jdk1.8.0_65/bin:/usr/local/java/jdk1.8.0_65/jre/bin:/usr/local/java/jdk1.8.0_65/bin:/usr/local/java/jdk1.8.0_65/jre/bin:/home/samyak/Android/Sdk/tools:/home/samyak/Android/Sdk/platform-tools
echo $ANDROID_HOME
/home/samyak/Android/Sdk
as soon as I do android I get the gui of android. I think I am missing something. If somebody could help me out
Version details
Ionic 1.7.11
Cordova 5.4.0
Android-sdk 23
Also to note that I did not download the Android Sdk but took it from a friend via hard drive? Will that effect my android build?
Make sure you have the Android Tools inside the path folder.After you have the Android SDK downloaded and installed, you need to install build tools for the version of android you're targeting. You will need to check:
Tools
Targeted Android API Version
Extras
and hit Install in the Android SDK Manager. If something is missing after this, install
what build tool is complaining about.

Error to build a android app with cordova

I've had this problem when build a android app with cordova command:
cordova build android
D:\Desenvolvimento\ionicapps\AppBelle>cordova build android Running command: "C:\Program Files\nodejs\node.exe"
D:\Desenvolvimento\ionicapps \AppBelle\hooks\after_prepare\010_add_platform_class.js D:\Desenvolvimento\ionic apps\AppBelle add to body class: platform-android
Running command: "C:\Program Files\nodejs\node.exe" D:\Desenvolvimento\ionicapps \AppBelle\hooks\after_prepare\020_remove_sass_from_platforms.js D:\Desenvolvimen to\ionicapps\AppBelle
Running command: D:\Desenvolvimento\ionicapps\AppBelle\platforms\android\cordova \build.bat [Error: Android SDK not found. Make sure that it is installed. If it is not at t he default location, set the ANDROID_HOME environment variable.]
ERROR building one of the platforms:
Error: D:\Desenvolvimento\ionicapps\AppBell e\platforms\android\cordova\build.bat: Command failed with exit code 2 You may not have the required environment or OS to build this project
Error: D:\Desenvolvimento\ionicapps\AppBelle\platforms\android\cordova\build.bat : Command failed with exit code 2 at ChildProcess.whenDone (C:\Users\Victor\AppData\Roaming\npm\node_modules\c ordova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23) at ChildProcess.emit (events.js:98:17) at maybeClose (child_process.js:756:16) at Process.ChildProcess._handle.onexit (child_process.js:823:5)
D:\Desenvolvimento\ionicapps\AppBelle>echo %ANDROID_HOME% C:\Users\Victor\AppData\Local\Android\sdk\
Above I show location of env var ANDROID_HOME . I don't know what to do.
Help me, please.
Thanks
I'm learning Ionic (based on Cordova) these days, and I came to this similar problems in Mac os too when execute ionic build android, with similar error msg below:
Running command:/Users/ngloom/code/workspace/myWork/platforms/android/cordova/build
[Error: Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.]
and the msg still exist after i setting the ANDROID_HOME environment, upgrade the sdk tools, finally i have to look into the check_reqs.js which throw the error and i found that the js is based on the cmd output by android list targets, and finally I found the android is owned by root (very likely that the android is installed by sudo brew before) and only error returned when executing by my user.
So I change the owner of android and everything works !
I post my solution here as a solution backup, hoping to help the guys in case like me :)
Unfortunately this can be a bug caused by upgrading android SDK versions. In general look for for different reasons:
First if you have to set the ANDROID_HOME environment variable. (according to your OS - In windows , right click your PC icon "MY PC", --> properties -> Advanced system settings -> Environment Variables" and set ANDROID_HOME variable and edit PATH variable to your path to your android SDK, tools & platform tools.
Secound try the "android" command in command tool, if android sdk couldn't open it cause a problem to build your app. I got this error:
The "android" command is no longer available.
For manual SDK and AVD management, please use Android Studio.
For command-line tools, use
tools\bin\sdkmanager.bat and tools\bin\avdmanager.bat
to solve it, you should downgrade your sdk using this links:
(Mac) https://dl.google.com/android/repository/tools_r25.2.3-macosx.zip
(Windows) https://dl.google.com/android/repository/tools_r25.2.3-windows.zip
and replace the zip file with your "tools" folder in your android SDK, It will work fine after trying "android" command and building app command in cordova and ionic frameworks.
Digging the reason: (In my case)
Why failing android command is causing this problem?
part of the cordova or ionic configuration in js files are using android command to "VERIFY" your "ANDROID_HOME" and "PATH" environment variables to operate building your app, and in case of any failure accessing to Android sdk via command access, system tells you "Android SDK" is not found. Recently, in new version android command is no longer accessible and is causing issues for any operation whom used this command. :/
Hope it works for you, It took a time for me to figure out solving this issue and don't forget to (+1) if it helped you!
Setting environmental variables use this to set up the path to tools and platform tools and update SDK for the android version that you are trying to build and make sure weather its Ionic or cordova application and then try once

Android Studio can not access android sdk

I have installed android bundle for windows . I have also installed jdk 1.8 and set necessary environment variables.But when it opens and i try to create a project and click on tools->android sdk manager it shows the following error message:
Gradle build finished in 2 min 2 sec
2:52:43 PM ProcessNotCreatedException: Cannot run program "C:\androidnewsdk\tools\android.bat": Access is denied
i have already run it as administrator. i wanted to check what the problem was going to the sdk folder and clicked on sdk manager .it shows error message:
failed to execute tools\android.batch
the system cannot find the file specified.
PS. 1.temp folder in sdk is empty(might be a problem)
2.No error was shown during installation or update
I am running windows 8.1 64bit.(jdk is for 64 bit)
what is the problem??
Try setting the environment variable JAVA_HOME for jdk 1.8 .
Also have you set the jdk and sdk paths in Android Studio? Try doing that in File>Project Structure.
hope it helps
Finally I have solved the problem...
I had already set JAVA_HOME variable and other necessary things, but it was not working for some reason. Then i reinstalled windows and followed same installation procedures again, but this time everything worked just fine.

Android SDK Java: not found

A few days ago I started with Ubuntu for the first time. I want to use Android SDK with Eclipse. I installed everything needed. It only goes wrong when I try to start the Android SDK. There is a proxy server on the internet here, but when I try to insert it at:
Eclipse > Windows > Preference > Android > Launch and then enter the proxy in Default Emulator Options (link: How to set Internet options for Android emulator?)
Each time I start the SDK via Eclipse, I get failed to fetch with... so I found out that I can enter the proxy via the android tool. But when I enter ./android-sdk-linux/tools/android I get some errors:
./android-sdk-linux/tools/android: 84: java: not found
./android-sdk-linux/tools/android 101" java: not found
exec: 114: java: not found
I installed the JDK from oracle. I followed the steps and it did install via the terminal. After that I added it to the PATH(maybe I did it wrong here). I tried it with the JRE too. Eclipse gave an error at the begin about java. But when I installed a copy of the JRE in the Eclipse folder, it didn't give an error anymore.
So I think it's my JDK, but I don't know what I did wrong.
I use Ubuntu 11.10. 64bit via VMware Player.
On Ubuntu I had to go into the /sdk/tools/android and change the java_cmd variable to equal my JAVA_HOME path - then it worked.
[path from comment]
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home//android-sdk-linux/tools:/home//jdk1.6.0_29
Change the path of your JDK in $PATH to /home/<user_name>/jdk1.6.0_29/bin.
I have the same problem, and fixed it. I'm running Debian based Linux Distribution. And my setting $PATH variable environment didn't work even thought I can run java from Konsol.
Here is another better solution.
Linux Ubuntu Android SDK manager not starting up - android:java: not found
Solution which I mean is, make a symbolic link /usr/bin

Android SDK fails to install

When I try to install the android SDK it fails to install.
My OS is Windows XP
I just downloaded and installed Java JDK 1.6
Java -version from the command line returns:
https://stackoverflow.com/questions/ask
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)
My environment vars have:
JAVA_HOME=c:\progra~1\java\jdk1.6.0_11
I downloaded android-sdk-r04-windows.zip
I unziped it in V:\AndroidInstall\
When I go to the
V:\androindinstall\android-sdk-windows>
and type "SDK Install.exe" nothing happens...
If I go this from graph
When I do this from a graphical file viewer I get a quick flash that looks like a command line window and nothing....
When I try to run
android list targets
from the tool directory I get:
Error: Error parsing the sdk.
Error: V:\androindinstall\android-sdk-windows\platforms is missing.
Error: Unable to parse SDK content.
So the basic install setup is not happening.
Additional clues:
I have a G1 and Android 1.0 was running on this machine. (Almost a year ago)
I've updated my G1 to 1.6 so I thought I'd update my SDK before starting new development.
When I tried to upgrade it tried and then died as the "directory was in use"
So I cleaned out all the android directories, rebooted and redownloaded everythign from scratch.
Now it won't run at all.
I've clearly got something in an unhappy state, but I've cleaned up all the directories and no remanants seem to be running I've rebooted....
I've missed somethign I just can't figure out what.
Paul
You should manually create 2 more directories under your root sdk dir 'android-sdk-windows':
platforms
add-ons
and than start SDK Setup.exe from the root directory or try to open it from Eclipse
'Window' -> 'Android SDK and AVD manager'
Run the SDK setup
Wait for the error message
Disable anti virus
Install this unlocker program http://download.cnet.com/Unlocker/3000-2248_4-10493998.html
Run the unlocker program
select the tools directory to unlock it
select yes in the installer.
This is what worked for me.
http://code.google.com/p/android/issues/detail?id=4410#c41
The directories "platforms" and "add-ons" need to be manually installed in the android SDK directory (parallel to "tool"). This is only necessary in a new installation.
I had the same problem, adding the directory add-ons got rid of the error when eclipse is first open but I still couldn't download packages from the sdk manager.
What solved this problem for me (in windows 8) is running eclipse as administrator.
I got this error from my Jenkins CI.
It was because the Jenkins user did not have permissions on the android-sdk-linux folder.
(not the best solution but fixed it with):
sudo chmod -R 777 /usr/bin/android-sdk-linux

Categories

Resources