使用Gluon在APK META-INF / INDEX.LIST中复制的重复文件 [英] Duplicate files copied in APK META-INF/INDEX.LIST using Gluon

查看:339
本文介绍了使用Gluon在APK META-INF / INDEX.LIST中复制的重复文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在javafx上使用最新的胶子版本在neatbeans中编写代码,当我在我的笔记本电脑中运行时程序没有问题,但是当我尝试在Android中运行时

I'm deloping a code in neatbeans on javafx with the latest gluon version, and when I run it in my laptop the program doesnt have problems, but when I try run in android

我实现这一目标的消息

com.android.builder.packaging.DuplicateFileException:重复的文件中APK META-INF复制/ INDEX.LIST
档1:C:\Users\User.gradle\caches\modules-2\files-2.1\org.javafxports\dalvik-sdk\8.60.8\ 6630ec66e4703c910ac3fd6151a8494c8b59186b\unpacked\dalvik-sdk\rt\lib\ext\jfxrt.jar
档2:C:\Users\User.gradle\caches\modules-2\文件-2.1\org.javafxports\dalvik-sdk\8.60.8\6630ec66e4703c910ac3fd6151a8494c8b59186b\unpacked\dalvik-sdk\rt\lib\ext\jfxrt.jar

com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/INDEX.LIST File 1: C:\Users\User.gradle\caches\modules-2\files-2.1\org.javafxports\dalvik-sdk\8.60.8\6630ec66e4703c910ac3fd6151a8494c8b59186b\unpacked\dalvik-sdk\rt\lib\ext\jfxrt.jar File 2: C:\Users\User.gradle\caches\modules-2\files-2.1\org.javafxports\dalvik-sdk\8.60.8\6630ec66e4703c910ac3fd6151a8494c8b59186b\unpacked\dalvik-sdk\rt\lib\ext\jfxrt.jar

到目前为止,我正在使用最近Android的SDK版本,我尝试了很多解决方案本网站中的propouse如:

By now I'm using the recently Android's SDK version and I've tried many solutions propouse in this site like:

            exclude 'META-INF/LICENSE.txt'
            exclude 'META-INF/NOTICE.txt'
            exclude '...'
and more...



<但是我仍然无法得到解决方案。

but I still cant get the solution.

这是我的build.gladle文件

This is my build.gladle file

    buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'org.javafxports:jfxmobile-plugin:1.3.4'    
    }
}

apply plugin: 'org.javafxports.jfxmobile'

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

mainClassName = 'com.gluon_application.Gluon_Application'

dependencies {
    compile 'com.gluonhq:charm:4.3.0'
    compile 'eu.hansolo:Medusa:7.6'
    compile 'com.google.api-client:google-api-client:1.22.0'
    compile 'com.pi4j:pi4j-core:1.1'
    compile 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.0.2'
    compile 'de.jensd:fontawesomefx-commons:8.15'
    compile 'de.jensd:fontawesomefx-controls:8.15'

}

jfxmobile {
    downConfig {
        version = '3.2.0'
        // Do not edit the line below. Use Gluon Mobile Settings in your project context menu instead
        plugins 'display', 'lifecycle', 'orientation', 'statusbar', 'storage'
    }
    javafxportsVersion = '8.60.8'
    android {    
       manifest = 'src/android/AndroidManifest.xml'
       dexOptions {
            javaMaxHeapSize '3g'
        }
        packagingOptions {
            exclude 'META-INF/LICENSE.txt'
            exclude 'META-INF/NOTICE.txt'    
        }   
    }
    ios {
        infoPList = file('src/ios/Default-Info.plist')
        forceLinkClasses = [
                'com.gluonhq.**.*',
                'javax.annotations.**.*',
                'javax.inject.**.*',
                'javax.json.**.*',
                'org.glassfish.json.**.*'
        ]
    }
}

我收到此错误包括usin g示例代码Hello world

I get this error include using the sample code "Hello world"

我应该在脚本中添加什么内容?

What thing I should add in the script?

问候

推荐答案

根据您发布的依赖项列表,这对我有用:

With the list of dependencies you have posted, this works for me:

jfxmobile {
    android {    
        packagingOptions {
            exclude 'META-INF/LICENSE'
            exclude 'META-INF/LICENSE.txt'
            exclude 'META-INF/NOTICE'
            exclude 'META-INF/NOTICE.txt'    
        }   
    }
}

这篇关于使用Gluon在APK META-INF / INDEX.LIST中复制的重复文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆