问题

作者: 056cc6443751 | 来源:发表于2018-12-18 15:13 被阅读0次

    装android sdk的时候把以前的sdk目录删除了,造成以下错误

    需要点击

    然后就会自动去下好了。

    另外在运行 react-native run-android的时候弹出Unable to load script from assets index.android.bundle的错误,搜了下SO找到了解决方法

    1.(in project directory) mkdir android/app/src/main/assets

    2.react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

    3.react-native run-android

    https://stackoverflow.com/questions/44446523/unable-to-load-script-from-assets-index-android-bundle-on-windows

    Could not find property 'MYAPP_RELEASE_STORE_PASSWORD' on SigningConfig_Decorated

    MYAPP_RELEASE_STORE_FILE=KEYSTORE_NAME.keystore

    MYAPP_RELEASE_KEY_ALIAS=YOUR_ALIAS

    MYAPP_RELEASE_STORE_PASSWORD=123456

    MYAPP_RELEASE_KEY_PASSWORD=123456

    Cannot read property 'State' of undefined

    查了下是GestureHandler.js 调用的RNGestureHandlerModule.State这行报错误,google的结果是把react-native-gesture-handler移除再安装

    npm install --save react-native-gesture-handler

    react-native link react-native-gesture-handler

    https://stackoverflow.com/questions/53391855/undefined-is-not-an-object-after-updating-react-navigation-to-v3

    在启动两个模拟器的时候,直接调用react-native run-android --deviceId=emualte-xxx,会报错,找不到mainActivity,把另外一个关掉可以了

    对着https://reactnative.cn/docs/0.43/signed-apk-android.html 导出android的时候报这个错error duplicate resources,参考

    https://stackoverflow.com/questions/52632950/react-native-0-57-1-android-duplicate-resources解决

    连手机报这个错误

    https://stackoverflow.com/questions/44446523/unable-to-load-script-from-assets-index-android-bundle-on-windows

    如下解决

    (in project directory) mkdir android/app/src/main/assets

    react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

    react-native run-android

    使用react-native-video后,build.gradle中 minSdkVersion = 26

    然后cd android,gradlew clean

    react-native-vector-icons 在安卓上不显示

    Edit android/app/build.gradle ( NOT android/build.gradle ) and add the following:

    apply from:"../../node_modules/react-native-vector-icons/fonts.gradle"

    couldn't find DSO to load: libreactnativejni.so 

    在用这个的时候发生了以下错误,couldn't find DSO to load: libreactnativejni.so,照帖子的方式在app/build.gradle中添加

    https://stackoverflow.com/questions/43368926/android-reactnative-java-lang-unsatisfiedlinkerrorcould-find-dso-to-load-libre

    未解决

    在android机usb连接的时候

    Could not run adb reverse: Command failed: C:\Users\Administrator\AppData\Local\Android\Sdk/platform-tools/adb -s cba0167a reverse tcp:8081 tcp:8081

    这个用了很久的时间搜索也没解决

    开了个模拟器可以,现在模拟器上测试

    今天搜到了adb reverse得安卓5.0以上,或者手机和电脑在一个wifi下用wifi

    https://stackoverflow.com/questions/31525431/getting-error-closed-twice-on-adb-reverse/41013327#41013327

    ScrollableTabView

    点击标题无法点击,内容也不显示的时候,检查下它的parent的flex有没有被设置成1

    查看崩溃信息

    adb logcat AndroidRuntime:E *:S

    清除

    gradlew clean

    导出apk

    https://facebook.github.io/react-native/docs/signed-apk-android.html

    $ cd android

    $ ./gradlew assembleRelease

    adb install $file; 

    注意下如果出来的是unsigned,那么看下有没有遗漏修改 buildTypes {

            release {

                ...

                signingConfig signingConfigs.release

            }

        }

    C:\Python27\python.exe systrace.py --time=10 -o trace.html sched gfx view -a com.doubanmovie

    相关文章

      网友评论

          本文标题:问题

          本文链接:https://www.haomeiwen.com/subject/asothqtx.html