简体   繁体   English

带有Gluon的iOS上的JavaFxPorts

[英]JavaFxPorts on iOS with Gluon

i am using a MacBook Pro with OS X El Capitan Version 10.11.3. 我正在将MacBook Pro与OS X El Capitan版本10.11.3配合使用。 I try to start a simple "Hello World" Project from Gluon/javaFXports with the iOS Simulator. 我尝试使用iOS Simulator从Gluon / javaFXports启动一个简单的“ Hello World”项目。

If i simply run the project it works on my desktop but every time i run it with "launchIPhoneSimulator" this happens: 如果我只是运行该项目,则它可以在我的桌面上运行,但是每次我使用“ launchIPhoneSimulator”运行该项目时,都会发生:

14:52:46: Executing external task 'launchIPhoneSimulator'...
:compileJava UP-TO-DATE
:compileRetrolambdaMain UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:createDefaultIOSLauncher UP-TO-DATE
:compileIosJava UP-TO-DATE
:processIosResources UP-TO-DATE
:iosClasses UP-TO-DATE
:launchIPhoneSimulator FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':launchIPhoneSimulator'.
> Unable to find a matching device [arch=x86, family=iPhone, name=null, sdk=null]

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

BUILD FAILED

Total time: 1.986 secs
Unable to find a matching device [arch=x86, family=iPhone, name=null, sdk=null]
14:52:49: External task execution finished 'launchIPhoneSimulator'.

I am a developer for Apple, but i just got the free account maybe thats the problem? 我是Apple的开发人员,但我刚刚获得了免费帐户,也许这就是问题所在?

I have no other idea. 我没有其他想法 Can you help me please? 你能帮我吗?

Check that you have XCode installed and updated. 检查您是否已安装和更新XCode。 You should open it at least once and accept the license. 您应该至少打开一次并接受许可。 Also you can check XCode -> Window -> Devices for the list of simulators. 您也可以在XCode-> Window-> Devices中查看模拟器列表。

This is what I see when I run ./gradlew --info launchIPhoneSimulator : 这是我运行./gradlew --info launchIPhoneSimulator时看到的./gradlew --info launchIPhoneSimulator

ios simulator os ios
ios simulator target org.robovm.compiler.target.ios.IOSTarget@3c833d1a
ios simulator arch x86
ios simulator device type DeviceType [deviceName=com.apple.CoreSimulator.SimDeviceType.iPhone-6, 
    sdk=SDK 
    [displayName=Simulator - iOS 9.2, 
    minimalDisplayName=Simulator - 9.2, 
    canonicalName=iphonesimulator9.2, 
    version=9.2, 
    root=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk, 

    major=9, minor=2, revision=0, build=13C75, platformBuild=13C75, platformVersion=9.2, platformName=iphonesimulator], 
    archs=[x86_64, x86]]

According to this , you can try to find out which devices and SDKs you have: 根据这个 ,你可以尝试找出你有哪些设备和SDK:

To get a list of possible device names and matching sdk versions, you can run the command ios-sim showdevicetypes . 要获取可能的设备名称和匹配的sdk版本的列表,可以运行ios-sim showdevicetypes命令。 As well, you can run iso-sim showsdks to find out about the supported sdk versions. 同样,您可以运行iso-sim showsdks来查找有关受支持的sdk版本的信息。

the ios-sim command can be found in your local maven repository (which by default is located in your user home directory .m2/repository) under org/robovm/robovm-dist/ROBOVM_VERSION/unpacked/robovm-ROBOVM_VERSION/bin (replace ROBOVM_VERSION with the version used by the jfxmobile plugin). ios-sim命令位于.m2/repository) under org/robovm/robovm-dist/ROBOVM_VERSION/unpacked/robovm-ROBOVM_VERSION/bin的本地Maven存储库(默认情况下位于用户主目录.m2/repository) under org/robovm/robovm-dist/ROBOVM_VERSION/unpacked/robovm-ROBOVM_VERSION/bin (替换ROBOVM_VERSION)以及jfxmobile插件使用的版本)。

You should use also the latest version of the plugin (check your build.gradle file): 您还应该使用插件的最新版本(检查build.gradle文件):

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

This version makes use of the RoboVM 1.8.0. 该版本使用RoboVM 1.8.0。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM