我正在使用 Oracle JDK 10.2 在 iOS 上尝试 GluonVM。 我注意到,虽然 src/ios/Default-Info.plist 中有“com.javasuns.test”,但当我运行 “./gradlew launchIOSDevice” 命令时,bundle ID 取自 build.gradle 中定义的 mainClassName。
这是我的例子:
默认信息.plist
<key>CFBundleIdentifier</key>
<string>com.javasuns.test</string>
build.gradle
dependencies {
compile 'com.gluonhq:charm:5.0.2'
}
mainClassName = 'test.TestFX'
fxmobile {
javafxportsVersion = '8.60.12'
ios { ...... }
}
./gradlew launchIOSDevice
com.gluonhq.higgs.Higgs: non-fatal issue for class javafx.scene.web.JSObjectIosImpl (no known superclass)
command to dsymutil: xcrun dsymutil -o /Volumes/MyApps/testFX/build/gvm/testFX.app.dSYM /Volumes/MyApps/testFX/build/gvm/testFX.app/testFX
Error getting ProvisioninedDevices, ignore
created
created
created
created
Error getting ProvisioninedDevices, ignore
created
provprofile asked, bid = test.TestFX and origbid = test.TestFX
provprofile asked, bid = test.* and origbid = test.TestFX
provprofile asked, bid = * and origbid = test.TestFX
No provisioning profile found matching signing identity 'iPhone Developer: #NAME#' and app bundle ID 'test.TestFX'
will return PP null
No provisioning profile found matching signing identity 'iPhone Developer: #NAME#' and app bundle ID 'test.TestFX'
will return PP null
No provisioning profile found matching signing identity 'iPhone Developer: #NAME#' and app bundle ID 'test.TestFX'
will return PP null
Warning, getProvisioningProfile is failing
java.lang.NullPointerException
我通过在“com.javasuns”包下创建一个名为“test.java”的新java主类来绕过这个问题(忽略java类型名称通常以大写字母开头)。
build.gradle(已更改)
mainClassName = 'com.javasuns.test'
但是,现在出现了一个新错误,我不知道如何解决它:
13:17:45:491] BosonAppSupport: Validating codesign...
[SUB] /Volumes/MyApps/testFX/build/gvm/testFX.app: valid on disk
[SUB] /Volumes/MyApps/testFX/build/gvm/testFX.app: satisfies its Designated Requirement
[13:17:46:269] BosonAppSupport: Validation codesign result: true
[13:17:46:270] BosonAppSupport: Codesign done
[13:17:46:333] BosonAppBuilder: UploadInternal start
[13:17:51:041] : Upload Progress: 10%
[13:17:51:573] : Upload Progress: 20%
[13:17:52:104] : Upload Progress: 30%
[13:17:52:916] : Upload Progress: 40%
[13:17:53:947] : Upload Progress: 50%
[13:17:54:696] : Upload Progress: 60%
[13:17:55:520] : Upload Progress: 70%
[13:17:56:372] : Upload Progress: 80%
[13:17:57:367] : Upload Progress: 90%
[13:17:58:414] : Upload Progress: 100%
[13:17:58:460] BosonAppBuilder: uploadInternal done
[13:17:58:796] : Progress: CreatingStagingDirectory [5%]
[13:17:58:798] : Progress: ExtractingPackage [15%]
[13:17:58:799] : Progress: InspectingPackage [20%]
[13:17:58:802] : Progress: TakingInstallLock [20%]
[13:17:58:804] : Progress: PreflightingApplication [30%]
[13:17:58:805] : Progress: InstallingEmbeddedProfile [30%]
[13:17:58:812] : Progress: VerifyingApplication [40%]
[13:17:58:954] : Error: APIInternalError, Description: Failed to unhide archs in executable file:///private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.LXITKr/extracted/testFX.app/TestApp
> Task :launchIOSDevice
[13:17:58:955] BosonAppBuilder: Installing finished due to an error.
[13:17:58:958] BosonAppBuilder: Install internal failed
[13:17:58:958] BosonAppBuilder: Something went wrong. App wasn't installed on the device
关于如何解决这两个问题有什么想法吗?
最佳答案
有两个主键需要正确设置:CFBundleIdentifier
和CFBundleExecutable
.
您可以查看样本SingleView-GluonVM :
- 主类名(参见build.gradle):
com.gluonhq.samples.singleviewgvm.SingleViewWithGluonVM
- CFBundleIdentifier(参见Default-info.plist):
com.gluonhq.samples.singleviewgvm.SingleViewWithGluonVM
和
- Gradle 项目(参见 settings.gradle ):
singleview-gluonvmApp
- CFBundle可执行文件(参见Default-info.plist):
singleview-gluonvmApp
或示例DeepLearning-LinearClassifier ,具有类似的设置。
如您所见,Gluon IDE 插件默认设置 CFBundleIdentifier
作为主类名称和 CFBundleExecutable
作为您的移动项目的名称。
CFBundleIdentifier
当您想要将应用程序部署到 iOS 时,配置文件应具有此 bundle ID。但是,您也可以使用通配符。只需确保您已将配置文件下载并安装到您的计算机上(它应该位于 /Users/<user>/Library/MobileDevice/Provisioning Profiles
下),扩展名为 .mobileprovision
.
如果您预览它(例如从 Finder),此文件中的 AppID 可能类似于 <TEAM ID>.<mainClassName>
,或<TEAM ID>.*
.
This是 jfxmobile 插件设置 appId
的地方.
CFBundle可执行文件
关于CFBundleExecutable
,这是您的应用程序在 build/gvm/
下的名称会有。在这种情况下,它必须使用您的项目名称(如 gradle 名称)。
This是 jfxmobile 插件设置 appName
的地方.
您将在 /<appName>/build/gvm/<appName>.app
下找到您的应用程序(尽管 Finder 只会显示 <appName>
:
如果您看到应用程序的内容,您将在/<appName>/build/gvm/<appName>.app/<appName>
下找到可执行文件。 :
您收到的错误;
[13:17:58:954] : Error: APIInternalError, Description: Failed to unhide archs in executable file:///private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.LXITKr/extracted/testFX.app/TestApp
显示testFX.app/TestApp
,所以您的项目名称可能是 testFX
,但应该是TestApp
?
或者,您可以简单地匹配您在CFBundleExecutable
中设置的值。 ,通过添加 settings.gradle
文件到您的项目,其中:
rootProject.name = "<your bundle executable value>"
关于ios - GluonVM 在 iOS 设备上启动 [问题],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58154634/