【发布时间】:2016-10-14 12:35:34
【问题描述】:
我对移动编程完全陌生,本周我在运行 Ubuntu 14.04 LTS 的虚拟机中安装了 React-Native 和 Android Studio。接下来,我使用 Android Studio 创建了“Hello World”应用程序,在我的 Android 5 手机上启用了 USB 调试,它运行正常。最后,我从 React-native ("AwesomeApp") 开始,但我得到了这个错误:
...
:app:installDebug
Installing APK 'app-debug.apk' on 'Aquaris E5 HD - 5.0'
01:06:03 E/1659110437: Error while uploading app-debug.apk : Unknown failure
Unable to install /home/osboxes/React/AwesomeProject/android/app/build/outputs/apk/app-debug.apk
com.android.ddmlib.InstallException: Unable to upload some APKs
at com.android.ddmlib.Device.installPackages(Device.java:920)
at com.android.builder.testing.ConnectedDevice.installPackages(ConnectedDevice.java:113)
[...]
* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Unable to upload some APKs
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 39.701 secs
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:
我在不同的网站上搜索过,但无法解决。
安装的平台:Android 23、24 安装的构建工具:23.0.1、23.0.3、24.0.3
【问题讨论】:
-
只是为了测试的原因,你可以试试吗? facebook.github.io/react-native/docs/signed-apk-android.html 然后如果有效,您可以返回您的案例。至少生成一个新的 apk 应该适合你。
标签: android android-studio react-native