在以新版本更新Ios之后(我认为在这之前还可以),当我尝试启动Gradle任务“launchIosDevice”时,我遇到了以下异常:

java.lang.NullPointerException
        at org.robovm.libimobiledevice.Callbacks.callInstproxyCallback(Callbacks.java:66)

谁能帮助我理解问题?
先感谢您。
buildscript {

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

    }
}

apply plugin: 'org.javafxports.jfxmobile'
repositories {
    jcenter()
    maven {
        url 'http://nexus.gluonhq.com/nexus/content/repositories/releases/'
    }
    maven {
       url('https://oss.sonatype.org/content/repositories/snapshots/')
    }
}

mainClassName = 'it.wstech.lex.LXMainApplication'

dependencies {
    compile 'com.airhacks:afterburner.mfx:1.6.2'
    compile fileTree(dir: '***', include: ['*.jar'])
    compile fileTree(dir: '***', include: ['*.jar'])
    compile fileTree(dir: '***', include: ['*.jar'])
    compile fileTree(dir: 'lib', include: ['*.jar'])

    androidCompile 'org.glassfish:javax.json:1.0.4'
    compile "com.gluonhq:charm:4.3.0"


}


jfxmobile {


    javafxportsVersion = '8.60.8'

    downConfig {
        version "3.3.0-SNAPSHOT"
        plugins 'display','browser','cache', 'lifecycle', 'statusbar', 'storage', 'local-notifications', 'device','connectivity','dialer','orientation','runtime-args', 'push-notifications'
    }
    android {
      manifest = 'src/android/AndroidManifest.xml'
      compileSdkVersion = 21
         signingConfig {
            storeFile file('***')
            storePassword 'wstechsrl'
            keyAlias '***'
            keyPassword '***'
        }

         dexOptions {
        javaMaxHeapSize "4g"
    }
    }


    ios {

    iosSignIdentity = '****'
    iosProvisioningProfile = '****'
        infoPList = file('src/ios/Default-Info.plist')
                       arch = 'arm64'
                        ipaArchs=['arm64']


        forceLinkClasses = [
                'com.gluonhq.**.*',
                'it.wstech.**.*',
                'javax.annotations.**.*',
                'javax.inject.**.*',
                'javax.json.**.*',
                'org.glassfish.json.**.*'
        ]


    }
}

[ 96%] Uploading /Volumes/RoboVM RAM Disk/tmp/Users/wstechsrl/Desktop/workspace_fx/strikenball/build/javafxports/tmp/ios/strikenball.app/lib/robovm-cocoatouch-2.3.0.jar...
[ 97%] Uploading /Volumes/RoboVM RAM Disk/tmp/Users/wstechsrl/Desktop/workspace_fx/strikenball/build/javafxports/tmp/ios/strikenball.app/lib/robovm-objc-2.3.0.jar...
[ 98%] Uploading /Volumes/RoboVM RAM Disk/tmp/Users/wstechsrl/Desktop/workspace_fx/strikenball/build/javafxports/tmp/ios/strikenball.app/strikenball...
[100%] Upload complete
[  0%] Beginning installation...
[  5%] CreatingStagingDirectory
[ 15%] ExtractingPackage
[ 20%] InspectingPackage
[ 20%] TakingInstallLock
[ 30%] PreflightingApplication
[ 30%] InstallingEmbeddedProfile
[ 40%] VerifyingApplication
[ 50%] CreatingContainer
[ 60%] InstallingApplication
[ 70%] PostflightingApplication
[ 80%] SandboxingApplication
[ 90%] GeneratingApplicationMap
java.lang.NullPointerException
        at org.robovm.libimobiledevice.Callbacks.callInstproxyCallback(Callbacks.java:66)

最佳答案

将我的iPad更新到iOS 10.3之后,我可以重现运行./gradlew --info launchIOSDevice的错误:

[100%] Upload complete
[  0%] Beginning installation...
[  5%] CreatingStagingDirectory
[ 15%] ExtractingPackage
[ 20%] InspectingPackage
[ 20%] TakingInstallLock
[ 30%] PreflightingApplication
[ 30%] InstallingEmbeddedProfile
[ 40%] VerifyingApplication
[ 50%] CreatingContainer
[ 60%] InstallingApplication
[ 70%] PostflightingApplication
[ 80%] SandboxingApplication
[ 90%] GeneratingApplicationMap
java.lang.NullPointerException
        at org.robovm.libimobiledevice.Callbacks.callInstproxyCallback(Callbacks.java:66)

新的iOS版本存在一些问题,这需要由Robovm fork Mobidevelop进行修复。解决问题后,将需要新版本的jfxmobile插件。

已经创建了一个issue,但也许您也可以发布您的ojit_a。

同时,解决方法是在构建ipa后手动安装应用程序:

运行./gradlew createIpa,在/ build / javafxports / ios下找到ipa,双击它,它将与iTunes一起打开。然后将其下载并安装在您的iOS设备上。

10-07 15:54