0

So, what the title says, I already coded my app, but I wanna build an APK from it, and install it into my phone (Android), I read the documentation about the subject but I am lost.

Could someone explain to me in an easy way what to do? I use Windows.

I only try using cordova, as the Ionic documentation says, when I use this command 'ionic cordova prepare android', I get an error thay says that cordova does not support Vue.js or somwthing like that

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103

3 Answers3

0

Easier way is to first import your project to Android studio

To import

  1. Open Android Studio
  2. Open the platform/android folder of your project in Android Studio

To Build

  1. Navigate from the toolbar Build -> Generate Signed Apk
  2. Create your Key file (you will need to save this key file for future updates)
  3. Select release and V1 and V2 signature variants and off you go..

Don't forget that you will need to first build your Cordova project using cordova build android command before executing the above steps.

You can find detailed documentation on from the Cordova Official Documentation.

Nidhin Joseph
  • 9,981
  • 4
  • 26
  • 48
  • Thank you for answering, but I can't execute the command `cordova build android` because it causes the following message: Current working directory is not a Cordava-based project. – Agustin Villar Jun 25 '19 at 12:43
  • This is a typical error when you copy folders or in other words did not use `cordova cli` to create the project. Try to create the project using `cordova create app com.app` and that should resolve the error. – Nidhin Joseph Jun 26 '19 at 05:56
0

you can read this topic

it's very useful for building APK's and sign them

Ali Mhanna
  • 401
  • 3
  • 14
-1

Steps to build debug APK for testing:

1). Add Android Platform ionic cordova platform add android

2). Connect your phone(enable Developer Mode from settings) and run ionic cordova run android // this will build and install directly in your device.

3). When app starts open Chrome and inspect your application and debug it.

Najam Us Saqib
  • 3,190
  • 1
  • 24
  • 43