Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/205.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java libgdx中的流API_Java_Android_Libgdx - Fatal编程技术网

Java libgdx中的流API

Java libgdx中的流API,java,android,libgdx,Java,Android,Libgdx,请解释一下,如何在我的libgdx项目中应用流API 我是如何尝试应用这一点的: project(":android") { apply plugin: "android" apply plugin: 'me.tatarka.retrolambda' configurations { natives } dependencies { compile project(":core") compile "com.badlogicgames.gdx:gdx-backend-andr

请解释一下,如何在我的libgdx项目中应用流API

我是如何尝试应用这一点的:

project(":android") {
apply plugin: "android"
apply plugin: 'me.tatarka.retrolambda'

configurations { natives }

dependencies {
    compile project(":core")
    compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
    compile 'net.sourceforge.streamsupport:streamsupport:1.4.1'
    compile 'me.tatarka:gradle-retrolambda:3.3.0-beta3'
}
compileOptions {
    targetCompatibility JavaVersion.VERSION_1_8
    sourceCompatibility JavaVersion.VERSION_1_8


   }
}
这就是我得到的:

Error:(62, 0) Gradle DSL method not found: 'compileOptions()'

不能将
compileOptions
块放在此特定块中
compileOptions
是由android插件定义的,您必须将其放入
android
块中。在LibGDX项目中,您将在
android
模块中的build.gradle文件中找到
android