程序包不存在



  • gradlew assembleRelease 的时候报错

    C:\Users\86403\WebstormProjects\AwesomeProject\node_modules\react-native-update\android\src\main\java\cn\reactnative\modules\update\DownloadTask.java:7: 错误: 程序包com.facebook.stetho.inspector.elements不存在
    import com.facebook.stetho.inspector.elements.ShadowDocument;
    ^
    C:\Users\86403\WebstormProjects\AwesomeProject\node_modules\react-native-update\android\src\main\java\cn\reactnative\modules\update\DownloadTask.java:8: 错误: 程序包com.squareup.okhttp不存在
    import com.squareup.okhttp.OkHttpClient;
    ^
    什么问题


  • administrators

    目前的react-native-update与新版本的rn存在一些兼容问题,我们正在紧急处理,抱歉!



  • 此回复已被删除!


  • @sunnylqm 希望能早点处理好


  • administrators

    @linhaobin 已更新,请尝试新的1.1.0版本



  • @sunnylqm npm上默认为1.0.6版本。
    我用1.1.0之后:react-native-update:compileReleaseNdk (Thread[main,5,main]) started.
    :react-native-update:compileReleaseNdk
    Executing task ':react-native-update:compileReleaseNdk' (up-to-date check took 0.096 secs) due to:
    No history is available.
    All input files are considered out-of-date for incremental task ':react-native-update:compileReleaseNdk'.
    Unable do incremental execution: full task run
    deleteDir(C:\Users\86403\WebstormProjects\AwesomeProject\node_modules\react-native-update\android\build\intermediates\ndk\release\lib) returned: true
    deleteDir(C:\Users\86403\WebstormProjects\AwesomeProject\node_modules\react-native-update\android\build\intermediates\ndk\release\obj) returned: true
    Starting process 'command 'E:\android-ndk-r11b\ndk-build.cmd''. Working directory: C:\Users\86403\WebstormProjects\AwesomeProject\node_modules\react-native-update\android Command: E:\android-ndk-r11b\ndk-build.cmd NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\86403\WebstormProjects\AwesomeProject\node_modu
    les\react-native-update\android\build\intermediates\ndk\release\Android.mk APP_PLATFORM=android-23 NDK_OUT=C:\Users\86403\WebstormProjects\AwesomeProject\node_modules\react-native-update\android\build\intermediates\ndk\release\obj NDK_LIBS_OUT=C:\Users\86403\WebstormProjects\AwesomeProject\node_modules\react
    -native-update\android\build\intermediates\ndk\release\lib APP_ABI=armeabi-v7a,x86
    Successfully started process 'command 'E:\android-ndk-r11b\ndk-build.cmd''
    [armeabi-v7a] Compile thumb : rnupdate <= blocksort.c

    C:\Users\86403\WebstormProjects\AwesomeProject\node_modules\react-native-update\android\src\main\jni\blocksort.c:1089:1 : opening dependency file C:\Users\86403\WebstormProjects\AwesomeProject\node_modules\react-native-update\android\build\intermediates\ndk\release\obj/local/armeabi-v7a/objs/rnupdate/C_\User
    s\86403\WebstormProjects\AwesomeProject\node_modules\react-native-update\android\src\main\jni\blocksort.o.d: No such file or directory
    Unknown source file : compilation terminated.
    Unknown source file : make: *** [C:\Users\86403\WebstormProjects\AwesomeProject\node_modules\react-native-update\android\build\intermediates\ndk\release\obj/local/armeabi-v7a/objs/rnupdate/C_\Users\86403\WebstormProjects\AwesomeProject\node_modules\react-native-update\android\src\main\jni\blocksort.o] Error
    1

    :react-native-update:compileReleaseNdk FAILED
    :react-native-update:compileReleaseNdk (Thread[main,5,main]) completed. Took 1.348 secs.

    FAILURE: Build failed with an exception.



  • @linhaobin Hi,这个错误貌似是Windows下特定版本ndk的BUG,建议尝试:
    1、首先尝试删除掉 android/build android/app/build node_modules/react-native-update/android/build 三个文件夹再重试
    2、再尝试更换NDK版本到r10e再重试
    3、或者尝试使用mac或linux打包



  • @tdzl2003 尝试过1、2,还是不行...



  • 程序包com.facebook.react.cxxbridge不存在这个是什么原因程序包com.facebook.react.cxxbridge不存在



  • @wangpengzong 程序包com.facebook.react.cxxbridge 被rn替换成 com.facebook.react.bridge 了,手动修改 updateModule 引用的代码就好。


登录后回复