cordova requirements issue with Android target: "android-24 - android

While installing requirements for cordova in ubuntu... i am facing the target android issue:
Android target: not installed
Please install [Android target: "android-24][1] #target".
Hint: Open the SDK manager by running:
/home/hemanth/android-studio/tools/android
You will require:
"SDK Platform" for android-24 #target
"Android SDK Platform-tools (latest)
"Android SDK Build-tools" (latest)
Gradle: installed
Requirements check results for browser:
Check failed for browser due to Failed to check requirements for
browser platform. check_reqs module is missing for platform. Skipping
it... Error: Some of requirements check failed
Even I have installed api 24 still I am getting same error
https://i.stack.imgur.com/Mwvns.png
how to correct this target android error?

i got it..its just installation issue...api-24 version supported by cordova but have to install all APIs ..before doing click on start new project in android-studio
android-studio home page ->settings -> sdk manager -> Select APIS to download
now no issue with target android error
[1]https://i.stack.imgur.com/w5Mrs.png "cordova requirements result"

Unless you have an old version of the SDK, the android cmd is deprecated. Instead try this 1st: avdmanager list target
I'm assuming it won't return anything so then run this: sdkmanager --list
The 1st thing it spits out is what you have installed followed by a list of available packages. Assuming you don't have any platforms installed, look in the list of available packages for platforms;android-XX where XX is the version you wish to target (it should match your platform-tools version)
Then run: sdkmanager "platforms;android-XX"
Now when you run avdmanager list target you should see the API version you just installed and your app should build.

As per their documentation only API Version 23 and below are supported (as of 2017-01-11. Down to version 10 or version 14 of the android API depending on your version of Cordova): http://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html
Requirements and Support
Cordova for Android requires the Android SDK which can be installed on OS X, Linux or Windows. See the Android SDK's System Requirements. Cordova's latest Android package supports up to Android API-Level 28¹. The supported Android API-Levels for the past few cordova-android releases can be found in this table:
cordova-android Supported Android Equivalent Android
Version API-Levels Version
8.X.X 19 - 28 4.4 - 9.0.0
7.X.X 19 - 27 4.4 - 8.1
6.X.X 16 - 26 4.1 - 8.0.0
5.X.X 14 - 23 4.0 - 6.0.1
4.1.X 14 - 22 4.0 - 5.1
4.0.X 10 - 22 2.3.3 - 5.1
3.7.X 10 - 21 2.3.3 - 5.0.2
Please note that the versions listed here are for Cordova's Android package, cordova-android, and not for the Cordova CLI. To determine what version of Cordova's Android package is installed in your Cordova project, run the command cordova platform ls in the directory that holds your project.
As a general rule, Android versions become unsupported by Cordova as they dip below 5% on Google's distribution dashboard.
¹NOTE: This has been updated as of 2020-04-18 to update information in the table above. The wording of the post is being retained as answered so as to speak to the original question as asked. Future readers are advised that they should consult the source link to confirm version compatibility.

Related

"Missing SDK Platform Android Preview, API 28" error when installing Android SDK Tools on OS X

I'm trying to install the Android SDK Tools on my Mac so that I can export projects from Unity 3D to an Oculus Go. I have version 25.2.5 installed successfully and now I'm trying to install the necessary packages. Executing android by double clicking on it pulls up a GUI that suggests a series of packages to be installed.
I was able to install
Android SDK Tools (rev 25.2.5)
Android SDK Platform-tools (rev 28)
Android SDK Build-tools (rev 28)
and all of Android 9 (API 28)
Unfortunately it also suggests install of
API 28, P preview
which contains:
Wear OS Intel x86 Atom System Image
When I attempt to install this last component I get an error message:
Package 'Wear OS x86 Atom System Image, Android API P, revision 2' depends on 'Missing SDK Platform Android Preview, API 28'. It seems weird that a suggested component would have a dependency on something that isn't present.
Anyone have any suggestions on how to fix this? Is it possible that I will have a functional toolchain without installing the API 28, P preview package?

Android version nativescript

I have got android sdk installed and set android_home. In fact I'm developing with ionic and everything is ok.
Now I want to test nativescript but I'm not able to configure it. I installed everything and I get the error:
You need to have Android SDK 22 or later and the latest Android Support Repository installed on your system.
I have android 23 version installed and also 19. I installed also 22 as I read in other pages that nativescript have a problem even if you have an upper version, but even with andorid 22 it doesn't work. Any ideas?
Which OS are you using? Have you installed also Android support repositories from SDK manager?
I have installed Android SDK tools from version 19 to 23, SDK platform-tools and SDK build-tools.

How do I install Android SDK Platform-Tools 24.0.0?

I'm following the guide for setting up the Android N Preview https://developer.android.com/preview/setup-sdk.html
In "Update or Create a Project" Google says I need to have 24.0.0 platform tools.
Just be sure that you've updated your project to use Android SDK Build
Tools 24.0.0 and Android SDK Platform-Tools 24.0.0.
I have installed the new SDK Platform: Android 6.X (N), API Level 24, Revision 1. However when I open SDK Tools the only Android SDK Platform-Tools version is 23.1.
I have updated my build.gradle for Android 24 and for Jack and Java 8 (see).
Everything works great on Android 24 simulator but crashes on a device or simulator running Android 22/23 (less than 24) with the following error:
java.lang.NoSuchMethodError: No virtual method
stream()Ljava/util/stream/Stream; in class Ljava/util/ArrayList; or
its super classes (declaration of 'java.util.ArrayList' appears in
/system/framework/core-libart.jar)
I suspect the cause is having SDK Platform-Tools version 23.1.0 instead of 24.0.0 but if there is another solution i'd be happy to hear it.
Edit
Installing platform tools 24.0.0 rc1 did not fix the crash.
I'm not sure what else to try given that I have followed all the instructions to setup the preview and the Jack compiler.
but crashes on a device or simulator running Android 22/23 (less than 24) with the following error
java.util.stream.Stream was added in API Level 24. This class cannot be used on older devices.
Certain Java 8 features, like lambda expressions, may work on older devices, but not classes that were introduced in Android N.
Just select the show package details and then you can find all the versions. Refer to the attached image
Asuming you have Android Studio 2.1
Launch the standalone SDK manager.
From there Android N API 24 should be available to install
Your API level 24 app runs OK with Android 24 (virtual) device but doesn't work with pre-24 device - so everything is exactly as one would expect.

Cordova cannot find Android 19 SDK while setting up Android project

I am receiving this error message while trying to run "cordova platform add android":
"Error: Please install Android target 19 (the Android newest SDK). Make sure you have the latest Android tools installed as well. Run "android" from your comm
and-line to install/update any missing SDKs or tools."
However, I have the SDK installed (SDK Tools 23.0.2, SDK Platform-tools 20, SDK Build-tools 19.1). I have my ANDROID_HOME set to "C:\Program Files\Android\android-sdk". This is the tail of the environment variable PATH on my computer:
"...;C:\Program Files\Java\jdk1.7.0_67\bin;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;%USERPROFILE%\AppData\Roaming\npm;C:\Program Files\Android\android-sdk\tools;C:\Program Files\Android\android-sdk\platform-tools;C:\Program Files\Android\android-sdk\build-tools;%USERPROFILE%\AppData\Roaming\npm;C:\Program Files\WinAnt\bin"
Can anyone clarify if I am doing something wrong here? How to make it work?
What I found out eventually is when Cordova asks for Android target 19, it does not mean Android SDK Revision 19. Rather it refers to the Android 4.4.2 which has an API level 19.
So installing the Android 4.4.2 from SDK manager was the solution.

Android SDK manager cannot download samples of android

I have downloaded the Eclipse IDE with built-in ADT (Android Developer Tools) of the latest version. Then I run the Android SDK manager to get the samples
as the picture descripted below:
Name API Rev Status
Tools
Android SDK Tools 22.0.1 Installed
Android SDK Platform-tools 17 Installed
Android SDK Build-tools 17 Installed
Android 4.2.2(API17)
SDK Platform 17 2 Installed
ARM EABI v7a System Imange 17 2 Installed
Extras
Android Support Library 13 Installed
There is no "uninstalled " options , So how can I get the samples and other uninstalled packages?
Thanks in advance!
After investigation, "https://dl-ssl.google.com/ " is banned from accessing because of some reasons. And based on the solutions from network I can resolve the problem.
The solution:
environment: WINDOWS 7, Eclipse IDE with built-in ADT
find the file hosts from the directory"C:\WINDOWS\system32\drivers\etc"
edit the file hosts, append "74.125.237.1 dl-ssl.google.com"
save the file
run the Android SDK manager.exe
choose the uninstalled packages and download them

Categories

Resources