提问人:basil p thomas 提问时间:12/28/2021 最后编辑:Maik Lowreybasil p thomas 更新时间:12/28/2021 访问量:194
构建 APK 和 App bundle 有什么问题?
What wrong with build APK and App bundle?
问:
我正在寻找构建 APK 和 App Bundle。我需要通过 android studio Build>>Build Bundle(s) /APK(s)>>Build Apk 创建项目的 Apk。但是当我这样做时,它给了我以下错误 我已经尝试了互联网上的所有解决方案,例如使缓存失效并重新启动,清理项目
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/%3Cversion%3E/material-%3Cversion%3E.pom'.
> Could not GET 'https://jcenter.bintray.com/com/google/android/material/material/%3Cversion%3E/material-%3Cversion%3E.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/%3Cversion%3E/material-%3Cversion%3E.pom'.
> Could not GET 'https://jcenter.bintray.com/com/google/android/material/material/%3Cversion%3E/material-%3Cversion%3E.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
答:
0赞
Piyush Kumar
12/28/2021
#1
您是否在项目中集成了 Firebase Cloud Store?如果是,那么在项目级别 gradle 中,您应该添加:-
classpath 'com.google.gms:google-services:4.0.1'
评论
0赞
basil p thomas
12/28/2021
不,我没有使用 firebase
0赞
Pierre
12/28/2021
#2
它正在尝试查找 SDK 。如您所见,未指定版本。com.google.android.material:material:<version>
如果您替换为所需的实际版本(例如),这应该可以解决您的问题。<version>
1.4.0
不要忘记添加 Maven 存储库列表,因为这是发布此库的地方。google()
评论