adjust / cordova_sdk

This is the Cordova SDK of
http://www.adjust.com
MIT License
38 stars 43 forks source link

Android SDK versions > 4.0 #25

Closed ikostic closed 9 years ago

ikostic commented 9 years ago

Hello, i am developer of mobile application which is using adjust.com services. I successfully installed and configured version for iOS, but Android version have issues. Installation went OK, but during building the release build process is crashing. Cordova is reporting some gradle conflicts. Can you help me on this matter?

uerceg commented 9 years ago

Hello @ikostic

Sure, can you paste your build output in here including error message?

ikostic commented 9 years ago

Hi @uerceg

this is cordova build error message:

:preDexDebug :dexDebug

UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompatIcs; at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596) at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554) at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535) at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171) at com.android.dx.merge.DexMerger.merge(DexMerger.java:189) at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454) at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303) at com.android.dx.command.dexer.Main.run(Main.java:246) at com.android.dx.command.dexer.Main.main(Main.java:215) at com.android.dx.command.Main.main(Main.java:106)

:dexDebug FAILED

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 52.348 secs

/mnt/bkp/Server/custom/arenooprj/platforms/android/cordova/node_modules/q/q.js:126 throw e; ^ Error code 1 for command: /mnt/bkp/Server/custom/arenooprj/platforms/android/gradlew with args: cdvBuildDebug,-b,/mnt/bkp/Server/custom/arenooprj/platforms/android/build.gradle,-Dorg.gradle.daemon=true ERROR building one of the platforms: Error: /mnt/bkp/Server/custom/arenooprj/platforms/android/cordova/build: Command failed with exit code 1 You may not have the required environment or OS to build this project Error: /mnt/bkp/Server/custom/arenooprj/platforms/android/cordova/build: Command failed with exit code 1 at ChildProcess.whenDone (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:134:23) at ChildProcess.emit (events.js:110:17) at maybeClose (child_process.js:1015:16) at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

uerceg commented 9 years ago

And can you paste me in here output of following command:

> cordova plugins list

?

ikostic commented 9 years ago

com.adjust.sdk 4.0.2 "Adjust" com.phonegap.plugins.PushPlugin 2.2.1 "PushPlugin" com.smartmobilesoftware.inappbilling 3.0.0 "Android InAppBilling" cordova-plugin-whitelist 1.0.0 "Whitelist" org.apache.cordova.camera 0.3.6 "Camera" org.apache.cordova.contacts 0.2.16 "Contacts" org.apache.cordova.device 0.3.0 "Device" org.apache.cordova.dialogs 0.3.0 "Notification" org.apache.cordova.geolocation 0.3.12 "Geolocation" org.apache.cordova.inappbrowser 0.6.0 "InAppBrowser" org.apache.cordova.network-information 0.2.15 "Network Information" org.apache.cordova.splashscreen 1.0.0 "Splashscreen" org.apache.cordova.statusbar 0.1.10 "StatusBar"

uerceg commented 9 years ago

Thanks, I'm gonna investigate what is causing problem and let you know as soon as I find out.

ikostic commented 9 years ago

Thanks, hvala :)

uerceg commented 9 years ago

Okay, as a really quick fix - is there maybe any specific reason why you are not using latest version of PushPlugin? I have reproduced entire plugin list in my sample app you have in your own but I didn't manage to install version 2.2.1 of PushPlugin. I tried with 2.3.0 and I got the same error as you did. After that, I removed com.adjust.sdk plugin from my app, rebuilt it and still the same error was in there. After that, I updated PushPlugin to 2.5.0, rebuilt everything and got no errors at all.

Are you able to build your project with this plugin list if you just remove com.adjust.sdk plugin?

ikostic commented 9 years ago

I have issue with installation of PushPlugin to 2.5.0 for Android. How did you installed that version?

Please look at this: https://github.com/phonegap-build/PushPlugin/issues/611

ikostic commented 9 years ago

Hi @uerceg

i manage to install PushPlugin 2.5.0 on android platform. Solution was found at https://github.com/apache/cordova-lib/commit/66007122d1d8096aae2142f24f83c6ded20e6d8d

After that installation of adjust cordova sdk 4.0.2. went fine. Tomorrow will test it and i will inform you.

Thanks for the help!

uerceg commented 9 years ago

Hi @ikostic

Glad it worked. I added this plugin with:

> cordova plugin add https://github.com/phonegap-build/PushPlugin.git

And it automatically installed 2.5.0 which worked w/o any problems.

If you encounter any other issues regarding this, feel free to reopen this issue.

Nema na čemu i srećno. :)