2016-10-11 3 views
2

나는 잭 컴파일러로 문제를 겪고있다. Androidd 앱 개발을 위해 Intellij IDEA를 사용합니다.Jack Compiler 지원을 활성화하는 방법은 무엇입니까?

내가 읽고 theese 문서화 : 여기

how to use java 8 features

documentation for jack compiler 내 build.gradle의 설정입니다 :

android { 
... 
defaultConfig { 
    ... 
    jackOptions { 
     enabled true 
    } 
    ... 
} 

compileOptions { 
    sourceCompatibility JavaVersion.VERSION_1_8 
    targetCompatibility JavaVersion.VERSION_1_8 
} 
... 
} 

dependencies { 
compile fileTree(dir: 'libs', include: ['*.jar']) 
testCompile 'junit:junit:4.12' 
compile 'com.android.support:appcompat-v7:24.2.1' 
compile ('io.socket:socket.io-client:0.8.1') { 
    // excluding org.json which is provided by Android 
    exclude group: 'org.json', module: 'json' 
} 
compile 'com.android.support:design:24.2.1' 
compile 'com.android.support:cardview-v7:24.2.1' 

compile 'com.squareup.retrofit2:retrofit:2.1.0' 
compile 'com.squareup.retrofit2:converter-gson:2.1.0' 
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0' 
compile 'io.reactivex:rxjava:1.2.0' 
compile 'io.reactivex:rxandroid:1.2.1' 
} 

하지만 여전히이 오류 얻을 :

Error:Gradle: Execution failed for task ':app:compileDebugJavaWithJavac'. 
> Compilation failed; see the compiler error output for details. 

Gradle을 오류 빌드 :

Error:(12, 0) Gradle DSL method not found: 'jackOptions()' 
Possible causes:<ul><li>The project 'App' may be using a version of Gradle that does not contain the method. 
<a href="open.wrapper.file">Open Gradle wrapper file</a></li><li>The build file may be missing a Gradle plugin. 
<a href="apply.gradle.plugin">Apply Gradle plugin</a></li> 

이를 파악하는 방법을 알고하지 마십시오.

+0

android-apt –

+0

과 같이 jack과 호환되지 않는 lib를 가져 왔습니다. 내 의존성이 추가되었습니다. –

+0

호환되는지 확인하십시오. –

답변

1
defaultConfig { 

     ... 

     jackOptions { 
      enabled true 
     } 

     // inside defaultConfig 
     compileOptions { 
      sourceCompatibility JavaVersion.VERSION_1_8 
      targetCompatibility JavaVersion.VERSION_1_8 
     } 
    } 
관련 문제