- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我正在尝试使用我的手机进行原生 react 。但我得到一个奇怪的错误,似乎无法解决它。有人可以帮忙吗?这是堆栈跟踪:
<everything fine above>
:app:validateSigningDebug
:app:packageDebug UP-TO-DATE
:app:assembleDebug UP-TO-DATE
:app:installDebug
Installing APK 'app-debug.apk' on 'Aqua 4G+ - 5.0' for app:debug
Unable to install C:\Users\Mehul\Desktop\app\android\app\build\outputs\apk\app-debug.apk
com.android.ddmlib.InstallException: Failed to install all
at com.android.ddmlib.SplitApkInstaller.install(SplitApkInstaller.java:89)
at com.android.ddmlib.Device.installPackages(Device.java:904)
at com.android.builder.testing.ConnectedDevice.installPackages(ConnectedDevice.java:137)
at com.android.build.gradle.internal.tasks.InstallVariantTas
<some more java errors>
02:58:27 E/427709463: Error while uploading app-debug.apk : Unknown failure ([CDS]close[0])
:app:installDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Failed to install all
我只包含了必要的堆栈,以便于阅读。
最佳答案
I had to type:
adb kill-server
Wait a moment then run:
adb devices
In my case output is like are as follows
**List of Devices Attached**
*0123456789ABCDEF device*
This will show you the DEVICE_ID (0123456789ABCDEF) of your device running android.
then you will have to run below command and make sure usb is enabled
react-native run-android --deviceId 0123456789ABCDEF
After that my output be like
**D:\React\albums>adb devices
List of devices attached
0123456789ABCDEF device
D:\React\albums>react-native run-android --deviceId 0123456789ABCDEF
Scanning 636 folders for symlinks in D:\React\albums\node_modules (21ms)
JS server already running.
Building the app...
Observed package id 'build-tools;23.0.1' in inconsistent location 'D:\Android\Sd
k\build-tools\build-tools-23.0.1' (Expected 'D:\Android\Sdk\build-tools\23.0.1')
Already observed package id 'build-tools;23.0.1' in 'D:\Android\Sdk\build-tools\
23.0.1'. Skipping duplicate at 'D:\Android\Sdk\build-tools\build-tools-23.0.1'
Observed package id 'extras;google;m2repository' in inconsistent location 'D:\An
droid\Sdk\extras\google\m2repository.backup' (Expected 'D:\Android\Sdk\extras\go
ogle\m2repository')
Already observed package id 'extras;google;m2repository' in 'D:\Android\Sdk\extr
as\google\m2repository'. Skipping duplicate at 'D:\Android\Sdk\extras\google\m2r
epository.backup'
Observed package id 'system-images;android-24;google_apis;x86' in inconsistent l
ocation 'D:\Android\Sdk\system-images\android-24\google_apis\x86.backup' (Expect
ed 'D:\Android\Sdk\system-images\android-24\google_apis\x86')
Already observed package id 'system-images;android-24;google_apis;x86' in 'D:\An
droid\Sdk\system-images\android-24\google_apis\x86'. Skipping duplicate at 'D:\A
ndroid\Sdk\system-images\android-24\google_apis\x86.backup'
Observed package id 'build-tools;23.0.1' in inconsistent location 'D:\Android\Sd
k\build-tools\build-tools-23.0.1' (Expected 'D:\Android\Sdk\build-tools\23.0.1')
Already observed package id 'build-tools;23.0.1' in 'D:\Android\Sdk\build-tools\
23.0.1'. Skipping duplicate at 'D:\Android\Sdk\build-tools\build-tools-23.0.1'
Observed package id 'extras;google;m2repository' in inconsistent location 'D:\An
droid\Sdk\extras\google\m2repository.backup' (Expected 'D:\Android\Sdk\extras\go
ogle\m2repository')
Already observed package id 'extras;google;m2repository' in 'D:\Android\Sdk\extr
as\google\m2repository'. Skipping duplicate at 'D:\Android\Sdk\extras\google\m2r
epository.backup'
Observed package id 'system-images;android-24;google_apis;x86' in inconsistent l
ocation 'D:\Android\Sdk\system-images\android-24\google_apis\x86.backup' (Expect
ed 'D:\Android\Sdk\system-images\android-24\google_apis\x86')
Already observed package id 'system-images;android-24;google_apis;x86' in 'D:\An
droid\Sdk\system-images\android-24\google_apis\x86'. Skipping duplicate at 'D:\A
ndroid\Sdk\system-images\android-24\google_apis\x86.backup'
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:app:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library UP-TO-DA
TE
:app:prepareComFacebookFrescoDrawee101Library UP-TO-DATE
:app:prepareComFacebookFrescoFbcore101Library UP-TO-DATE
:app:prepareComFacebookFrescoFresco101Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipeline101Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineBase101Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineOkhttp3101Library UP-TO-DATE
:app:prepareComFacebookReactReactNative0451Library UP-TO-DATE
:app:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE
:app:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:bundleDebugJsAndAssets SKIPPED
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:app:compileDebugJavaWithJavac UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources UP-TO-DATE
:app:transformClassesWithDexForDebug UP-TO-DATE
:app:mergeDebugJniLibFolders UP-TO-DATE
:app:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:app:validateSigningDebug
:app:packageDebug UP-TO-DATE
:app:assembleDebug UP-TO-DATE
:app:checkReleaseManifest
:app:prepareReleaseDependencies
:app:compileReleaseAidl UP-TO-DATE
:app:compileReleaseRenderscript UP-TO-DATE
:app:generateReleaseBuildConfig UP-TO-DATE
:app:mergeReleaseShaders UP-TO-DATE
:app:compileReleaseShaders UP-TO-DATE
:app:generateReleaseAssets UP-TO-DATE
:app:mergeReleaseAssets UP-TO-DATE
:app:generateReleaseResValues UP-TO-DATE
:app:generateReleaseResources UP-TO-DATE
:app:mergeReleaseResources UP-TO-DATE
:app:bundleReleaseJsAndAssets UP-TO-DATE
:app:processReleaseManifest UP-TO-DATE
:app:processReleaseResources UP-TO-DATE
:app:generateReleaseSources UP-TO-DATE
:app:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
:app:compileReleaseJavaWithJavac UP-TO-DATE
:app:compileReleaseNdk UP-TO-DATE
:app:compileReleaseSources UP-TO-DATE
:app:lintVitalRelease
:app:transformClassesWithDexForRelease UP-TO-DATE
:app:mergeReleaseJniLibFolders UP-TO-DATE
:app:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
:app:processReleaseJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:app:packageRelease UP-TO-DATE
:app:assembleRelease
:app:assemble
:app:incrementalDebugUnitTestJavaCompilationSafeguard UP-TO-DATE
:app:preDebugUnitTestBuild UP-TO-DATE
:app:prepareDebugUnitTestDependencies
:app:compileDebugUnitTestJavaWithJavac UP-TO-DATE
:app:processDebugUnitTestJavaRes UP-TO-DATE
:app:compileDebugUnitTestSources UP-TO-DATE
:app:mockableAndroidJar UP-TO-DATE
:app:assembleDebugUnitTest UP-TO-DATE
:app:testDebugUnitTest UP-TO-DATE
:app:incrementalReleaseUnitTestJavaCompilationSafeguard UP-TO-DATE
:app:preReleaseUnitTestBuild UP-TO-DATE
:app:prepareReleaseUnitTestDependencies
:app:compileReleaseUnitTestJavaWithJavac UP-TO-DATE
:app:processReleaseUnitTestJavaRes UP-TO-DATE
:app:compileReleaseUnitTestSources UP-TO-DATE
:app:assembleReleaseUnitTest UP-TO-DATE
:app:testReleaseUnitTest UP-TO-DATE
:app:test UP-TO-DATE
:app:check
:app:build
BUILD SUCCESSFUL
Total time: 16.717 secs
Running D:\Android\Sdk/platform-tools/adb -s 0123456789ABCDEF reverse tcp:8081 t
cp:8081
Installing the app on the device (cd android && adb -s 0123456789ABCDEF install
app/build/outputs/apk/app-debug.apk
app/build/outputs/apk/app-debug.apk: 1...ed. 3.2 MB/s (8067631 bytes in 2.442s)
pkg: /data/local/tmp/app-debug.apk
Failure [INSTALL_FAILED_ALREADY_EXISTS]
Starting the app on 0123456789ABCDEF (D:\Android\Sdk/platform-tools/adb -s 01234
56789ABCDEF shell am start -n com.albums/com.albums.MainActivity)...
Starting: Intent { cmp=com.albums/.MainActivity }
**
The important part was the --deviceId XYZ. Without this, the apk would never get uploaded to the phone.
**First Way**
*** If you are using Latest version of React then shake your real device and press reload (In my case react-native cli version is 2.0.1 And react-native version 0.45.1 ) Dont put any machine address and port in dev setting ok ***
**if first method does not works then follow second method**
**Second Way**
Then, the app launched with a red screen... i had to shake it, dev settings, adjust the "debug server host & port for device", putting my computer's IP address and port, like this:
192.168.0.15:8081
Lastly, i had to shake my phone again and select RELOAD...
关于android - 无法使用真实设备进行 react 开发,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43606793/
我正在寻找x86 Assembly中pow(real, real)的实现。我也想了解算法的工作原理。 最佳答案 只需将其计算为2^(y*log2(x))即可。 有一个x86指令FYL2X计算y *
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 关闭 11 年前。 Improve thi
风格指南的最后一点 http://www.python.org/dev/peps/pep-0008 读... 不要使用 == 将 bool 值与 True 或 False 进行比较。 为什么? 编辑只
我似乎无法完成这件事。我仍然在我的日志中看到 cloudflare IP。目前,我有一个负载均衡器,它位于 Cloudflare 后面。 目前,这是与 forwardfor 相关的块: opt
此代码行选择任何类名不是“id”和“quantity”的 div 内的所有子输入:: $("div.item > div:not(.id,.quantity) > :input").live("key
我在测试真实产品时遇到错误。当我单击购买按钮时,出现错误“此版本的应用程序未配置为市场计费”。 我用这个例子https://github.com/robotmedia/AndroidBillingLi
到目前为止我能找到的所有答案都建议调用 omp_set_num_threads。虽然在大多数情况下这是一个正确的答案,但它对我不起作用。在内部,调用 omp_set_num_threads 会导致创建
假设我有 3 个显示器。如何仅通过其索引获取第二个句柄? EnumDisplayMonitors() 不会工作,因为它也枚举了伪设备,而 EnumDisplayDevices() 没有给我句柄。 最佳
我一直在尝试制作一个简单的小游戏来测试我的逻辑,这是一个简单的迷宫,它很丑,而且到目前为止很糟糕。 引擎工作得很好,考虑到迷宫已经存在(矩阵),它甚至可以愉快,但我无意绘制一堆 map ,这可能是在
Cloudflare 代理包含一个名为 CF-Connecting-IP 的 header 和用户的真实 IP。我想让 traefik 读取这个 header 并用它的内容创建一个 X-Real-Ip
我想要上下文菜单中的不同菜单项,具体取决于我在 JTable 中单击的行 大多数示例并没有真正显示上下文菜单(应该根据上下文 - 所选行进行填充) 我尝试过这个: popupMenu = ne
我有一个对象 callInst。如何获取函数的真实名称而不是 IR 代码中的名称?如果我在我的通行证中运行此代码(Useless 在另一个问题中发布) StringRef get_function_n
我在 Appium 和 iPad 2 上使用了以下所需的功能 DesiredCapabilities capabilities = new DesiredCapabilities(); capabil
根据documentation 我们可以通过以下方式在模拟器上运行我们的 android 项目: cordova 运行 android 或 cordova emulate android 但是如何在真
在 ASP.NET 中,有没有办法获得真正的原始 URL? 例如,如果用户浏览到“http://example.com/mypage.aspx/%2F”,我希望能够获得“http://example.
我的 NSInputStream 遇到问题。这是我的代码: case NSStreamEventHasBytesAvailable: printf("BYTE AVAILABLE\n"
$(selector).click() 结果没有任何反应。 this answer在浏览器控制台中工作,javascript 上下文设置为 iframe,但不是主页: simulateMouseCli
我在我的 AB Micro820 PLC 中设置了 modbus 映射。我在 40001 中有一个数组用于写入,在 42001 中有一个数组用于读取。两者都是 200 个元素和 REAL 类型(32
我正在寻找有关设计契约(Contract)管理数据模型的建议。因此,合约的一般生命周期是: 契约(Contract)已创建并处于“草稿”状态。它可以在内部查看,并且可以进行更改。 契约(Contrac
我正在尝试让我的 WebView fullscreen 达到标准,我知道如何将它拉伸(stretch)到“全屏”,但我想做的是当您长按 WebView 并选择全屏选项时,创建全屏。有谁知道该怎么做?
我是一名优秀的程序员,十分优秀!