Error when trying to add SupportKit plugin to Meteor app


#1

So I want to add SupportKit’s Cordova plugin to my Meteor app, and everything works great on iOS, but when I try to build my application I receive this error on Android:

=> Errors executing Cordova commands:                                              
                                              
   While building Cordova app for platform Android:
   Error: /Users/jeronimocosio/vno/vnomvp/.meteor/local/cordova-build/platforms/android/cordova/build: Command failed with exit code 8 Error output:
   /Users/jeronimocosio/vno/vnomvp/.meteor/local/cordova-build/platforms/android/src/io/supportkit/cordova/SupportKitCordova.java:3: error: package io.supportkit.core does not exist
   import io.supportkit.core.*;
   ^
   /Users/jeronimocosio/vno/vnomvp/.meteor/local/cordova-build/platforms/android/src/io/supportkit/cordova/SupportKitCordova.java:4: error: package io.supportkit.ui does not exist
   import io.supportkit.ui.ConversationActivity;
   ^
   /Users/jeronimocosio/vno/vnomvp/.meteor/local/cordova-build/platforms/android/src/io/supportkit/cordova/SupportKitCordova.java:45: error: cannot find symbol
   ConversationActivity.show(this.cordova.getActivity());
   ^
   symbol:   variable ConversationActivity
   location: class SupportKitCordova
   /Users/jeronimocosio/vno/vnomvp/.meteor/local/cordova-build/platforms/android/src/io/supportkit/cordova/SupportKitCordova.java:52: error: cannot find symbol
   final User user = User.getCurrentUser();
   ^
   symbol:   class User
   location: class SupportKitCordova
   /Users/jeronimocosio/vno/vnomvp/.meteor/local/cordova-build/platforms/android/src/io/supportkit/cordova/SupportKitCordova.java:52: error: cannot find symbol
   final User user = User.getCurrentUser();
   ^
   symbol:   variable User
   location: class SupportKitCordova
   /Users/jeronimocosio/vno/vnomvp/.meteor/local/cordova-build/platforms/android/src/io/supportkit/cordova/SupportKitCordova.java:77: error: cannot find symbol
   User.getCurrentUser().addProperties(customProps);
   ^
   symbol:   variable User
   location: class SupportKitCordova
   /Users/jeronimocosio/vno/vnomvp/.meteor/local/cordova-build/platforms/android/src/io/supportkit/cordova/SupportKitCordova.java:88: error: cannot find symbol
   SupportKit.track(eventName);
   ^
   symbol:   variable SupportKit
   location: class SupportKitCordova
   Note: Some input files use or override a deprecated API.
   Note: Recompile with -Xlint:deprecation for details.
   Note: Some input files use unchecked or unsafe operations.
   Note: Recompile with -Xlint:unchecked for details.
   7 errors
   
   FAILURE: Build failed with an exception.
   
   * What went wrong:
   Execution failed for task ':compileArmv7ReleaseJava'.
   > Compilation failed; see the compiler error output for details.
   
   * Try:
   Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
   
   /Users/jeronimocosio/vno/vnomvp/.meteor/local/cordova-build/platforms/android/cordova/node_modules/q/q.js:126
   throw e;
   ^
   Error code 1 for command: /Users/jeronimocosio/vno/vnomvp/.meteor/local/cordova-build/platforms/android/gradlew with args:
   cdvBuildRelease,-b,/Users/jeronimocosio/vno/vnomvp/.meteor/local/cordova-build/platforms/android/build.gradle,-Dorg.gradle.daemon=true
   at ChildProcess.whenDone
   (/Users/jeronimocosio/.meteor/packages/meteor-tool/.1.1.9.199dldi++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
   at ChildProcess.emit (events.js:98:17)
   at maybeClose (child_process.js:766:16)
   at Socket.<anonymous> (child_process.js:979:11)
   at Socket.emit (events.js:95:17)
   at Pipe.close (net.js:466:12)

after trying to build the app with ‘meteor build’ I am not sure what is wrong here, but I’m pretty sure it is because I have to do this that is written on the documents:

Android

Init SupportKit(natively) in the Application class, for example:

public class MainApplication extends Application {
    public void onCreate() {
        super.onCreate();
        SupportKit.init(this, "your-supportkit-app-token");
    }
}
The javascript init call will not work in Android. It must be done natively.

however I have no idea how can I do this before or after the build, so I would like to know if someone could help me to get this working on Meteor, thanks in advance!