重复的zip条目[allclasses.jar:com / sun / javafx / beans / IDProperty.class] Gluon原生android代码

时间:2017-11-16 22:44:57

标签: gradle javafx gluon gluon-mobile

我正在尝试添加本机代码来处理我的胶子项目中的android中的意图操作。将Android的依赖项添加到gradle文件中并尝试在android上安装,看到以下错误:

* What went wrong:
 Execution failed for task ':shrinkMultiDexComponents'.
 > java.io.IOException: Can't write [C:\Users\Vaishnavi\Documents\NetBeansProjects\NativeEg\build\javafxports\tmp\android\multi-dex\componentClasses.jar] (Can't read [C:\Users\Vaishnavi\Documents\NetBeansProjects\NativeEg\build\javafxports\tmp\android\multi-dex\allclasses.jar] (Duplicate zip entry [allclasses.jar:com/sun/javafx/beans/IDProperty.class]))

build.gradle文件

    buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'org.javafxports:jfxmobile-plugin:1.3.9'      
        //added
        classpath 'com.android.tools.build:gradle:1.0.0'
    }
}

apply plugin: 'org.javafxports.jfxmobile'


Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def sdkDir = properties.getProperty('sdk.dir')
def dalvikSdkHome = properties.getProperty('javafx.dir')
def dalvikSkLib = dalvikSdkHome + '/rt/lib'

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

    }
}

mainClassName = 'com.nativeeg.NativeEg'

dependencies {
    compile 'com.gluonhq:glisten-afterburner:1.2.1'
    //  compile fileTree(dir: 'libs', include: '*.jar')
}

jfxmobile {
    downConfig {
        version = '3.6.0'
        // Do not edit the line below. Use Gluon Mobile Settings in your project context menu instead
        plugins 'display', 'lifecycle', 'statusbar', 'storage'
    }
    android {
        manifest = 'src/android/AndroidManifest.xml'
    }
    ios {
        infoPList = file('src/ios/Default-Info.plist')
        forceLinkClasses = [
                'com.nativeeg.**.*',
                'com.gluonhq.**.*',
                'javax.annotations.**.*',
                'javax.inject.**.*',
                'javax.json.**.*',
                'org.glassfish.json.**.*'
        ]
    }
}
configurations {
    compile.exclude group: 'com.android.support'

}
dependencies {
    compile files ("${dalvikSkLib}/ext/jfxrt.jar",
                   "${dalvikSkLib}/ext/jfxdvk.jar",
                   "${dalvikSkLib}/ext/compat-1.0.0.jar")
    compile files("${sdkDir}/extras/android/m2repository/com/android/support/multidex/1.0.1/multidex-1.0.1.aar")

}
project.tasks.withType(com.android.build.gradle.tasks.Dex) {
    additionalParameters=['--core-library']
}

从dalvik-sdk-8.60.9包中的示例项目build.gradle中提到

0 个答案:

没有答案