I'm trying to compile a simple Hello World phonegap application.
phonegap create hello com.example.hello HelloWorld
phonegap cordova platform add android
I have JAVA installed, and Android SDK installed so everything works up until this point.
I then try to produce simple APK, by running
phonegap build android
according to documentation it should appear in platform/android/bin
but it just doesn't, I've tried various flags, like --release etc, but nothing helps.
The output I get when building:
$ phonegap build android
[phonegap] executing 'cordova build android'...
[phonegap] completed 'cordova build android'
when building for FirefoxOS for example, - I get package.zip in bin folder, but nothing for Android...
When using cordova instead of phonegap, the path of the apk generated is displayed at the end. Maybe should you run cordova directly instead of phonegap?
Anyway, since about version 3.6, apks are no more generated in platform/android/bin but instead in platforms/android/ant-build.
Related
I'm using Quasar to develope an App and a website. When I build the android app via 'cordova build android' in the cordova folder I get a new .apk, but it's content is old. Which command am I missing to update the ressources of the apk. I tried 'cordova clean' or deleating the dist folder in the quasar project and doing 'quasar build' but it didn't help. Which files does cordova use and how are they getting updated? Any idea?
I found out, you have to run 'quasar build -m cordova -T android' in the quasar-project-folder to overwrite the files in the cordova folder and then run 'cordova build android' (this one has to be done inside the cordova folder) to get the new apk. Maybe you'll have to delete your previous apk before building in cordova
How to run moodle mobile app on android studio? I want to add my own plugins as well.
I have followed moodle documentation https://docs.moodle.org/dev/Setting_up_your_development_environment_for_Moodle_Mobile_2 but it stuck on Native build dependencies.
Code I am following: https://github.com/moodlehq/moodleapp
Also try to run this code on android studio ( follow:https://www.youtube.com/watch?v=IA3c2lpoOtU&t=757s ),I am having a blank white screen(I have paste moodle src folder on www folder and run the src/index.html)
Can somebody share video tutorial regarding this? It will be really helpful.
At first you need to add android platform to your project by these bash commands:
Removing and adding
npx ionic cordova platform remove android
npx ionic cordova platform remove ios
npx ionic cordova platform add android
npx ionic cordova platform add ios
Once you have added platforms, you can run setup using this command:
npm run setup
After successful setup you can open the the project in android studio:
android studio project location should be CORDOVA_PROJECT_DIRECTORY/platforms/android
Source:
https://docs.moodle.org/dev/Setting_up_your_development_environment_for_Moodle_Mobile_2
I created Simple cordova project using visual studio. I want ask
How to convert, save to apk? I tryed to run relise device, didnt
work, the file don't created. Should I use build.phonegap.com? Its
free?
After adding the android platform successfully you can easily use the cli to build the apk with the following command
cordova build android
you can even run the application in an emulator or device connected to your pc via the command
cordova run android
if you prefer to manually copy the apk to your device and then install from there, you can find the apk under " \platforms\android\ant-build "
You can create the apk making a build using the cordova command line. You have to use this command inside your cordova app dir:
cordova build android
And after that look for you apk inside the android platform folder. Of course first you have to add the platform if you have not already done:
cordova platform add android
I hope this helps you!
I have a Meteor Cordova Android app which I'm trying to migrate and build using Crosswalk. I followed the steps from here:
https://meteor.hackpad.com/Building-Meteor-app-with-Crosswalk-kHKh4DzGxFQ
Until here, the build succeeds.
android update project --subprojects --path . --target "android-19"
ant debug
cd ..
ant clean
The next step, ant release or ant debug, the build fails with 100 javac errors. The error log is very close to whats mentioned here: https://github.com/meteor/meteor/issues/3076
The solution partly is here:
https://github.com/RayHuo/MyXwalk/wiki/MIGRATE-AN-EXISTING-CORDOVA-APPLICATION-TO-CROSSWALK-WITH-CORDOVA-3.4-OR-LATER.
Its says:
"And the solution is to changing the second ant debug to cordova build android"
But the android project folder is generated by Meteor and not Cordova, so I do not have cordova executable installed to run a cordova build android.
I still tried installing cordova separately and building it, but it simply says, 'its not a cordova based project'.
How do we do the last step using Meteor? There is another option to build it using Eclipse/ADT, but I want to figure this out within the Meteor build process.
I know I'm missing something simple here. Any help is greatly appreciated!
Thanks.
crosswalk provides a HelloWorld cordova/example via the bin/create
utility on the intel crosswalk website.
that CordovaLib directory can replace the meteor equivalent
,however the latest meteor version fails, so there maybe some
crosswalk/meteor version problems now to resolve.
HelloWorld appears to work with old version 8 crosswalk
and new meteor build
https://crosswalk-project.org/documentation/cordova/develop_an_application.html
Meteor 1.2 now supports CrossWalk with $ meteor add crosswalk
I am trying to build a Cordova project on Windows using the steps I was given by the team who developed it.
Install Bower, Cordova CLI, Grunt CLI, SASS/Compass/sass-globbing gems
grunt build
cordova platforms add android
Then trying to run grunt emulate android but getting an error. I have the Android SDK installed and can fire up an emulator but I'm getting the following when trying to run that command:
Warning: Task "android" not found. Use --force to continue.
What am I doing wrong? I'm new to Cordova/PhoneGap development and all this interplay between packages is daunting.
You probably should run
cordova run android or grunt emulate:android
First part with cordova CLI should run all the time, and no need to use Grunt to launch application, if all assets are prepared.
Grunt part is just a guess work based on how I would organize Gruntfile.js and I could be wrong here. Without seeing more details, hard to tell you more.