简体   繁体   中英

React Native Error while trying to build android app

I am getting errors while trying to build a React Native App. (I tried both using Expo, then ejecting to React Native + Starting React Native from scratch and trying to build it).

The problem is related to the file j2objc-annotations-1.1.jar, which apparently has Denied Access

The log says the following:

Also thanks for any help.

Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

A problem occurred configuring root project 'MyAppName'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not download j2objc-annotations.jar (com.google.j2objc:j2objc-annotations:1.1)
      > Could not get resource 'https://jcenter.bintray.com/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar'.
         > java.io.FileNotFoundException: C:\Users\mique\.gradle\caches\modules-2\files-2.1\com.google.j2objc\j2objc-annotations\1.1\ed28ded51a8b1c6b112568def5f4b455e6809019\j2objc-annotations-1.1.jar (Acceso denegado // Access denied in English)```

I found the solution.

Delete the file --> in this case j2objc-annotations-1.1.jar from the folder in the error.

Run the build android command again and it will work correctly

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