i want to use phonegap-plugin-push in a app with salesforce sdk 10 and android version >9 , but not able to do because this plugin is deprecated.
i tried to install phonegap-plugin-push plugin which required cordova-support-google-services#1.3.1, but the problem is cordova-support-google-services#1.3.1 required android version <9 to be installed.
Related
In one of my android project i have integrated com.braintreepayments.api:drop-in:5.0.2 for payments which internaly uses cardinal mobile sdk 2.2.4-1 . Is there any way to upgrade only cardinal mobile sdk to 2.2.7-1 without upgrading the com.braintreepayments.api:drop-in:5.0.2
we tried upgrading the com.braintreepayments.api:drop-in:5.0.2 version but it asks to upgrade my project version to 31. After upgrading to 31 other dependency show errors.so want to only upgrade the cardinal sdk without upgrading the braintree
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
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/
I am in the process of setting up a new Cordova CLI toolchain to build hybrid Android apps that target Android 5.1+. I am using
Node 8.9.2
Cordova 7.1.0
After issuing a cordova create... command to create a new Cordova project I proceeded to add Android 5.1 using cordova platform add android#5.1.0 which went smoothly.
I have also ensured that I have the relevant Android SDKs available and pointed at properly via ANDROID_HOME. I currently have SDKs 19 through to 27 installed.
However, when I issue a cordova build android I get the message Error: Android SDK not found. Strangely enough if I let Cordova install its current default Android version via cordova platform add android which adds Android 6.3.1 it then lets me build the project without any further ado.
Is this a matter of Cordova 7.1.0 simply not wanting to play ball with lower versions of Android or is there something else going on here? Can I get around this by installing an older version of Cordova via npm? If so, which version should I install - and how?
Your problem is you're adding an old version of the cordova-android platform project, (v5.1.0) which is over 2 years old and not compatible with the cordova#7.1.0 CLI.
If you want to target Android 5.1+, you don't need to use cordova-android#5.1.0, you need to specify a preference in the config.xml to target Android 5.1 (API 22) and above:
<preference name="android-minSdkVersion" value="22" />
You probably want to use the default cordova-android platform version (6.3.1), unless you need to do stuff with Android Studio 3, in which case use cordova platform add android#latest which will add cordova-android#7.0.0 and requires Gradle 4 to build (see here).
Yesterday i got a mail from google play team they notice that You are using a vulnerable version of Apache Cordova please upgrade to version 4.1.1 or higher to fix the vulnerability.
Now my project cordova version is 4.0.2 and i am updating it using the command
cordova platform update android
Here is the result form it
cordova platform update android
Updating android project...
Android project updated with cordova-android#4.0.0
But when i check my project cordova version ist still `4.0.2 ,it dosen't updated to newer version.
My cordova version is 5.0.0
Try the following, which will install the latest version of Cordova Android:
cordova platform update android#5.1.0