I was looking to build the APK and App Bundle. I need to create Apk of the project through android studio Build>>Build Bundle(s) /APK(s)>>Build Apk(s). But when I do this it gives me the following error I have tried every solution on internet eg invalidate caches and restart, clean project
Building with sound null safety
Running Gradle task 'assembleRelease'...
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':app:debugCompileClasspath'.
> Could not resolve com.google.android.material:material:<version>.
Required by:
project :app
> Could not resolve com.google.android.material:material:<version>.
> Could not get resource 'https://jcenter.bintray.com/com/google/android/material/material//material-.pom'.
> Could not GET 'https://jcenter.bintray.com/com/google/android/material/material//material-.pom'. Received status code 400 from server: Bad Request
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 53s
Running Gradle task 'assembleRelease'... 57.3s
Running Gradle task 'assembleRelease'... [!] Gradle threw an error while downloading artifacts from the network. Retrying to download...
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':app:debugCompileClasspath'.
> Could not resolve com.google.android.material:material:<version>.
Required by:
project :app
> Could not resolve com.google.android.material:material:<version>.
> Could not get resource 'https://jcenter.bintray.com/com/google/android/material/material//material-.pom'.
> Could not GET 'https://jcenter.bintray.com/com/google/android/material/material//material-.pom'. Received status code 400 from server: Bad Request
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 15s
Running Gradle task 'assembleRelease'... 17.4s
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download...
Gradle task assembleRelease failed with exit code 1
Process finished with exit code 1
CodePudding user response:
did you integrating Firebase Cloud Store in your project? If yes then Inside the project level gradle, you should add:-
classpath 'com.google.gms:google-services:4.0.1'
CodePudding user response:
It's trying to find the SDK com.google.android.material:material:<version>
. As you can see, the version is not specified.
If you replace <version>
with the actual version you want (e.g. 1.4.0
), this should resolve your issue.
Don't forget to add google()
in the list of Maven repositories since that's where this library is published.