Meteor Crosswalk build fails at second 'ant debug' step - android

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

Related

Gradle version to use with Android/Cordova CLI

I currently use Cordova CLI on Windows to build hybrid Android apps. I am in the process of moving my development mover to a headless Ubuntu server. Getting java, NVM, Node, Android SDK and Cordova CLI installed on Ubuntu has not been a problem. Having done so and created the customary Cordova hello world project,
cordova create hello com.example.hello HelloWorld
I proceeded to add the Android platform
cordova plaform add android
and then attempted to build
cordova build android
at which point I was told
Error: Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio
Installing Gradle by following the instructions given here - I am NOT installing Android Studio and am working on a headless Ubuntu machine so automatic Gradle installation is not an option - is not a problem. However, it is not clear to me which version of Gradle I should install.
I do not want to break my current Cordova project so I am trying to replicate the current Windows/Cordova CLI setup as closely as I can
Node 8.9.2
Java 8
Gradle ???
Dipping inside the gradle-wrapper.properties file in my existing project I find
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
I have noted that when I compile the project at present there are some ominous warnings about features to be removed from future versions of Gradle that are shown. I could experiment with using gradle-2.10 but it is not entirely clearr to me that it would indeed be the right version. Hopefully, someone here will be able to point me in the right direction.
First, clean up the project
cordova clean android
Then, force the cordova to use the distribution url with the version you want, in this case: gradle-6.3
export CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL=https\\://services.gradle.org/distributions/gradle-6.3-all.zip
Then, build your application.
cordova build android --release

Ionic Framework with Crosswalk not working - unfortunately app has stopped

I have installed the ionic framework cordova and I have used the command the below command for setting up crosswalk.
npm install ionic
ionic start my_app
cd my_app
ionic browser add crosswalk
ionic run android
When I ran the last command line
ionic run android
The project build is successful. But when it is launched on Android emulator, I got this error
"unfortunately app has stopped".
Any help would be much appreciated.
I tried that ionic crosswalk integration too and failed. It seems unfinished to me. It converts the cordova android platform project to gradle build but there the NDK support is not available yet, so I guess that's where ionic browser add crosswalk fails. Gradle is not able to compile / include the native libraries required for Crosswalk.
The manual way however works like a charm:
https://crosswalk-project.org/documentation/cordova/migrate_an_application.html
Section Migrate to Crosswalk

Phonegap 4.2.0 doesn't produce APK

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.

Build Cordova project on Windows

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.

setting up development environment for PHONEGAP

Starting with phonegap and installed the following:
ANT from apache
ANDROID SDK (which includes SDK + ECLIPSE + ADT PLUGIN)
now as guided here phonegap documentation i am trying to check proper functioning of following commands
java
ant
java commands run fine. But when do the ant, i get the following:
C:\Users\Mrinal>ant
Buildfile: build.xml does not exist!
Build failed
Is it a normal behavior? Also I do not understand the fourth step in the above link.
It is normal. It means Ant is properly running on your machine.
Now follow the Getting Started guide for Android

Categories

Resources