美文网首页
报错解决方案

报错解决方案

作者: __笑我一世沉沦丶 | 来源:发表于2019-07-24 14:45 被阅读0次

    1、无法远程调试,链接不上远程调试服务器

    报错:unable to connect with remote debugger

    解决方案:

    • Press Cmd + M on emulator screen
    • Go to Dev settings > Debug server host & port for device
    • Set localhost:8081
    • Rerun the android app: react-native run-android

    将调试器改为localhost:8081,重启服务即可。

    2、Could not read path 'C:\MyApp\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-az-rAZ'

    Have you tried to run:
    
    cd android && gradlew clean
    cd .. && react-native run-android
    This can solve some problems on Android :)
    
    Or if this doesn't work, you can try to remove the android/app/build folder altogether.
    

    3、SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at 'F:\react\AwesomeProject\android\local.properties'

    解决方案:在android文件夹下面新建 local.properties 文件,在文件中输入以下路径:

    For windows users:
    sdk.dir=C\:\\Users\\UserName\\AppData\\Local\\Android\\sdk
    For Mac users:
    sdk.dir = /Users/USERNAME/Library/Android/sdk
    For Linux (Ubuntu) users:
    sdk.dir = /home/USERNAME/Android/Sdk
    Where USERNAME is your linux username(Linux paths are case-sensitive: make sure the case of S in Sdk matches)
    
    In case if this doesn't work, add ANDROID_HOME variable in "Environment Variables" as C:\Users\USER\AppData\Local\Android\Sdk
    

    相关文章

      网友评论

          本文标题:报错解决方案

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