Example project doesn't work

隐身守侯 提交于 2020-01-04 09:12:23

问题


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 ?


回答1:


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:




回答2:


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'




回答3:


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!



来源:https://stackoverflow.com/questions/37341241/example-project-doesnt-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!