使用以下gradle文件在JavaFxPorts ioslaunch期间出错

问题描述 投票:1回答:1

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

[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文件如下所示

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.**.*'
    ]
}

知道可能是什么问题

xcode javafx javafxports
1个回答
1
投票

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

compileJava {
options.compilerArgs += ["-XDstringConcat=inline"] //important for IOS. See http://docs.gluonhq.com/gluonvm/ at the very bottom
}
© www.soinside.com 2019 - 2024. All rights reserved.