报错如下 打包app的时候报错



  • info Starting JS server...
    info Building and installing the app on the device (cd android && gradlew.bat app:installRelease)...

    Configure project :@react-native-community_async-storage
    WARNING: The following project options are deprecated and have been removed:
    android.enableAapt2
    This property has no effect, AAPT2 is now always used.

    Configure project :app
    WARNING: The following project options are deprecated and have been removed:
    android.enableAapt2
    This property has no effect, AAPT2 is now always used.

    Configure project :react-native-camera
    WARNING: The following project options are deprecated and have been removed:
    android.enableAapt2
    This property has no effect, AAPT2 is now always used.

    Configure project :react-native-fs
    WARNING: The following project options are deprecated and have been removed:
    android.enableAapt2
    This property has no effect, AAPT2 is now always used.

    Configure project :react-native-gesture-handler
    WARNING: The following project options are deprecated and have been removed:
    android.enableAapt2
    This property has no effect, AAPT2 is now always used.

    Configure project :react-native-image-picker
    WARNING: The following project options are deprecated and have been removed:
    android.enableAapt2
    This property has no effect, AAPT2 is now always used.

    Configure project :react-native-qr-scanner
    WARNING: The following project options are deprecated and have been removed:
    android.enableAapt2
    This property has no effect, AAPT2 is now always used.

    WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
    It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

    Configure project :react-native-webview
    WARNING: The following project options are deprecated and have been removed:
    android.enableAapt2
    This property has no effect, AAPT2 is now always used.

    :react-native-webview:reactNativeAndroidRoot D:\Android\zhihui\node_modules\react-native\android

    Task :react-native-camera:compileGeneralReleaseJavaWithJavac
    注: 某些输入文件使用或覆盖了已过时的 API。
    注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
    注: D:\Android\zhihui\node_modules\react-native-camera\android\src\main\java\com\google\android\cameraview\Camera2.java使用了未经检查或不安全的操作。
    注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。

    Task :react-native-fs:compileReleaseJavaWithJavac
    注: D:\Android\zhihui\node_modules\react-native-fs\android\src\main\java\com\rnfs\RNFSManager.java使用或覆盖了已过时的 API。
    注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。

    Task :react-native-gesture-handler:compileReleaseJavaWithJavac
    注: D:\Android\zhihui\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerButtonViewManager.java使用或覆盖了已过时的 API。
    注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
    注: 某些输入文件使用了未经检查或不安全的操作。
    注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。

    Task :react-native-qr-scanner:javaPreCompileRelease FAILED

    FAILURE: Build failed with an exception.

    • What went wrong:
      Could not resolve all files for configuration ':react-native-qr-scanner:releaseCompileClasspath'.

    Could not download core.jar (com.google.zxing:core:3.3.2)
    Could not get resource 'https://jcenter.bintray.com/com/google/zxing/core/3.3.2/core-3.3.2.jar'.
    Read timed out

    • 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 1m 57s
    71 actionable tasks: 70 executed, 1 up-to-date
    error Could not install the app on the device, read the error above for details.
    Make sure you have an Android emulator running or a device connected and have
    set up your Android development environment:
    https://facebook.github.io/react-native/docs/getting-started.html
    error Command failed: gradlew.bat app:installRelease. Run CLI with --verbose flag for more details.



  • Could not download core.jar (com.google.zxing:core:3.3.2)
    Could not get resource 'https://jcenter.bintray.com/com/google/zxing/core/3.3.2/core-3.3.2.jar'.
    Read timed out

    0_1565180552993_b8f417bf-da08-4777-a559-277623039d8e-image.png



  • 我修改配置文件解决了 ,请问如何修改app指向的服务器地址? 我没接触这个nodejs 也没接触过React Native开发 老板直接让我修改app 的服务地址 我找了很多资料都没解决



  • @晴明请看看我的提问 谢谢



  • 没明白,啥叫app指向的服务器地址,修改这个干嘛?



  • @晴明 就是请求数据的服务



  • @晴明 0_1565244361888_3218886c-bff0-4933-b19a-8d8b64953452-image.png你看看



  • @晴明 我已经自己找到了 不用帮忙了



  • 你们自己的业务逻辑代码你问别人有啥用


Log in to reply