1

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

sravan
  • 97
  • 1
  • 10
  • You seem to have the latest Android SDK tools ? With the version of Cordova that is in 7.1 , it uses android. – Vivin K Jul 17 '18 at 18:42
  • Can you share the steps ,in the screen shots provided does not show which mfp command you are performing.Pleas add steps to recreate the issue. – manjunath kallannavar Jul 19 '18 at 13:33
  • Yes @VivinK. I was planning to develop a test mfp cordova app targeting the latest android API 28 with mfp 7.1. – sravan Jul 19 '18 at 15:00

1 Answers1

1

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