< Kotlin > Android Studio3.0 Kotlin Engineering Problem Set

Source: Internet
Author: User

Issue 1: Create a new Android project that supports Kotlin, stuck in "Resolve Dependency:classpath"

Solution Analysis:
Generally encountered "Resolve Dependency:classpath" stuck motionless, and so on if still did not respond, should be never response. Restart Android Studio or Gradle sync again, and if not, look at the gradle version of "Gradle-wrapper.properties" in the project and go to the system. Gradle The directory below to see if the corresponding gradle has been downloaded OK

I am here under the home directory. Gradle/wrapper/dists, you can see some gradle versions and find the version you are using. After entering, you can see a long string of file names and continue to enter

As can be seen on some files, if there is a complete. zip package and. ok file that the corresponding Gradle version is downloaded OK, if not downloaded, as in the build, you can obviously see the directory under the size of a file is gradually increasing, which means that the execution of Gradle Version of the download task, you can wait patiently, if it is downloaded OK, or always stuck in the "Resolve Dependency:classpath", is I today with AS3.0 build Kotlin project When the problem encountered, You can see if your build.gradle file is not a common dependency. Just like the Kotlin project.
is to use the

repositories {  maven {    "https://maven.google.com"  }}

This is inaccessible within the walls. I guess that's what led to it, and instead of Aliyun maven or other nationally accessible maven, it won't get stuck.

Issue 2: "Unable to find method ' Com.android.build.gradle.internal.variant.BaseVariantData.getOutput () ljava/util/list '"


Workaround:
Kotlin version adjustment, before is 1.1.2-3, replaced by 1.1.2-4

‘1.1.2-4‘
Issue 3: "Declaring Custom ' clean ' task was using the standard Gralde lifecycle plugins was not allowed"


Workaround:

The clean task in the Build.gradle is ruthlessly commented out.

//task clean(type: Delete) {//   delete rootProject.buildDir//}
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.