I just configured the Android Studio development environment, and the following error occurred when importing the project and compiling it:
org.gradle.api.resources.ResourceException: Could not get resource
It works fine for others, but why does it fail to compile myself? Gradle has also been downloaded and configured normally.
After reading the information online, I found the solution:
- Click the "Settings" option in the "File" menu to open the Settings panel (can be opened directly through the shortcut Ctrl+Alt+S)
- Type gradle in the search bar in the upper left corner of the Settings panel
- Click on the "Android Studio" menu item
- Check "Enable embedded Maven repository"
- Close the Settings panel and recompile