【问题标题】:React native - assemble release apkReact native - 组装发布 apk
【发布时间】:2021-03-16 04:29:07
【问题描述】:

我正在尝试组装一个发布 APK 以在另一部 Android 手机上测试该应用,但由于以下错误而被阻止。

> Task :app:lintVitalRelease FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':reactnativenotifications:reactNative60DebugUnitTestRuntimeClasspath'.
   > Could not download mockito-core-2.25.1.jar (org.mockito:mockito-core:2.25.1)
      > Could not get resource 'https://jcenter.bintray.com/org/mockito/mockito-core/2.25.1/mockito-core-2.25.1.jar'.
         > Could not GET 'https://jcenter.bintray.com/org/mockito/mockito-core/2.25.1/mockito-core-2.25.1.jar'. Received status code 502 from server: Bad Gateway
   > Could not download shadows-framework-4.3.jar (org.robolectric:shadows-framework:4.3)
      > Could not get resource 'https://jcenter.bintray.com/org/robolectric/shadows-framework/4.3/shadows-framework-4.3.jar'.
         > Premature end of Content-Length delimited message body (expected: 3,329,584; received: 289,045)

有什么建议吗?

【问题讨论】:

  • 你连接到互联网了吗?正如错误所说,进程无法下载某些库。

标签: android react-native gradle


【解决方案1】:

打开你的 build.gradle 文件并在 android 下添加以下代码:

android {

    lintOptions { 
      checkReleaseBuilds false 
 }

【讨论】:

    猜你喜欢
    • 2017-04-07
    • 1970-01-01
    • 2018-05-16
    • 1970-01-01
    • 1970-01-01
    • 2016-12-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多