Compatible Android SDK Error on Nativescript 3.0.3 - android

I need help. :(
I was studying Nativescript these past days. And now, I've managed to create an app using the tutorial and I'm currently trying to build it on an Android device to test. When I tried running it using tns run ios, it runs smoothly on an ios emulator. But when I tried running tns run android I got these error.
The plugin tns-android#3.0.1 is already installed
TypeError: Path must be a string. Received undefined
# run android
and sometimes..
this..
You need to have Android SDK 22 or later and the latest Android Support Repository installed on your system.
(when I tried to run several solutions like export android sdk, etc...)
I have several Android SDK installed (Please refer to the screenshot below)
Android SDK Screenshot
I've validated if my Android SDK url is correct by running:
ls $ANDROID_HOME
also..
ls $ANDROID_HOME/platforms
**which shows the ANDROID SDK files.
Lastly, here's my configuration:
OS: Mac Sierra Version 10.12.5
NPM: 4.6.1
Node: v6.10.3
Nativescript: 3.0.3
What should I do? Please help. :(
Thank you in advance.

Related

Cordova not building app

I am new to cordova. Trying to work out with it but when I check requirements it says Android Target not installed while I have installed SDK in Android Studio.
Required information for troubleshooting can be found here.
I am using Windows 8.1 32 bit installation. I have already tried previous answers found oh the site.
Update
I just noticed that running cordova build android gives
D:\Android\Apps\hell>cordova platform ls
Installed platforms:
android 7.0.0
Available platforms:
browser ~5.0.1
ios ~4.5.4
osx ~4.0.1
windows ~5.0.0
www ^3.12.0
Indicating android version to be 7.0.0 thus API is 24.
But D:\Android\Apps\hell\platforms\android\CordovaLib\project.properties have :
# Indicates whether an apk should be generated for each density.
split.density=false
# Project target.
target=android-26
apk-configurations=
renderscript.opt.level=O0
android.library=true
Here target is set to android-26, which is Android 8.0
From what I can tell the path setting for the SDK is missing. Check the Cordova documentation for that. Follow it to the letter.
Also Android 7.0.0 is not the version of Android, but of the Cordova code for Android.
Josem might be onto something as well, unless you've already done that step.
Perhaps the platform android is not installed.
Can you see it?
ionic cordova platform list
If it is not there, you can add it:
ionic cordova platform add android
Here is the documentation.

Android SDK installed but not seen by cordova

I've installed android studio 3 which sees android-sdk:
The same path I have in enviroments variables but I cannot use android sdk with cordova. (I'm makeing ionic app).
Here is screen shot from IDE:
Edit:
More screenshots:
What cordova is looking for at this step is not the sdk but the sdk tools. Have you installed the sdk tooks (middle tab in your first picture)?
To know what exactly is missing you can use the command
cordova requirements android --verbose
It will show you that cordova is trying to launch the command %ANDROID_HOME%\tools\bin\avdmanager.bat list target and displays that the SDK is not found if the command is not found.

PHONEGAP - Error while starting emulated android on phonegap; I use the SDK installed by android Studio

The error I get on the console; When I run the command "phonegap emulate android"
->Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK. Looked here: C:\Users\wende\AppData\Local\Android\sdk\tools\templates\gradle\wrapper
I also experienced this issue (among many others) in my attempts to get a phonegap app to work in my environment.
I found a solution in the second response (by jcesarmobile) to this question:
Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK - Android
Specifically, I had to make sure my Android Studio and Android SDK Tools were updated to the latest version, and then I had to update my Cordova Android platform to version 6.2.2.
phonegap cordova platform rm android
phonegap cordova platform add android#6.2.2

Meteor 1.3.3 on Mac running android: Android target: Android SDK not found

For a client of mine, I try to run the meteor run android command on a mac and I got the following message:
βœ“ Java JDK
βœ“ Android SDK
βœ— Android target: Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.
The situation so far:
PATH is correctly defined with links to the tools and to the platform-tools, ANDROID_HOME is fine too
The emulator and the SDK are installed with Android Studio
gradle is not found either, the tools/templates/wrapper path does not exist, which make me suspect a bad SDK installation, yet Android Studio handles everything
Meteor version is 1.3.3 for this project, and of course android paltform has been added to the project, which run fine on my Linux laptop
Verbose is not that verbose, in which situation Android SDK is okay and Android target is not ?
This is very hard to debug and I am desperate to find a solution, this issue seems unresolved in other related threads. Thanks for your help!
This is actually a bug due to the new version of the Android SDK Tools (> 25.3).
The solution is to go back to 25.2.x, the Meteor guide mobile page has been updated a few hours ago.
See the related Github issue
Links to download 25.2.5 version:
https://dl.google.com/android/repository/tools_r25.2.5-linux.zip
https://dl.google.com/android/repository/tools_r25.2.5-macosx.zip

Titanium doesn't recognize Android SDK on Windows

Titanium doesn't recognize Android SDK on Windows
My problem is that Titanium Studio doesn't see my installed Android Platforms. I've tried removing and reinstalling everything via Titanium Studio but that won't make any difference.
Here's a screenshot of the SDK Manager: http://imgur.com/5F5oF
Titanium Studio Screenshot: http://imgur.com/w7j7n
Titanium Studio Details:
Titanium Studio, build: 1.0.8.201201262211
Build: jenkins-titanium-rcp-master-136 (origin/master)
Date: 26 January 2012, 22:14:21
OS Information:
Microsoft Windows 7 Ultimate
6.1.7601 Service Pack 1 Build 7601
Problem in Titanium Studio:
One or more pieces are missing from the Android SDK.
It may be that the Android SDK is already installed
and Titanium Studio cannot locate the directory, or
it may be that some additional components need to be installed.
Items required:
β€’An Android SDK is missing. Titanium requires Android platforms 2.1.* and 2.2.*
We just spent a couple days wrestling with this problem. The issue is with the latest version of the mobile sdk that you've installed. Titanium Studio actually uses the following script to validate the Android SDK path in the configuration window:
MAC path looks like this:
/Library/Application Support/Titanium/mobilesdk/osx/sdk_version_number_here/android/avd.py
Based on your post, your path is probably something like:
C:\Users\Dean\AppData\Roaming\Titanium\mobilesdk\win32\sdk_version_number_here\android\avd.py
If you browse to the folder and look for that script, it's probably missing. We just deleted that version of the sdk (for us it was 2.0.1.GA2). Then went to Help -> Check for Updates to reinstall the latest version.
Can you try installing all the api levels. SDK level 10-15.
Hopefully that would help. I am also running Titanium on the same version of windows, and it works fine.
This looks crazy, but you need to install sdk 7 and 8, with the google APIs. I think that they have code nested to these SDK. Check twice that you accept the licence with Google API.
Here is the complete guide of installing Titanium with Android.
I broke my head for 2 days on the very same problem, and the solution is quite simple:
Titanium 3.2 and above does not work with android sdk in Windows.
Downgrade to 3.1.3 and everything will be just fine
https://wiki.appcelerator.org/display/guides2/Reverting+to+a+Previous+Version

Categories

Resources