Gradle 0.9.+/0.9.2 error: Unable to load class 'com.android.builder.testing.api.DeviceProvider'

前端 未结 2 1924
鱼传尺愫
鱼传尺愫 2020-11-29 10:03

This morning, all Android Studio projects started failing Gradle sync/build/clean with:

> Could not create plugin of type \'         


        
2条回答
  •  一整个雨季
    2020-11-29 10:49

    In order to use the latest Gradle version 0.9.+, you have to update gradlewrapper.properties file too.

    Open gradlewrapper.properties file which locate under youProjectPath/gradle/wrapper/gradlewrapper.properties path:

    change distributionUrl url From

    distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip
    

    To

    distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-all.zip
    

    After that, I changed build.gradle dependencies to

    classpath 'com.android.tools.build:gradle:0.9.+'
    

    and synced gradle files and everything when good.

    Cheers

提交回复
热议问题