0

When I do a

gradle android

with the jfxmobile-plugin on my JavaFX-application I get

...
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':mergeClassesIntoJar'.
> archive contains more than 65535 entries.

To build this archive, please enable the zip64 extension.
See: https://docs.gradle.org/3.2.1/dsl/org.gradle.api.tasks.bundling.Zip.html#org.gradle.api.tasks.bundling.Zip:zip64

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

The gradle file looks like this:

    buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        classpath 'org.javafxports:jfxmobile-plugin:1.3.2'
    }
}

apply plugin: 'org.javafxports.jfxmobile'

mainClassName = 'de.package.of.application.ClientApp'

dependencies {

    compile 'com.annimon:stream:1.0.1'
    compile 'com.jakewharton.threetenabp:threetenabp:1.0.4'
    compile 'com.gluonhq:charm:3.0.0'

    androidRuntime 'com.gluonhq:charm-android:3.0.0'
    iosRuntime 'com.gluonhq:charm-ios:3.0.0'
    desktopRuntime 'com.gluonhq:charm-desktop:3.0.0'   

    compile fileTree(dir: 'target/dependencies', include: '*.jar')
    runtime fileTree(dir: 'target/dependencies', include: '*.jar')    
}

repositories {
    jcenter()
    maven {
        url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
    }
}

jfxmobile {
    ios {
        forceLinkClasses = ['ensemble.**.*']
    }
    android {
        applicationPackage = 'org.javafxports.ensemble'
        compileSdkVersion = '21'
        androidSdk='C:/Tools/android-sdk-windows'
    }
}

Over the last years since Javafx exists the application has become, I would say, a 'bigger' one; a fat-client with many own classes but also many third-party dependencies. I found an article about the jfxmobile-plugin and thought 'Why not give it a try?'. The current issue is the one described in this question. I already stripped down the application to reduce classes to a minimum so the application still makes some sense in some way but it does not help.

Does anyone have a suggestions how to solve it?

GR1975
  • 11
  • 2
  • Can you provide more info? Post your build.gradle file, android version, size of project, does a more simple project work for you? – José Pereda Jan 07 '17 at 20:48
  • I think we really need more information here. E.g. the Gradle file. Because it sounds like you're trying to compile a way to many files into the target build. There are questions here on StackOverflow, related to the error message: e.g. http://stackoverflow.com/questions/9616250/what-is-the-maximum-number-of-files-per-jar – dzim Jan 10 '17 at 19:24
  • Sorry for the late reply. I edited the question to give some more details. – GR1975 Jan 12 '17 at 06:51
  • My build looks a bit different: While my javafxmobile plugin was a bit outdate, you Down dependency is. `compile 'com.gluonhq:charm:4.2.0'` - see some documentation here http://docs.gluonhq.com/javafxports/ - section _4.2.2_. Under section _4.3_, there are some examples for Android. Maybe you can try to increase your heap space, e.g. `dexOptions { javaMaxHeapSize '2g' }`. And I've set compile versions and so on like this `compileSdkVersion = 22` - no _`'`_... __#edit:__ And I've set the manifest path - the documentation is not so clear, whether there is a default or not. – dzim Jan 12 '17 at 14:34
  • I updated my gluon-charm dependency to 4.2.0 and and added the dexOption for the heapsize to 3g. Now the whole gradle build for androidInstall passes and the apk is installed on the device. Too bad it does not start successfully... After some time with a black screen the application stops... But I think this is not an issue for this question. If required I will open a new question. So thank you very much for all suggestions so far!! – GR1975 Jan 15 '17 at 17:06

0 Answers0