Why there are multiple copies for the same version of gradle

后端 未结 3 508
一个人的身影
一个人的身影 2020-12-09 01:01

I have an android studio project, with the file gradle/wrapper/gradle-wrapper.properties configured as following.

#Wed Apr 10 15:27:10 PDT 2013
         


        
3条回答
  •  时光取名叫无心
    2020-12-09 01:35

    Saw same problem and made a try. Looks like that Android Studio does not build with the grale/wrapper/gradle-wrapper.jar in your project, but instead the one within itself(Android Studio.app/Contents/plugins/android/lib/templates/gradle/wrapper/gradle/wrapper/gradle-wrapper.jar in macOS).

    As mentioned by @alijandro, if the gradle-wrapper.jar in your two projects are not using the same hash policy, or not the same as the Android Studio app, it will cause the problem you saw.

    To get rid of this, just copy the gradle-wrapper.jar from Android Studio app directory to your project and you're all set.

提交回复
热议问题