2016-04-08 10 views
1

Pls, erklären Sie mir, wie Stream API in meinem libgdx Projekt anwenden?Stream-API in libgdx

Dass, wie ich versucht, dies gelten:

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 


    } 
} 

das, was ich bekommen:

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

Antwort

1

Sie nicht den compileOptions Block in diesem speziellen Block setzen. compileOptions ist durch das Android-Plugin definiert, und Sie müssen es in den android Block setzen. In einem LibGDX-Projekt finden Sie den Block android in der Datei build.gradle, die sich im Modul android befindet.