Giter VIP home page Giter VIP logo

react-native's Introduction

react-native

react-native开发遇到的一些问题

1.初始化react-native项目 build失败 最新0.45版本 build failed 切换到0.44版本 build success 但是报错 ——Dev——is not define 删除目录内的隐藏文件 .babelrc 删除后可以正常build

2.mac上配置好环境后 rect-native run-android失败 报错: 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/android-setup.html 解决办法: //1.在app的根目录下运行 chmod 755 android/gradlew //2.然后再运行就正常了 react-native run-android

Mac安装android studio后卡在building gradle project info的解决方法。
1.找到.gradle目录,一般在/User/<用户名>/下;需要执行defaults write com.apple.finder AppleShowAllFiles Yes && killall Finder命令显示隐藏的文件即可看到.gradle文件夹
2.进入.gradle/wrapper/dists/gradle-3.3-all/55gk2rcmfc6p2dg9u9ohc3hw9文件夹下,删除.part文件
3.去gradle网站下载对应的cradle-3.3-all.zi文件,下载完成后不解压放入55gk2rcmfc6p2dg9u9ohc3hw9文件夹下
4.重新打开android studio问题已经解决Mac安装android studio后卡在building gradle project info的解决方法

3.ios fetch API报错,Type Error: Network request failed 在 info.plist file 加入 'NSAllowsArbitraryLoads ' 像这样

'<key>NSAppTransportSecurity</key>
<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
    <key>NSExceptionDomains</key>
    <dict>
        <key>localhost</key>
        <dict>
            <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
            <true/>
        </dict>
    </dict>
</dict>'


http://bbs.reactnative.cn/uploads/files/1473409969387-bd986712-10a5-4a38-9deb-f5b45d7fd16d.png
添加这一栏,默认是NO, 改成YES即可

react-native's People

Contributors

mrlanse avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.