3

I use a mac with OS X El Capitan with Eclipse IDE

When I create a project "Gluon Mobile - Single View Project" I can not compile for Android because I have a problem with multidex. I use this command :

./gradlew androidInstall
 Execution failed for task ':mergeClassesIntoJar'.
 > Cannot expand ZIP '/.../sdk/extras/android/support/multidex/library/libs/android-support-multidex.jar' 
 as it does not exist.

I saw differents topics and I did these verifications :

  • Android SDK is installed by "Android Studio" But, I don't have android support library to install
  • If I add compile 'com.android.support:multidex:1.0.0' on my build.gradle, I have an another error

    Could not resolve all dependencies for configuration ':compile'.
    > Could not find com.android.support:multidex:1.0.0.
    
  • But if I add compile 'com.android.support:multidex:1.0.0' in a random Android Studio project, gradle compile.

  • Compilation for Desktop is OK, on iPhone Simulation too.

I don't understand why It's doesn't working

Thank you for your reading. Can you help me ?

alexdess
  • 115
  • 1
  • 11

3 Answers3

3

If you have a look at the list of prerequisites for deploying on Android, you need:

  • the Android SDK
  • the Build-tools
  • And the Android Support Library

Open Android SDK manager (from /tools, run ./android), and make sure you install the Android Support Library from Extras:

Extras

José Pereda
  • 44,311
  • 7
  • 104
  • 132
  • Hello, yes I do all the prerequisites. I just downloaded again the sdk manager and launch (from /tools, run ./android). Android Support Library is not present ! Just Android Support Repository is here. – alexdess May 20 '16 at 12:22
  • Which Android platforms have you installed? – José Pereda May 20 '16 at 12:36
  • The SDK platform 21 and the Build-tools 21.1.2 too – alexdess May 20 '16 at 12:51
  • Try installing platform 23 as well as the build tools for this platform. – José Pereda May 20 '16 at 12:53
  • I just do it and nothing changed – alexdess May 20 '16 at 13:12
  • According to [this](https://developer.android.com/topic/libraries/support-library/setup.html), maybe it is because you already have the Android Support Repository installed. Can you uninstall it and try again? – José Pereda May 20 '16 at 13:16
  • I uninstall it and unluckily Android Support Library doesn't appear. I don't understand why I don't have the option to install the Library. – alexdess May 20 '16 at 13:21
  • Can you check this [answer](http://stackoverflow.com/a/23436671/3956070)? It seems it allows manually installing it – José Pereda May 20 '16 at 13:27
  • 3
    Can you double check you have the 'Obsolete' checkbox ticked as in answer above. On my install the support library shows as 'Android Support Library (Obsolete)' – Matt May 20 '16 at 13:30
  • 1
    Yes It's working after install Obsolete Android Support Library. – CTN Oct 10 '16 at 05:52
1

android sdk has change its folders and gluon older version is targeted for the older android sdk folders . so , change the gluon script for its newest version in gradle . change build.gradle classpath (/your_project/Build Scripts/Projects/build.gradle)

classpath 'org.javafxports:jfxmobile-plugin:x.x.x'

for this

classpath 'org.javafxports:jfxmobile-plugin:1.3.3'

Racil Hilan
  • 24,690
  • 13
  • 50
  • 55
Giovanni Contreras
  • 2,345
  • 1
  • 13
  • 22
0

A commenter on an answer above answered this, but it's buried in comments so I'm putting it as an answer so those who don't read every comment don't miss it:

"Can you double check you have the 'Obsolete' checkbox ticked as in answer above. On my install the support library shows as 'Android Support Library (Obsolete)'" -user2145222

The previous answer shows a screenshot where this checkbox is checked, but unless you EXTREMELY observant, you wouldn't really notice it.

This single solution did it for me!

Daniel
  • 71
  • 4
  • 1
    I have the same problem although 'Android Support Library (Obsolete)' is installed on my system. The problem is the search path. android-support-multidex.jar seems to be no longer located in extras/android/support/multidex/library/libs/ but in extras/android/compatibility/multidex/library/libs. – Stefan Endrullis Oct 09 '16 at 09:32