Trying to start a new Kotlin project with Android Studio 3.0 Canary 1 displays this error. Full trace:
Error: cannot find method 'Com.android.build.gradle.internal.variant.BaseVariantData.getOutputs () Ljava / Util / List;'. Possible causes of this unexpected error:
- Gradle's dependency cache may be damaged (this sometimes happens after a network connection timeout.) Dependencies reload and synchronization project (network required).
- The Gradle state of the build process (daemon) may be corrupted. Stopping all Gradle daemons can solve this problem. Stop Gradle build processes (restart required)
- Your project may use a third-party plugin that is incompatible with other plugins in the project or version of Gradle requested by the project.
In the case of corrupt Gradle processes, you can also try closing the IDE and then destroying all Java processes.
I tried the first two options, and third-party plugins remained by default.
gradle -wrapper.properties
build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext.kotlin_version = '1.1.2-3' repositories { maven { url 'https://maven.google.com' } jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.0.0-alpha1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() maven { url 'https://maven.google.com' } mavenCentral() } } task clean(type: Delete) { delete rootProject.buildDir }
I did not touch any of these values โโmyself, they are left as the default value. Creating a new project other than Kotlin does not have this problem.
android-studio kotlin
Josh Laird May 18 '17 at 8:41 a.m. 2017-05-18 08:41
source share