首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用以下gradle文件启动JavaFxPorts file时出错

使用以下gradle文件启动JavaFxPorts file时出错
EN

Stack Overflow用户
提问于 2018-08-04 16:57:29
回答 1查看 60关注 0票数 1

我有一个javafx项目,我正在尝试使用javafxports将其移植到IOS。我收到一个错误,说

代码语言:javascript
复制
[SUB] Undefined symbols for architecture x86_64:
[SUB]   "_[j]projectName[infostruct]", referenced from
[SUB]       l_g2 in linker0.o
[SUB] ld: symbol(s) not found for architecture x86_64
[SUB] clang: error: linker command failed with exit code 1 (use -v to see invocation)

处理javafxports的gradle文件如下所示

代码语言:javascript
复制
buildscript {
repositories {
    jcenter()
    google()
    maven {
        url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
    }
}
dependencies {
    classpath 'org.javafxports:jfxmobile-plugin:2.0.29'

}
apply plugin: 'org.javafxports.jfxmobile'
repositories {
jcenter()
maven {
    'http://nexus.gluonhq.com/nexus/content/repositories/releases'
    }
    url 'https://jitpack.io'
}
mainClassName = project.ext.get('mainClass')
jfxmobile {
downConfig {
    version = '3.8.0'
    // Do not edit the line below. Use Gluon Mobile Settings in your project context menu instead
    plugins 'display', 'lifecycle', 'statusbar', 'storage'
}
android {
    targetSdkVersion = 21
    manifest = 'src/android/AndroidManifest.xml'
}
ios {
    infoPList = file('src/ios/Default-Info.plist')
    forceLinkClasses = [
            'com.gluonhq.**.*',
            'javax.annotations.**.*',
            'javax.inject.**.*',
            'javax.json.**.*',
            'org.glassfish.json.**.*'
    ]
}

你知道问题出在哪里吗?

EN

回答 1

Stack Overflow用户

发布于 2018-08-31 17:47:01

使用XDStrings进行编译时,需要使用以下代码

代码语言:javascript
复制
compileJava {
options.compilerArgs += ["-XDstringConcat=inline"] //important for IOS. See http://docs.gluonhq.com/gluonvm/ at the very bottom
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51684044

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档