React Native for Android 学习笔记

 

 

C:\Users\Vic Lee\AwesomeProject>react-native run-android
Starting JS server...
Running D:\Android\sdk/platform-tools/adb reverse tcp:8081 tcp:8081
error: closed
Could not run adb reverse: Command failed: D:\Android\sdk/platform-tools/adb rev
erse tcp:8081 tcp:8081
Building and installing the app on the device (cd android && gradlew.bat install
Debug...
Download https://jcenter.bintray.com/org/webkit/android-jsc/r174650/android-jsc-
r174650.aar
Download https://jcenter.bintray.com/com/squareup/okio/okio/1.9.0/okio-1.9.0.jar

Download https://jcenter.bintray.com/com/squareup/okhttp3/okhttp/3.4.1/okhttp-3.
4.1.jar
Download https://jcenter.bintray.com/com/squareup/okhttp3/okhttp-urlconnection/3
.4.1/okhttp-urlconnection-3.4.1.jar
Download https://jcenter.bintray.com/com/facebook/fresco/fbcore/0.11.0/fbcore-0.
11.0.aar
Download https://jcenter.bintray.com/com/parse/bolts/bolts-tasks/1.4.0/bolts-tas
ks-1.4.0.jar
Download https://jcenter.bintray.com/com/nineoldandroids/library/2.4.0/library-2
.4.0.jar
Download https://jcenter.bintray.com/com/facebook/fresco/imagepipeline-base/0.11
.0/imagepipeline-base-0.11.0.aar
Download https://jcenter.bintray.com/com/facebook/fresco/imagepipeline/0.11.0/im
agepipeline-0.11.0.aar
Download https://jcenter.bintray.com/com/facebook/fresco/imagepipeline-okhttp3/0
.11.0/imagepipeline-okhttp3-0.11.0.aar
Download https://jcenter.bintray.com/com/fasterxml/jackson/core/jackson-core/2.2
.3/jackson-core-2.2.3.jar
Download https://jcenter.bintray.com/com/squareup/okhttp3/okhttp-ws/3.4.1/okhttp
-ws-3.4.1.jar
Download https://jcenter.bintray.com/com/facebook/fresco/drawee/0.11.0/drawee-0.
11.0.aar
Download https://jcenter.bintray.com/com/facebook/fresco/fresco/0.11.0/fresco-0.
11.0.aar
Download https://jcenter.bintray.com/com/facebook/soloader/soloader/0.1.0/soload
er-0.1.0.aar
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library
:app:prepareComAndroidSupportRecyclerviewV72301Library
:app:prepareComAndroidSupportSupportV42321Library
:app:prepareComFacebookFrescoDrawee0110Library
:app:prepareComFacebookFrescoFbcore0110Library
:app:prepareComFacebookFrescoFresco0110Library
:app:prepareComFacebookFrescoImagepipeline0110Library
:app:prepareComFacebookFrescoImagepipelineBase0110Library
:app:prepareComFacebookFrescoImagepipelineOkhttp30110Library
:app:prepareComFacebookReactReactNative0320Library
:app:prepareComFacebookSoloaderSoloader010Library
:app:prepareOrgWebkitAndroidJscR174650Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets
:app:generateDebugResValues
:app:generateDebugResources
:app:mergeDebugResources
:app:bundleDebugJsAndAssets SKIPPED
:app:processDebugManifest
:app:processDebugResources
:app:generateDebugSources
:app:processDebugJavaRes UP-TO-DATE
:app:compileDebugJavaWithJavac
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources
:app:preDexDebug
:app:dexDebug
:app:validateDebugSigning
:app:packageDebug
:app:zipalignDebug
:app:assembleDebug
:app:installDebug
Installing APK 'app-debug.apk' on 'MI 2 - 4.1.1'
Installed on 1 device.

BUILD SUCCESSFUL

Total time: 1 mins 56.539 secs
Starting the app on 343bf6ab (D:\Android\sdk/platform-tools/adb -s 343bf6ab shel
l am start -n com.awesomeproject/.MainActivity)...
Starting: Intent { cmp=com.awesomeproject/.MainActivity }

效果:

本机为小米2s:系统为4.11

 

果然,系统默认禁用掉了 APP 的 显示悬浮窗 的权限。因为那个菜单是实用悬浮窗来显示的,所以一直看不到。开启这个权限,然后就可以正常唤起菜单了。然后菜单中选择Dev Settings->Debug server host for device,填入你开发电脑的 IP 地址。如果手机和电脑不在同一个网段,或者手机不能访问到,就会出现如下页面:

=============

也没用啊 !

 

posted @ 2016-08-29 19:41  每天进步一点点!  阅读(4196)  评论(0编辑  收藏  举报