MobileChromeApps / cordova-plugin-chrome-apps-bluetooth

BSD 3-Clause "New" or "Revised" License
10 stars 11 forks source link

Build problem an Android #5

Open 255kb opened 9 years ago

255kb commented 9 years ago

Hi,

I have the following build error when building my Cordova app for Android (it is a Meteor app):

[echo] Set jars path to: /home/guillaume/hubin-app/.meteor/local/cordova-build/platforms/android/CordovaLib/ant-build/classes.jar:/home/guillaume/hubin-app/.meteor/local/cordova-build/platforms/android/libs/estimote-sdk-preview.jar:/home/guillaume/hubin-app/.meteor/local/cordova-build/platforms/android/libs/blescan.jar:/home/guillaume/hubin-app/.meteor/local/cordova-build/platforms/android/libs/android-support-v4.jar
-compile:
    [javac] Compiling 4 source files to /home/guillaume/hubin-app/.meteor/local/cordova-build/platforms/android/ant-build/classes
    [javac] /home/guillaume/hubin-app/.meteor/local/cordova-build/platforms/android/src/org/chromium/ChromeBluetooth.java:300: error: no suitable constructor found for PluginResult(Status,List<PluginResult>)
    [javac]     PluginResult result = new PluginResult(Status.OK, multipartMessage);
    [javac]                           ^
    [javac]     constructor PluginResult.PluginResult(Status,byte[],boolean) is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac]     constructor PluginResult.PluginResult(Status,byte[]) is not applicable
    [javac]       (actual argument List<PluginResult> cannot be converted to byte[] by method invocation conversion)
    [javac]     constructor PluginResult.PluginResult(Status,boolean) is not applicable
    [javac]       (actual argument List<PluginResult> cannot be converted to boolean by method invocation conversion)
    [javac]     constructor PluginResult.PluginResult(Status,float) is not applicable
    [javac]       (actual argument List<PluginResult> cannot be converted to float by method invocation conversion)
    [javac]     constructor PluginResult.PluginResult(Status,int) is not applicable
    [javac]       (actual argument List<PluginResult> cannot be converted to int by method invocation conversion)
    [javac]     constructor PluginResult.PluginResult(Status,JSONObject) is not applicable
    [javac]       (actual argument List<PluginResult> cannot be converted to JSONObject by method invocation conversion)
    [javac]     constructor PluginResult.PluginResult(Status,JSONArray) is not applicable
    [javac]       (actual argument List<PluginResult> cannot be converted to JSONArray by method invocation conversion)
    [javac]     constructor PluginResult.PluginResult(Status,String) is not applicable
    [javac]       (actual argument List<PluginResult> cannot be converted to String by method invocation conversion)
    [javac]     constructor PluginResult.PluginResult(Status) is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac] Note: /home/guillaume/hubin-app/.meteor/local/cordova-build/platforms/android/src/org/chromium/ChromeBluetooth.java uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 1 error

I am using Linux Ubuntu 15.04 x64 and Cordova CLI 4.2.0 (Cordova Android 3.7.0)

agrieve commented 9 years ago

Looks like that API does exist in 3.7.0: https://github.com/apache/cordova-android/blob/3.7.0/framework/src/org/apache/cordova/PluginResult.java#L87

Are you sure that's what version you're using?

255kb commented 9 years ago

I am sure for the Cordova Android version, for Cordova CLI, Meteor is supposed to use the 4.2.0, but now I have a doubt as I don't find any corresponding fils in the Meteor install. They will soon release a new version of Meteor using a more recent Cordova. I will retry then and let you know.

Thanks.

adammoisa commented 7 years ago

Did you ever find a solution? I am having this issue:

Note: Some input files use unchecked or unsafe operations.
   Note: Recompile with -Xlint:unchecked for details.

   FAILURE: Build failed with an exception.

   * What went wrong:
   Execution failed for task ':transformClassesWithDexForDebug'.
   > com.android.build.api.transform.TransformException:
   com.android.ide.common.process.ProcessException:
   java.util.concurrent.ExecutionException: com.android.dex.DexException:
   Multiple dex files define
   Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;