异常构建gradle任务launchIosDevice

时间:2017-04-01 10:11:52

标签: ios gradle javafx task gluon-mobile

我在新版本更新了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)

1 个答案:

答案 0 :(得分:1)

将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版本有些问题,需要通过Mobidevelop(Robovm分支)修复。一旦他们解决了它,就需要新版本的jfxmobile插件。

已经创建了issue,但也许你也可以发布你的。{/ p>

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

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