Unit test configuration broke in Android Studio 3.1

前端 未结 3 1334
遇见更好的自我
遇见更好的自我 2021-01-21 00:40

I updated to Android Studio 3.1 and as suggested by Android Studio also:

  • Updated the Android gradle plugin to 3.1.0 from 2.3.0 (also tried the new 3.1.1, the probl
相关标签:
3条回答
  • 2021-01-21 01:19

    in your gradle-wrapper.properties, try using:

    distributionUrl=https://services.gradle.org/distributions/gradle-4.3-rc-2-all.zip

    0 讨论(0)
  • 2021-01-21 01:20

    As this bug commenter pointed out: https://issuetracker.google.com/issues/77605097#comment7

    disabling the "configure on demand" feature of Gradle (in Settings: Build, Execution, and Deployment: Compiler) is a viable workaround.

    Since I did this my Unit tests are all working again.

    0 讨论(0)
  • 2021-01-21 01:22

    Solution from kekkou of the libgdx forums: http://www.badlogicgames.com/forum/viewtopic.php?f=11&t=27639&p=109249#p109249

    His solution is: Move the project(':android') {} block in root build.gradle into android\build.gradle.

    This makes all commands work again. I did not find any downsides.

    The commit for this fix on my project: https://github.com/Leejjon/BluffPoker/commit/d10deb090c2d80e641d733efdaa85f99c0a9fe2f

    0 讨论(0)
提交回复
热议问题