简体   繁体   中英

React native - assemble release apk

I'm trying to assemble a release APK to test the app on another Android phone, and being blocked by following error.

> 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)

Any suggestions?

There is currently an issue with jcenter. https://status.bintray.com/

In the meantime, try cutting your internet connection and running the assemble script.

Open your build.gradle file and add the code below under android:

android {

    lintOptions { 
      checkReleaseBuilds false 
 }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM