How to use Cordova to make APK? - Forum

Forum Navigation
You need to log in to create posts and topics.

How to use Cordova to make APK?

Hi guys,

i have installed Cordova, and i compiled my app for mobile which is a zip file. (using windows 10 64 + last version of VisualNEO)
then i extracted zip file.

What next?
can someone tell me how to build APK step by step please? i'm confused (i have read help from Cordova and failed to do the job)

Thanks.

Hi @noyzen

You should create a Cordova project, copy and paste the extracted files into the www folder. then for making apk file implement the cordova run or cordova build command:

How you can create a Cordova project?
First of all run cmd anywhere you want to create a Cordova project. then use these commands to create the Cordova project.

cordova create appfolder my.app.id "Hello world"
cordova cd appfolder
cordova platform add android
cordova run

It will take 1 or 2 minutes, after that it will give you the path of generated apk file. see the attached image.

Uploaded files:
  • You need to login to have access to uploads.
noyzen has reacted to this post.
noyzen

@noyzen @asmat @shahram have you ever heard about Capacitorjs?
It seems to be a modern alternative for Cordova and it seems more easy to use. I'm really busy but would like to investigate about it as soon as I can. I would like to know if you have any experience using it.

Thank you!

noyzen has reacted to this post.
noyzen

@asmat Thanks for info, do i need to install Android Studio? or any SDK before this steps?
(is Android SDK only packed with Android studio or i just need SDK alone? sorry for newbie questions btw)

When i extract ZIP file made by VisualNEO i get a www folder and 1 config.xml file. should i copy and replace all of them into Cordova project folder? or only content of my www folder?

i get this error during Add Android and Cordova Run:
No Java files found that extend CordovaActivity.

@luishp i'm afraid that i don't have enough technical knowledge to test this, but if anyone found anything new let me know. thanks Luis.

asmat has reacted to this post.
asmat

Yes, @noyzen android studio is necessary,

You should copy and replace all files except config.xml.

You should complete the installation guide. Please check the below link:

https://cordova.apache.org/docs/en/10.x/guide/platforms/android/index.html

for checking Cordova requirements, run this command in the Cordova project:

cordova requirements

 

 

 

 

noyzen has reacted to this post.
noyzen
Quote from noyzen on May 2, 2021, 7:09 pm

@asmat Thanks for info, do i need to install Android Studio? or any SDK before this steps?
(is Android SDK only packed with Android studio or i just need SDK alone? sorry for newbie questions btw)

When i extract ZIP file made by VisualNEO i get a www folder and 1 config.xml file. should i copy and replace all of them into Cordova project folder? or only content of my www folder?

i get this error during Add Android and Cordova Run:
No Java files found that extend CordovaActivity.

@luishp i'm afraid that i don't have enough technical knowledge to test this, but if anyone found anything new let me know. thanks Luis.

Hi

Using Apache Cordova Plugins and Cordova Build APK - Forum - VisualNEO. Cross-platform App Development Tool for Windows

noyzen has reacted to this post.
noyzen