将Libgdx项目启动到IPhonesimulator

时间:2015-06-12 15:44:34

标签: ios libgdx robovm

我试图确保我的应用程序适用于IOS。并尝试将其启动到我的Mac上的IPhonesimulator。

做:

./gradlew ios:launchIPhoneSimulator

让我的应用程序在模拟器上启动,libgdx出现标准的splashscreen,然后关闭,没有其他事情发生。

但是当我构建它时./gradlew ios:build ios:launchIPhoneSimulator我得到了这些错误:

  

2015-06-12 17:39:36.226 IOSLauncher [730:16518] [debug] IOSApplication:iOS版本:8.3   2015-06-12 17:39:36.227 IOSLauncher [730:16518] [debug] IOSApplication:以64位模式运行   2015-06-12 17:39:36.229 IOSLauncher [730:16518] [debug] IOSApplication:scale:2.0   2015-06-12 17:39:36.347 IOSLauncher [730:16518] [debug] IOSApplication:Unscaled View:Portrait 375x667   2015-06-12 17:39:36.347 IOSLauncher [730:16518] [debug] IOSApplication:查看:人像750x1334   2015-06-12 17:39:36.348 IOSLauncher [730:16518] [debug] IOSGraphics:750.0x1334.0,2.0   2015-06-12 17:39:37.104 IOSLauncher [730:16518] [debug] IOSGraphics:显示:ppi = 264,密度= 1.65   2015-06-12 17:39:37.631 IOSLauncher [730:16658] 17:39:37.614错误:98:错误'!obj'尝试获取默认输入设备的采样率   2015-06-12 17:39:37.631 IOSLauncher [730:16658] 17:39:37.631错误:100:获取音频输入设备采样率时出错:'!obj'   2015-06-12 17:39:37.632 IOSLauncher [730:16658] 17:39:37.632警告:230:输入设备为0x0; '(空值)'   2015-06-12 17:39:37.632 IOSLauncher [730:16658] 17:39:37.632警告:234:输出设备为0x26; 'AppleHDAEngineOutput:1B,0,1,2:0'   2015-06-12 17:39:37.632 IOSLauncher [730:16658] 17:39:37.632错误:296:错误'!obj'   2015-06-12 17:39:37.632 IOSLauncher [730:16618] 17:39:37.632错误:296:错误-66680   2015-06-12 17:39:37.633 IOSLauncher [730:16518] 17:39:37.632 ERROR:> aurioc> 806:失败:-10851(启用2,outf< 2 ch,44100 Hz,Int16,inter> inf< 2 ch,0 Hz,Int16,inter>)   2015-06-12 17:39:37.633 IOSLauncher [730:16618] 17:39:37.633错误:113:* * * NULL AQIONode对象   2015-06-12 17:39:37.633 IOSLauncher [730:16518] OAL错误:+ [ALWrapper openDevice:]:无法打开设备(null)   2015-06-12 17:39:37.633 IOSLauncher [730:16518] OAL错误: - [ALDevice initWithDeviceSpecifier:] ::创建OpenAL设备失败(null)   2015-06-12 17:39:37.635 IOSLauncher [730:16518] OAL错误:+ [ALWrapper closeDevice:]:无效值(错误代码0x0000a004)   2015-06-12 17:39:37.635 IOSLauncher [730:16618] 17:39:37.635错误:703:无法制作UISound渲染器   2015-06-12 17:39:37.636 IOSLauncher [730:16518] OAL警告: - [OALAudioSession onAudioError:]:收到音频错误通知,但最后一次重置是0.377221秒前。什么也不做。   2015-06-12 17:39:37.636 IOSLauncher [730:16518] OAL错误: - [OALSimpleAudio initWithSources:] ::无法创建OpenAL设备   2015-06-12 17:39:37.656 IOSLauncher [730:16518] [错误] IOSAudio:没有OALSimpleAudio实例可用,音频将不可用   2015-06-12 17:39:37.944 IOSLauncher [730:16518] [debug] IOSApplication:created   2015-06-12 17:39:39.155 IOSLauncher [730:16658] 17:39:39.155错误:296:错误-66680   2015-06-12 17:39:39.156 IOSLauncher [730:16664] 17:39:39.156错误:> aurioc> 806:失败:-10851(启用2,outf< 2 ch,44100 Hz,Int16,inter> inf< 2 ch,0 Hz,Int16,inter>)   2015-06-12 17:39:39.157 IOSLauncher [730:16664] OAL错误:+ [ALWrapper openDevice:]:无法打开设备(null)   2015-06-12 17:39:39.157 IOSLauncher [730:16664] OAL错误: - [ALDevice initWithDeviceSpecifier:] ::创建OpenAL设备失败(null)   2015-06-12 17:39:39.157 IOSLauncher [730:16664] OAL错误:+ [ALWrapper closeDevice:]:无效值(错误代码0x0000a004)   2015-06-12 17:39:39.157 IOSLauncher [730:16664] OAL警告: - [OALAudioSession onAudioError:]:收到音频错误通知。重置音频会话。   建立成功

这是我的IOSLauncher,如果有任何帮助..

public class IOSLauncher extends IOSApplication.Delegate {

@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new MainClass(null,null), config);
}

public static void main(String[] argv) {
    NSAutoreleasePool pool = new NSAutoreleasePool();
    UIApplication.main(argv, null, IOSLauncher.class);
    pool.close();

}

}

1 个答案:

答案 0 :(得分:0)

你模拟器的音频输出是不可靠的。开放式音频工具包是失败的init,导致一切都崩溃。