How to change Gradle\SDK settings when opening Android Studio project from a different PC

前端 未结 2 1812
你的背包
你的背包 2021-01-03 14:53

I Copied my Android Studio project from my work PC and copied it to my home PC. When I opened the project I got the following error:

Failed to import

相关标签:
2条回答
  • 2021-01-03 15:13

    I found a similar question in: Gradle build errors after updating Android Studio

    in the local.properties file in the root of the project, change the sdk.dir value.

    0 讨论(0)
  • 2021-01-03 15:33

    For anyone else running into Gradle issues after updating Android Studio:

    Go to File > Project Structure > Project.

    My Gradle version and Android plug in version did not match, which was causing my issue. If you make a change here, make sure you also update your top-level Gradle file with the same version like so: classpath 'com.android.tools.build:gradle:some version number'

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