When I build my kotlin android-project, something error happend, how can I solve the problem? Thank U!
Error:java.lang.NoSuchMethodError: com.google.protobuf.GeneratedMessageLite.newSingularGeneratedExtension(Lcom/google/protobuf/MessageLite;Ljava/lang/Object;Lcom/google/protobuf/MessageLite;Lcom/google/protobuf/Internal$EnumLiteMap;ILcom/google/protobuf/WireFormat$FieldType;)Lcom/google/protobuf/GeneratedMessageLite$GeneratedExtension;
This is a known issue which will be resolved in a forthcoming update. As a workaround, make sure that the Kotlin plugin is applied before the Android plugin in your build.gradle.
Is there a youtrack issue for this that I can add to / watch? I’m still seeing it in 1.0.3-eap.
The issue is https://youtrack.jetbrains.com/issue/KT-12431 and the fix is included in 1.0.2-1 as well as the most recent 1.0.3 EAP build. Which exactly version are you using? Note that you need to update your build.gradle to reference the new version; it’s not enough to update the IntelliJ IDEA plugin.
I’m using 1.0.3-eap-58
on Android Studio 2.2 - prev 4 (gradle 2.2.0-alpha4). I know it’s bleeding edge but I thought it relevant to point out regardless. I also tested on 1.0.2-1.
The exact error is:
Plugin Error: Kotlin threw an uncaught NoSuchMethodError. Disable Plugin
NoSuchMethodError: com.google.common.io.Files.newOutputStreamSupplier(Ljava/io/File;)Lcom/google/common/io/OutputSupplier;```
Let me know what you need.
You’re not “seeing this”, you’re seeing a different problem. Please file a new YouTrack issue with the full exception stacktrace and, if possible, with a project that can be used to reproduce the problem.
Ok. No problem. I wasn’t sure if they were the same root cause being manifested in a different way, that’s why I asked first.
The issue is logged as: https://youtrack.jetbrains.com/issue/KT-12895
thank u everyone , I upgrade my kotlin-plugin, everything is ok!