When I create a new project, I get these errors:
ERROR: Failed to resolve: androidx.appcompat:appcompat:1.6.1 Add Google Maven repository and sync project Show in Project Structure dialog Affected Modules: app
ERROR: Failed to resolve: androidx.core:core-ktx:1.12.0 Add Google Maven repository and sync project Show in Project Structure dialog Affected Modules: app
ERROR: Failed to resolve: com.google.android.gms:play-services-maps:18.2.0 Install Repository and sync project Show in Project Structure dialog Affected Modules: app
ERROR: Failed to resolve: androidx.test:runner:1.5.2 Add Google Maven repository and sync project Show in Project Structure dialog Affected Modules: app
ERROR: Failed to resolve: androidx.test.espresso:espresso-core:3.5.1 Add Google Maven repository and sync project Show in Project Structure dialog Affected Modules: app
Help me to solve them, please ><
Android Studio 3.4.1
I tried to fix the problems using other ppl answers on other similar questions, but it still doesn't work.
I cleared the cache, tried to delete .gradle, tried to add implementation 'androidx.appcompat:appcompat:1.1.0' and implementation "androidx.core:core-ktx:1.1.0", nothing works, unfortunately
Here are some steps you can take to resolve these issues:
Check your internet connection. Gradle needs to download dependencies from the internet. Make sure your internet connection is working properly and that Android Studio has the necessary permissions to access the internet.
Use the latest versions of the dependencies. Sometimes, the specified versions of the libraries may not be available. You can check the latest versions of the libraries on Maven Repository. Replace the versions in your app-level build.gradle file with the latest ones.
Sync your project with Gradle files. After making changes to the build.gradle files, you need to sync your project. You can do this by clicking on the "Sync Project with Gradle Files" button in the toolbar.
Clean and rebuild your project. Go to
Build > Clean Project, and thenBuild > Rebuild Project.Update Android Studio. You're using Android Studio 3.4.1, which is quite old. Consider updating to the latest version of Android Studio. Newer versions come with fixes for many issues and better support for AndroidX.
If none of these steps work, please provide more details about your build.gradle files and the exact error messages you're seeing.