2016-04-08 24 views
1

請問,請解釋一下,如何在我的libgdx項目中應用Stream API?libgdx中的Stream 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()' 

回答

1

你不能把compileOptions塊該特定塊。 compileOptions由android插件定義,並且您必須將其放在android塊內。在LibGDX項目中,您會在android模塊中的build.gradle文件中找到android塊。