jmusyj / phonegap-estimote-plugin

PhoneGap plugin to interface with Estimote SDK
14 stars 7 forks source link

Build fails #3

Closed brianyang closed 10 years ago

brianyang commented 10 years ago

i install the plugin: cordova plugin add https://github.com/jmusyj/phonegap-estimote-plugin.git

but the app won't build. is there something i can do to get this to work?

-compile:
    [javac] Compiling 4 source files to /Users/b/Public/newapp4/platforms/android/ant-build/classes
    [javac] /Users/b/Public/newapp4/platforms/android/src/org/apache/cordova/estimote/EstimotePlugin.java:24: package com.estimote.sdk does not exist
    [javac] import com.estimote.sdk.Region;
    [javac]                        ^
    [javac] /Users/b/Public/newapp4/platforms/android/src/org/apache/cordova/estimote/EstimotePlugin.java:25: package com.estimote.sdk does not exist
    [javac] import com.estimote.sdk.Beacon;
    [javac]                        ^
    [javac] /Users/b/Public/newapp4/platforms/android/src/org/apache/cordova/estimote/EstimotePlugin.java:26: package com.estimote.sdk does not exist
    [javac] import com.estimote.sdk.BeaconManager;
    [javac]                        ^
    [javac] /Users/b/Public/newapp4/platforms/android/src/org/apache/cordova/estimote/EstimotePlugin.java:33: cannot find symbol
    [javac] symbol  : class Region
    [javac] location: class org.apache.cordova.estimote.EstimotePlugin
    [javac]     private static final Region ALL_ESTIMOTE_BEACONS = new Region("regionId", ESTIMOTE_PROXIMITY_UUID, null, null);
    [javac]                          ^
    [javac] /Users/b/Public/newapp4/platforms/android/src/org/apache/cordova/estimote/EstimotePlugin.java:33: cannot find symbol
    [javac] symbol  : class Region
    [javac] location: class org.apache.cordova.estimote.EstimotePlugin
    [javac]     private static final Region ALL_ESTIMOTE_BEACONS = new Region("regionId", ESTIMOTE_PROXIMITY_UUID, null, null);
    [javac]                                                            ^
    [javac] /Users/b/Public/newapp4/platforms/android/src/org/apache/cordova/estimote/EstimotePlugin.java:92: cannot find symbol
    [javac] symbol  : class BeaconManager
    [javac] location: class org.apache.cordova.estimote.EstimotePlugin
    [javac]             final BeaconManager beaconManager = new BeaconManager(cordova.getActivity().getBaseContext());
    [javac]                   ^
    [javac] /Users/b/Public/newapp4/platforms/android/src/org/apache/cordova/estimote/EstimotePlugin.java:92: cannot find symbol
    [javac] symbol  : class BeaconManager
    [javac] location: class org.apache.cordova.estimote.EstimotePlugin
    [javac]             final BeaconManager beaconManager = new BeaconManager(cordova.getActivity().getBaseContext());
    [javac]                                                     ^
    [javac] /Users/b/Public/newapp4/platforms/android/src/org/apache/cordova/estimote/EstimotePlugin.java:93: package BeaconManager does not exist
    [javac]             beaconManager.setRangingListener(new BeaconManager.RangingListener() {
    [javac]                                                               ^
    [javac] /Users/b/Public/newapp4/platforms/android/src/org/apache/cordova/estimote/EstimotePlugin.java:128: package BeaconManager does not exist
    [javac]             beaconManager.connect(new BeaconManager.ServiceReadyCallback() {
    [javac]                                                    ^
    [javac] 9 errors

BUILD FAILED
/Users/b/Downloads/adt-bundle-mac-x86_64-20140702/sdk/tools/ant/build.xml:720: The following error occurred while executing this line:
/Users/b/Downloads/adt-bundle-mac-x86_64-20140702/sdk/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.

Total time: 2 seconds
Error code 1 for command: ant with args: debug,-f,/Users/b/Public/newapp4/platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Error: /Users/b/Public/newapp4/platforms/android/cordova/build: Command failed with exit code 2
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:755:16)
    at Process.ChildProcess._handle.onexit (child_process.js:822:5)
arumsey commented 10 years ago

The plugin.xml file isn't copying the estimote JAR to the Android project's libs folder. The following line needs to be added to plugin.xml.

<source-file src="src/android/estimote-sdk-preview.jar" target-dir="libs" />

arumsey commented 10 years ago

https://github.com/jmusyj/phonegap-estimote-plugin/pull/4