0

Things i have done via MobileFirst CLI

  1. Create a sampleProject.
  2. Added Android Environment.
  3. Build and deployed the MobileFirst Project.

Now i have the Android-->Native (Folder)

Now how i use this Folder to create my native android App.

i want to build via CMD line.

Kawinesh S K
  • 3,148
  • 1
  • 16
  • 29

1 Answers1

1

Edit: if what you're asking is "how to generate the APK for my hybrid application from command line?", then this is not related to MFP.

For a Hybrid application, MFP generates the native folder for you. You then need to use Android tools such as Android Studio or the Android ADT command line to further work with the Android project.

See here: Building and Running from the command line / from Android Studio.

Note that Google's documentation assumes your project supports Gradle, which MFP projects (7.0 and below) do not support at this time. You should probably use the Eclipse ADT UI or Android Studio (do not select to upgrade the project with Gradle support) rather than command line.

These instructions are older (so no mention of Gradle), you can try those.
http://codeseekah.com/2012/02/09/command-line-android-development-basics/


That does not look like a native Android component generated by MFP. It looks like a Hybrid application with the Android environment. Not the same.

To create a native Android component (= the MFP SDK for Native Android applications), you need to generate the NativeAPI and associated artifacts that you then need to copy over into your own, separately created by you (using Android ADT or Android Studio), native Android project.

You can do this using the following set of CLI commands (or via the MFP Studio):

mfp create MyProject  
cd MyProject  
mfp add api MyAndroidFramework -e android

Read more here: Using CLI to create, build, and manage MobileFirst project artifacts

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
  • I have created a hybrid application and for that hybrid application i want to create a native android app which when i use Eclipse along with ADT and Worklight i automatically get . But how to do that manullay – Kawinesh S K Apr 08 '15 at 05:34
  • I'm sorry, but it looks like you do not understand the structure of a MFP application. From what you're writing, it looks like what you want is to generate the native folder of the Hybrid application (containing the Android environment)? For that, you simply need to Build your application. Use "mfp build". After the build phase you need to open the native folder in Android Studio or use the ADT tools to generate the .apk - that is not the job of MFP. – Idan Adar Apr 08 '15 at 05:37
  • Lets say that my android environment is build and successfully deployed.Normally in Eclipse while i do that ill get the android Project Created and ready to be deployed in my Phone. But in command line thats not the case since we dont have such facility like Eclipse ADT. So now how to do the above mentioned via command lines. – Kawinesh S K Apr 08 '15 at 05:41
  • I have edited my answer. You should consult with the Android documentation for using the command line, that's not related to MFP. – Idan Adar Apr 08 '15 at 05:42
  • "For a Hybrid application, MFP generates the native folder for you. You then need to use Android tools such as Android Studio or the Android ADT command line tools in order to further work with the Android project " yes i need this only any documentation or steps for this – Kawinesh S K Apr 08 '15 at 05:43