Nativescript install on windows doesn't work. - nativescript

I installed nativescript from https://docs.nativescript.org/start/quick-setup page, and when I checked tns doctor I get this error:
I could search for the errors and probably learn a thing or two about the errors, but what I don't understand is why the installer itself didn't install Android SDK 22, or the other issues. I gave it full permission and it installed the sdk and other everything.

You need to android sdk 23 AND the sdk of your choice (ie 25). I would recommend using the installer instead of the cmd install line as it is a lot easier to use, which can be found here. If you use the installer, it installs the versions you need and changes the environment variables for you as well as the other parts it needs.
EDIT
Another thing to mention is that even though the installer changes the paths for you and installs the sdks, you still need to make your own emulator image. It's not hard to setup but unfortunately the nativescript installer doesnt do that for you

First up, install Android Studio
https://developer.android.com/studio
Install android API level 25 (Nougat), from the SDK Manager.
Also, setup a virtual device, if you want to run apps on emulator.
That should setup all necessary environment variables for building Android apps with nativescript.

According to the result of tns doctor, you have to install Android SDK.
You can simply install Andriod Studio. Start up Android studio, and use the built-in SDK manager to install required SDK, choose the correct version(>=23 <= 26) which was indicated in the result of tns doctor.
Alternatively, you can install Android SDK standalone, download it from Android developer site and extract files in your system, then follow the instruction of tns doctor, go to Android SDK folder, and find sdkmanager, and start up it to install required SDK with correct version.
Set ANDROID_HOME environment variable, the location points to the Android SDK folder, eg. E:\Users\hantsy\AppData\Local\Android\Sdk
Finally, try to run tns doctor again to check if all conditions are satisfied.
You can run the packaged Android app in one of the following:
Android SDK built-in simulator
A real Android mobile device
Genymotion Android simulator, more productive than SDK built-in one

Related

Run flutter from vs code to physical phone without Android studio or emulator on windows

I started to Learn flutter toolkit need to run the app on physical phone no need to install emulator or Android studio just I install:
A)Flutter sdk and add to windows path.
B)install vs code to use as editor , just add flutter plugin to it
C) connect my physical Android phone and already work in developer mode.
The problem when I run command
Give me that my phone not connect and when run app using F5 in vs code ask for emulator I don't need that I need physical phone only.
That is flutter doctor I have any body can help me what I need to add to my PC no need Android studio no need to add any emulator.
$ flutter doctor
[√Flutter (Channel stable, v1.12.13+hotfix.9, on Microsoft
Windows [Version 10.0.17763.1158], locale ar-SA)
[XAndroid toolchain - develop for Android devices
X Unable to locate Android SDK.
Install Android Studio from:
https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android
SDK components.
(or visit https://flutter.dev/setup/#android-setup for
detailed instructions).
If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
You may also want to add it to your PATH environment variable.
[!Android Studio (not installed)
[√ VS Code (version 1.44.2)
[!Connected device
No devices available
Doctor found issues in 3 categories.
You must need android sdk to run flutter app on your android and xcode for running on iphone. Download android sdk and check again.

Android SDK location in OSX - Has it been actually installed by Unity Hub?

We are using Unity 2018.3.8f1.
We have added Android Build Support from Unity Hub - Add Component:
But if we go to Unity Preferences - External Tools, the Android SDK location is empty:
I have not been able to find the location of the Android SDK folder anywhere. I'm wondering if the component installed by Unity Hub is something different to Android SDK. Maybe it must be installed separately from: https://developer.android.com/studio?pkg=tools#downloads?
UPDATE
So far I have installed "Command line tools only" from the previous link. Then, I have installed OpenSDK (Vistual Studio did it for me: it asked me to update and install it as one of the things to update).
But when I opened tools/bin/sdkmanager, it said "Java is not installed". So I also installed Oracle Java SDK. Unfortunately tools/bin/sdkmanager returned errors after it. I applied a few workarounds I found by googling the errors. Still not luck.
So I have moved to the easy way: installing the full version of Android Studio. If we choose custom, we'll see that Android SDK Platform is going to be installed:
So it is working, but I still have not idea of how many things I have duplicated on my system wasting space. I have:
The Android component installed from Unity Hub
Android Studio installed, which comes with the emulator and the IDE (I don't need them)
OpenSDK (installed by Visual Studio)
An embedded version of Java in Unity
Oracle Java
Are they all actually needed? I don't think so!
It seems the only thing you are wondering is if the component installed by Unity hub is something different to Android SDK... the short answer is yes. You have to download it on the Android Developer SDK website you linked in the question. You only need the SDK under "Command line tools only" at the bottom of the page. If you do this you also need to download the jdk separatly here.

Appcelerator | 'Android Distribution' Android SDK version 4.1.2 not found

I have pulled an Appcelerator project from our developer group and unable to publish or run the project on a local Android device.
When trying to publish the below error screen immediately pops up.
Android SDK version 4.1.2 not found.
I have checked both in the Appcelerator platform settings and Android Studio config and have the SDK installed.The install SDK screen in Appcelerator Tried uninstalling/reinstalling Appcli and the SDK to no avail.
After a few days of searching all the appecelerator files in my project. I finally found the fix for my problem (for anyone googling this).
There's a hidden file in the root of the Appcli project called .settings
Inside of settings there's a package called com.appcelerator.titanium.android.core.prefs
There is an android/sdk_version=4.1.2 that was causing all my issues. Hope that helps someone.
Most likely, your issue seems to be with unsupported Android SDK version as per Ti SDK you are using.
So before doing anything, try to grab what this page says to know all about software compatibilities: Titanium Comptability Matrix
It says that minimum Android version as of latest Ti SDK 6.x.x is API 16.
Now, follow these steps carefully to get a fresh start on your system.
First of all, download Android latest SDK from here: Android SDK
Unzip it & put it in at some simple path like in /Users/username/android-sdk
Download Appcelerator Studio (AS) & install it. It will download all pre-requisites like Java, Python
Open Appcelerator Studio & go to Preferences->Studio->Platforms->Android. Select the path of android sdk you unzipped in step 2.
After all these steps, you can open Android SDK Manager (see screenshot where it is) & install necessary SDK, Tools, etc.
Note: I do not suggest to download SDKs via AS as I have faced path issues in beginning.
Even if these steps do not help you, then provide us the log output after running this command on terminal: appc info
If terminal says this command is not found, then you need to go through the AS installation properly.
I had the same issue. Simply deleting all " Android Play Store Distribution" configurations solved my problem.

Where is adb located when installing Unity and Android SDK for Mac?

I'm getting Android Build Failures and would like to locate adb to do some queries like adb devices but where is adb installed? I've already installed the Android SDK for Unity.
From #Programmer's answer, this line is no longer true:
You are responsible for downloading, installing and setting up Android SDK and then manually setting the paths in Unity.
Unity now allows and encourages you to install the Android SDK via their Unity Hub:
Use the Unity Hub to install Android Build Support and the required Android SDK & NDK tools:
From the same page, I found adb.exe is located at: /c/Program Files/Unity/Hub/Editor/2019.2.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/SDK/platform-tools/adb.exe
Updated answer for 2022:
C:\Program Files\Unity Editors\YOURVERSION\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools
For OSX users:
/Applications/Unity/Hub/Editor/2022.1.0b16/PlaybackEngines/AndroidPlayer/SDK/platform-tools/adb
Where is adb installed when it comes with unity?
adb is never installed when you install Unity. You are responsible for downloading, installing and setting up Android SDK and then manually setting the paths in Unity.
You download Android SDK, then JDK and setup the paths in Unity.
That's it. If you want to build for Android with IL2CPP then you must also download the Android NDK and also set the link up in the Editor.
See this post if you have problems setting it up.
If you want to see the SDK path go here:
EDIT:
Go to Edit ---> Preferences --->External Tools then scroll down to SDK under Android, you will see the SDK path there.
Once you find the SDK path, "adb.exe" will be located at <SDK_PATH>/platform-tools.

Android Studio for Project Tango

I have downloaded latest Android Studio 2.2.3 and I want to start with C examples for project Tango phone (Lenovo Phab 2 Pro) using C API. The phone itself says it's run Android 6.0.1, kernel 3.10.84 on device.
Google developer documentation for Tango Project suggest to install Android Studio with Android SDK 24.4.1, Platform tools 23.1 and NDK 11.0.0.
By installing latest Android Studio there is no offering to install those versions of tools. Is it possible to use whatever SDK for development (latest)?
Where do I find aforementioned versions?
What Android SDK & NDK version is required for phone which run Android 6.0.1?
I started using the Dev Kit which runs Android 4.4 KitKat and I just recently got the Phab 2 Pro this week and I didn't need to make any updates to my Android Studio SDK manager.
Since I am working only with the Tango and not with the underlying Android features, I have found no need to require 6.0 for I am not using any of the extra features.
Also go here and clone the repo and run the hello-world and see if you can get it to work on your phone, if so you are good to go!
the SDK Manager which is part of Android Studio offers you choices on levels of android builds like 4.4.2/5.1/6.0/6.1, etc. Platform tools package is a module within the SDK Manager which also has levels which are based on the android build. The NDK is a completely different package and depending on what you want to accomplish you might be able to not worry about it to start of with. install Android Studio and then setup the SDK Manager to cover what devices you want to build for. get the latest Platform tools package setup and you will be ready to code. once you start setting up your environment things will fall in place. for the most part the installer does the work. pay attention to the things needed prior to installing Android Studio. i think you need to install a jdk and set paths and variables.

Resources