Git Product home page Git Product logo

Comments (17)

mrtree1 avatar mrtree1 commented on June 12, 2024

It sounds like you have either got radiusnetworks jar file added as a dependency separate from the plugin or you have more than one reference to the plugin (which I guess is possible if you copy the plugin and add both versions. It's worth checking first if the radiusnetworks beacon library jar is in your dependency list and if so remove it. Here's a Stack Overflow quesiton on what to check: http://stackoverflow.com/questions/7870265/unable-to-execute-dex-multiple-dex-files-define-lcom-myapp-rarray

from cordova-plugin-ibeacon.

hsmith825 avatar hsmith825 commented on June 12, 2024

Hi,

Thanks for your suggestions. I have checked for the radiusnetworks beacon library jar in my dependence list. I do not see it and I certainly don't have it as a dependence outside the plugin. In fact if I remove the plugin the app works. If I add it back with CLI I get the error. I am running 2.1 of the plugin which is the same version I use on IOS. The other third party plugins I am using are as follows: Facebook connect, pushwoosh and email composer. They all work very well on Android. I also tried the alternatives suggested in stack overflow.

Not certain what to try next. Any other suggestions are appreciated. Tanks!

from cordova-plugin-ibeacon.

hsmith825 avatar hsmith825 commented on June 12, 2024

One new thing I discovered is if I install the plugin I get the radius networks file in the bin/class/com folder. I don't see it in the dependency list. The app works without the plugin and fails to aunch with the plugin.

Thanks!

from cordova-plugin-ibeacon.

mrtree1 avatar mrtree1 commented on June 12, 2024

That's how it should be, the Radius Networks source is used rather than the jar in this plugin, so you will find the class files in that folder. If there is radius ibeacon jar file in your project anywhere (not in this plugin) it would be a conflict. Otherwise I can't think why you get your error. Have you tried cleaning the project and rebuilding just in case there's some old files around?

from cordova-plugin-ibeacon.

petermetz avatar petermetz commented on June 12, 2024

@hsmith825 Could you please try installing the plugin on a clean project as well, see if the same problem persists there too?

If you have the Dart SDK installed, you can run dart test/run_tests.dart from the project root to generate one.

Peter

from cordova-plugin-ibeacon.

ccloquet avatar ccloquet commented on June 12, 2024

This issue occurs in particular when the iBeacon plugin is used at the same time as the Pushwoosh plugin, as the Pushwoosh.jar contains a radiusnetwork folder

from cordova-plugin-ibeacon.

mrtree1 avatar mrtree1 commented on June 12, 2024

@ccloquet We're using the source files rather than the jar because PhoneGap Build registry will not accept a plugin with additional jars. In a case like yours the only option is to delete either the jar or the source version.

from cordova-plugin-ibeacon.

ccloquet avatar ccloquet commented on June 12, 2024

Thanks ! Nice work anyway !

from cordova-plugin-ibeacon.

hsmith825 avatar hsmith825 commented on June 12, 2024

Hi Peter,
Sorry it has taken a week for me to get back to you. I have been on my back ill for over a week and just catching up. I tried the new release in a clean project with this plugin and the pushwoosh plugin. I still get the same problem: Unable to execute dex: Multiple dex files define Lcom/radiusnetworks/ibeacon/IBeaconConsumer. As is stated above and in one of my emails the Pushwoosh.jar contains a radius network folder. Is their something you would suggest I do?

Additional data: The plugin works on Android with out the Pushwoosh plugin but unfortunately I need both. The plugins work together on IOS8.

Thanks!
Howard

from cordova-plugin-ibeacon.

mrtree1 avatar mrtree1 commented on June 12, 2024

@hsmith825 As @ccloquet has mentioned the PushWoosh plugin has the Radius Networks beacon library code embedded in their plugin, as we do. So the easiest option I think would be to delete would be to delete the src/android/com/radiusnetworks folder from the plugin directory and edit the plugin.xml file in the root of the plugin folder and delete every line which starts with
<source-file src="src/android/com/radiusnetworks
The will remove any direct reference to the offending code, and the android app will then depend on the code being elsewhere in the compiled app.

In the future I'll migrate the library away from Radius Networks code to AltBeacons, but PushWoosh may to the same.

from cordova-plugin-ibeacon.

hsmith825 avatar hsmith825 commented on June 12, 2024

Hi Peter,

Thanks for the quick response!

I made the changes you suggested but I am still getting the same error: Dex Loader] Unable to execute dex: Multiple dex files define Lcom/radiusnetworks/ibeacon/IBeaconConsumer;
[2014-10-02 02:08:40 - Flickitt22] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/radiusnetworks/ibeacon/IBeaconConsumer;

The changes I made are as follows:

  1. I deleted src/android/com/radiusnetworks folder from the plugin directory
  2. I deleted every line of the iBeacon plugin plugin.xml file which starts with <source-file src="src/android/com/radiusnetworks

Did I miss something?

Thank!
Howard

On Oct 2, 2014, at 1:10 AM, Tree [email protected] wrote:

<source-file src="src/android/com/radiusnetworks

from cordova-plugin-ibeacon.

mrtree1 avatar mrtree1 commented on June 12, 2024

Did you run cordova prepare to update your app? You might need to manually delete the exiting files from platforms/android/src/com/radiusnetworks, as I don't think prepare deleted files which are removed.

from cordova-plugin-ibeacon.

hsmith825 avatar hsmith825 commented on June 12, 2024

Hi Peter,

I made the changes you recommended a second time sand the problem was resolved. However, I am getting another problem that I don’t think has anything to do with iBeacon plugin. Maybe you have an idea what is going on. I get the following error: FacebookLib] R.java was modified manually! Reverting to generated version! I have not touch the file. I tried clean and rebuild. Additionally, it reverts back to the original www. I have tried clean and rebuild to no avail.

Any suggestions are appreciated.

Thanks for the timely response to the plugin issues!
Howard

On Oct 2, 2014, at 2:30 AM, Tree [email protected] wrote:

Did you run cordova prepare to update your app? You might need to manually delete the exiting files from platforms/android/src/com/radiusnetworks, as I don't think prepare deleted files which are removed.


Reply to this email directly or view it on GitHub.

from cordova-plugin-ibeacon.

mrtree1 avatar mrtree1 commented on June 12, 2024

@hsmith825 You are right that won't be anything to do with this plugin. I can't tell from your error if this is the FacebookLib R.java or your app's R.java. Either way rebuilding the library or app code should be enough to fix the problem.

from cordova-plugin-ibeacon.

hsmith825 avatar hsmith825 commented on June 12, 2024

Hi Peter,

I was a little to quick to say this problem was solved. Unfortunately, after I resolved the other issues this problem cropped up again. If I run the pushwoosh and beacon plugins together the result is the error: Dex Loader] Unable to execute dex: Multiple dex files define Lcom/radiusnetworks/ibeacon/IBeaconConsumer;
[2014-10-03 19:13:17 - Flickitt22] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/radiusnetworks/ibeacon/IBeaconConsumer;

I have made all the changes you recommended are made. If I remove either plugin I can successfully run and build the app. Unfortunately, I need both plugins. The IOS version of the app works with both plugins.

Any suggestions are appreciated.

Thanks!
Howard

On Oct 2, 2014, at 11:57 PM, hsmith825 [email protected] wrote:

Hi Peter,

I made the changes you recommended a second time sand the problem was resolved. However, I am getting another problem that I don’t think has anything to do with iBeacon plugin. Maybe you have an idea what is going on. I get the following error: FacebookLib] R.java was modified manually! Reverting to generated version! I have not touch the file. I tried clean and rebuild. Additionally, it reverts back to the original www. I have tried clean and rebuild to no avail.

Any suggestions are appreciated.

Thanks for the timely response to the plugin issues!
Howard

On Oct 2, 2014, at 2:30 AM, Tree [email protected] wrote:

Did you run cordova prepare to update your app? You might need to manually delete the exiting files from platforms/android/src/com/radiusnetworks, as I don't think prepare deleted files which are removed.


Reply to this email directly or view it on GitHub.

from cordova-plugin-ibeacon.

hsmith825 avatar hsmith825 commented on June 12, 2024

Hi Peter,
I finally got the app to work on Android with the Pushwoosh plugin. Here is the solution for others.

  1. I deleted src/android/com/radiusnetworks folder from the plugin directory
  2. I deleted every line of the iBeacon plugin plugin.xml file which starts with <source-file src="src/android/com/radiusnetworks.
  3. To get rid of the error: Multiple dex files define Lcom/myapp/R$array;
    [2011-10-23 16:23:29 - myProj] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom do the following: right click on the project name, select properties, Java build path, order and export. Then uncheck the private libraries. This worked for me. In fact, I would try number 3 before because that may be the only thin required.

This was a very frustrating problem. I appreciate your help!

Howard

from cordova-plugin-ibeacon.

petermetz avatar petermetz commented on June 12, 2024

@hsmith825 Thanks, I'll definitely add this information to the FAQ, once it will be done.

Please note though, you were talking to @mrtree1 not me. He should get all the credit, and the complete Android implementation has to be thanked to him as well.

from cordova-plugin-ibeacon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.