Cordova error while building android using CLI - android

I am struggling through the cordova more than a week as i new to it.
I have added android platform and i am facing the following issue while building that android environment:
P.S.
Cordova - 6.0.0
Android SDKs - API 19 to API 23
Windows 8
Please help me as soon as possible.

Related

Cordova file plugin not working for android sdk 30

I have an app with Cordova 8.1.2. Everything was working until i upgrade Cordova 10 and android sdk version to 30. After upgradation reading external file system not working in android for api 30.
Can you please help me out on this.
Thanks in advance.
you will have to change back to Android 9 (sdk 28) check if it is running fine then upgrade back to sdk 30. probably you encountered some error along the line.

Unable to create mfp cordova project in Android 28

Latest Android SDK is not letting me use android command, as it is deprecated to create a mfp cordova project.
I'm using IBM MobileFirst CLI v7.1.0.00.20180706-0858 and latest Android SDK & Android Studio.
May I know any work around to create a project with mfp cordova?
Updated
Steps to reproduce the issue:
1) Download and install the latest Android Studio and download the latest Android SDK using sdkmanager. Set the system variables to the downloaded SDK buildtools and tools.
2) Download and install the latest MFP CLI v7.1.0.00.20180706-0858.
3) Run mfp cordova create in the command line and the following error happens.
MFP cordova project create Error Screenshot
Android Deprecated Screenshot
Thank you
MobileFirst CLI contains an instance of Cordova CLI v5.0.0, Android platform version 3.6.4.For more details see here :
https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/7.1/hello-world/integrating-mfpf-sdk-in-cordova-applications/
Cordova-Android#3.6.4 works only with older tools of android such as Android target: android-23.In your case you have updated your platform tools to latest that is why you are seeing such error.
I have uploaded older tools of android here :
https://ibm.box.com/s/je74bzx73y6je65tdnpttyns4ih1zj7b
Rename or take back up of your existing tools in android sdk path.Put uploaded tools in android sdk path.
With Android P that is targeting to API 28 with MobileFirst 7.1 app ,you may face an error java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/params/BasicHttpParams;
Work around is to add below tag in AndroidManifest.xml inside the tag:
Google's issue tracker
The same has been update in the
Android P blog

How to specify the Android API version by adding in Cordova

After creating a mobile-first Cordova project with the command:
cordova create cordovatest1 com.sample.cordova cordovatest1 --template cordova-template-mfp
I add the Android platform to the project with the command:
cordova platform add android
the question is why the Android version for the platform which was just added takes the Android API 23 / android version 5.1.1, even I have already other API levels: 22, 25, 27 in SDK manager?
is there a config file belong to Cordova says that the Android platform must be for example android-23 if the developer didn't specify the Android version by adding like
cordova platform add android#6.1.2
or maybe the mobilefirst-cli witch is already installed under the version 8.0.0 force that adding platforms?
This screenshot can give you more details
This is unrelated to IBM MobileFirstPlatform SDK plugin. The Android target is determined by your Cordova version.
For example, cordova-android#6.1.2 targets Android API Level 25.
cordova-android#6.3.0 targets Android API Level 26.
Details here.
You have not mentioned your Cordova CLI version. Since you see cordova-android#5.1.1 being added, it seems to be Cordova CLI version 6.0.
The results would be the same if you were to create a blank Cordova project ( without cordova-template-mfp) and then add platform.
why the Android version for the platform which was just added takes
the Android API 23 / android version 5.1.1
Because you have saved Android 5.1.1 in npm-cache.
Check npm-cache folder:
C:\Users\Training\AppData\Roaming\npm-cache\cordova-android
Currently the Cordova android platform versions supported by the MobileFirst plug-ins, is:
cordova-android: >= 6.1.2 and < 9.0
Try using these command:
To upgrade:
cordova platform update android#9.0
To add it explicitly:
cordova platform remove android
cordova platform add android#9.0
or
cordova platform add android#latest
For more details see here : https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/application-development/sdk/cordova/

Can't build android project in IONIC framework

I'm trying to build my test app for android device with IONIC framework using WEB technology.
I installed IONIC FRAMEWORK and configured everything with the help of Ionic Framework Docs.
And now I am trying to build android app using command line:
ionic build android
But this gives me Error to install the following targets:
ERROR: Please install android target: "android-23"
I Have a problem to understand about android-23. What's this and how to install it for my android platform tools.
I also updated SDK platform tools and SDK build tools.
API level 23 stands for marshmallow ,have you installed the Android SDK successfully .just check this link,https://googleweblight.com/?lite_url=https://source.android.com/source/build-numbers.html&ei=7Sw_Jjql&lc=en-IN&s=1&m=141&host=www.google.co.in&ts=1458486558&sig=APY536yicvyJBcnb8fM_Ldmz-Kzx9dINVQ

phonegap 2.6 and android API 2.2

I'm started with a new phonegap application and I want to use the 2.2 Android API.
I've got error even in the initial project.
I can resolve these problems using a major version of the API (4.x).
Is there a way to build application with PhoneGap 2.6 for android API 2.2?
maybe I do somenthing wrong in the
./create <p1> <p2> <p3>
project.
using oracle-jdk7U21 and android-sdk-linux
the ANDROID_BIN is set to
android-sdk-linux/tools/android
EDIT and SOLVED
It's everything fine for compatibility build with Android API 16 and using a device that support API 8.
so i figured out it's ok using the android sdk 4.x and run on device with andorid 2.2 (until now)
for downloading android sdk follow the link Android
and for phonegap eclipse

Categories

Resources