- 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/
我需要一些说明。我可以直接写入 /dev/port 以直接访问并行端口并且它工作正常(我可以打开插入端口连接器的 LED)。但是,我想我可以用 /dev/mem 做同样的事情? (http://tld
按照目前的情况,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
我使用 Visual C++ 和 Win32 API 学习了 Windows 编程。如今,似乎大多数应用程序都是使用 C# 在 .NET 中开发的。我知道大多数时候 native 代码和托管代码之间没
请耐心等待。我正在制作一个 java 控制台,类似于此处找到的 DragonConsole https://code.google.com/p/dragonconsole/ 。一切都按计划进行,但我想
关闭。这个问题需要更多 focused .它目前不接受答案。 想要改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭5年前。 Improve this que
Django 的开发服务器表现得很奇怪。访问它的浏览器在加载时卡住,任何退出它的尝试都不起作用。当我点击 control c看似相当,但实际上仍在运行。让它退出的唯一方法是重新启动我的电脑,这很令人沮
我正在使用 Flash Develop,并且创建了一个 ActionScript 3.0 项目。它启动并读取一个 xml 文件,其中包含图像的 url。我已将 url 保留在与 swf 相同的文件夹中
是否可以根据其 website 上提供的规范开发 AUTOSAR BSW 堆栈(例如用于 CAN 通信)?不购买任何昂贵的供应商工具?可以遵循哪些步骤?我被要求探索这种可能性。 最佳答案 是和否。工具
有人知道如何用音频文件的内容覆盖 iPhone 麦克风吗? 想象一个场景,您正在通话,并且想要播放一些简短的音频让其他人听到。 因此,有必要将麦克风(硬件)置于保持状态,并使用委托(delegate)
我遇到了这个问题,我的应用程序出现 EXC_BAD_ACCESS 错误并卡住/停止。我使用模拟器的“向左旋转”和“向右旋转”选项来模拟方向变化行为。导致此错误的可能原因有哪些?由于我没有获得有关错误的
我有超过 1 台 Mac,我想在所有这些 Mac 上进行开发。我知道我需要在每台机器上同步我的手机,但这是我遇到的最小的问题。看起来我无法在手机上运行应用程序,除了在其中之一上开发的应用程序。 是否有
在手机上测试时,我的应用程序在特定点崩溃。控制台显示此消息 Tue Jan 27 15:47:14 unknown SpringBoard[22] : Application com.myprof.
我有一个案例,我从服务器获取信息。我的应用程序有一个选项卡栏和导航按钮。我希望应用程序显示进度指示器并禁用所有其他控件,以便用户在从服务器提取数据时无法跳转。我怎样才能实现这个目标? 我想到的一种方法
有时,当我尝试“构建”/编译下载的源代码时,我会收到以下警告: ld: warning: directory '/Volumes/Skiiing2/CD/ViewBased/Unknown Path/
我无法在 Apple 文档中找到关于开发和分发配置之间差异的明确解释。我目前正在使用开发配置在我的 iPhone 上进行开发和测试。我打算将该应用程序分发到我的 Beta 测试中,我想知道: 我需要使
我在使用 SharePoint 时遇到的最大挑战之一是它不能很好地适应典型的项目环境,其中至少包含开发和生产环境。我遇到的最多的问题是内容和列表是如此紧密地耦合在一起,以至于如果不在生产环境中执行内容
我失败了fist step让 Eclipse(对我来说是全新的)为 ARM 开发做好准备。 我在 Windows 10 中安装了 Eclipse。我想我应该安装 xpm,但我不知道在哪里输入此命令:
首先,我告诉你-我是编码新手 我正在使用vs代码来学习c++,它不会产生像dev c++或codeblocks这样的调试器。我看了一些视频,其中我们必须编辑json文件,这对于初学者来说非常复杂。有人
我失败了fist step让 Eclipse(对我来说是全新的)为 ARM 开发做好准备。 我在 Windows 10 中安装了 Eclipse。我想我应该安装 xpm,但我不知道在哪里输入此命令:
我开发了一个 Ionic 应用程序(iOS 和 Android 的混合)。我有 Xcode 8.3.3 并购买了一年的 Apple Developer Program 订阅。 我不想测试我的应用并将其
我是一名优秀的程序员,十分优秀!