https://kotlinlang.org logo
#android
Title
# android
p

pp.amorim

05/18/2017, 1:05 PM
use both, no?
l

louiscad

05/18/2017, 1:06 PM
pp.amorim: I tried kapt too as I said, one at a time of course, but the error message keeps failing the build
m

myanmarking

05/18/2017, 1:18 PM
how are u suing kapt in gradle-build?
just ‘apply plugin: ‘kotlin-kapt’ will do
l

louiscad

05/18/2017, 1:55 PM
I tried with and without the plugin header, still got this weird error. Actually just gave up using Android Studio 3.0 for now. Will see if next Canary build works better
y

yan

05/18/2017, 1:57 PM
@pp.amorim Looks like the problem is not with kapt, but with Android dex. Can you try to build your project with the release version of Android Gradle plugin?
r

rattleshirt

05/18/2017, 1:59 PM
Do you also get
Copy code
Caused by: java.lang.NoSuchMethodError: com.android.build.gradle.internal.variant.BaseVariantData.getOutputs()Ljava/util/List;
?
p

pp.amorim

05/18/2017, 2:01 PM
Just use Kotlin
-4
instead
-3
l

louiscad

05/18/2017, 2:04 PM
@yan The same project built with Android Studio 2.3 and Android Studio 2.4 Preview 7, using Kotlin 1.1.2-3 and AS versions respective android gradle plugins. Of course, I had to use Kotlin 1.1.2-4 to get rid of the error everyone had that @rattleshirt describes, but then it stopped working because not wanting
apt
(I don't reference generated generated code in Kotlin), so tried all the other options (annotationProcessor, and kapt), and each time, I got the error I described at build time (sync went without issues) before which is:
Copy code
Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
> java.lang.NoSuchMethodError (no error message)
r

rattleshirt

05/18/2017, 2:06 PM
My issue has been resolved. Thanks @pp.amorim
y

yan

05/18/2017, 2:15 PM
@louiscad I think you can file the new issue to the Android issue tracker, explaining all the details
2 Views