A simple test ...
import org.junit.Test
class KotlinUnitTest {
@Test
fun test() {
assert(true)
}
}
... leads to the following ...
Information:Gradle: Executing tasks: [:app:assembleDebug, :app:assembleDebugUnitTest]
Information:Kotlin: Kotlin JPS plugin is disabled
Information:Module "app" was fully rebuilt due to project configuration/dependencies changes
Information:06/12/2017 5:08 PM - Compilation completed with 3 errors and 0 warnings in 19s 962ms
Error:Gradle: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Gradle: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Gradle: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Adding android.enableAapt2=falseto gradle.properties (or also gradle -wrapper.properties ) made Android Studio stop infinitely every time I ran the test.
This is strange because I can ...
- Launch my production application (filled with Kotlin files)
- Unit test in Java
But for some reason I can’t check in Kotlin
source
share