thaliproject / postcardapp

A sample app to demonstrate how to build Thali applications
MIT License
22 stars 5 forks source link

Cordova 'build failed' due to missing jxcore plugin #53

Closed deadlyfingers closed 8 years ago

deadlyfingers commented 8 years ago

When building story_0 I'm getting a 'Build Failed' in the Console log:

/Users/david/Scripts/postcardapp/platforms/android/src/io/jxcore/node/JXcoreExtension.java:168: error: cannot find symbol
      jxcore.RegisterMethod(METHODSTRING_CONNECTTOPEER, new JXcoreCallback() {
      ^
  symbol:   variable jxcore
  location: class JXcoreExtension
/Users/david/Scripts/postcardapp/platforms/android/src/io/jxcore/node/JXcoreExtension.java:199: error: package jxcore does not exist
              jxcore.activity.runOnUiThread(new Runnable(){
                    ^
/Users/david/Scripts/postcardapp/platforms/android/src/io/jxcore/node/LifeCycleMonitor.java:29: error: cannot find symbol
    private final Activity activity = jxcore.activity;
                                      ^
  symbol:   variable jxcore
  location: class LifeCycleMonitor
25 errors
:compileDebugJava FAILED

FAILURE: Build failed with an exception.

Or when removing and re-adding platforms: +++ WARNING +++ Please re-add io.jxcore.node plugin

For some reason the jx npm install script isn't adding the jxcore plugin anymore...

deadlyfingers commented 8 years ago

We should add the workaround to the readme - to download the jxcore plugin and add it manually:

jx install -g download-cli
cd postcard/thaliDontCheckIn
download https://github.com/jxcore/jxcore-cordova-release/raw/master/0.0.7/io.jxcore.node.jx
jx io.jxcore.node.jx
cordova plugins add io.jxcore.node/
cordova platform remove android
cordova platform add android
cordova build android
cordova platform remove ios
cordova platform add ios
cordova build ios
yaronyg commented 8 years ago

This smells like a dupe of https://github.com/thaliproject/Thali_CordovaPlugin/issues/192