离子运行android - 配置没有在设备上运行应用程序 [英] ionic run android - configurations not running app on device
问题描述
我正在尝试在我的Android设备上构建和调试 ion 2 app
。
以下是当尝试运行命令时控制台输出的详细信息 ion run android
I am trying to build and debug ionic 2 app
on my android devices.
Following are the details of console out put when am trying to run command ionic run android
#->ionic run android
∆ Compiling Sass to CSS
√ Matching patterns: app/theme/app.+(ios|md).scss
∆ Copying fonts
√ Matching patterns: node_modules/ionic-framework/fonts/**/*.+(ttf|woff|woff2)
∆ Copying HTML
√ Matching patterns: app/**/*.html
∆ Compiling and bundling with Webpack...
√ Using your webpack.config.js file
√ Sass compilation complete
√ HTML copied to www/build
√ Fonts copied to www/build/fonts
√ Compiling files complete.
Hash: 3239d7653edd2f88c126
Version: webpack 1.12.10
Time: 6745ms
Asset Size Chunks Chunk Names
app.bundle.js 2.68 MB 0 [emitted] main
[0] multi main 64 bytes {0} [built]
+ 362 hidden modules
√ Webpack complete
#->
我的应用程序 Androidmanifest.xml
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="22" />
当我运行以下 adb设备
命令我可以看到设备已连接。
And when I am running following adb devices
command I can see device is attached.
List of devices attached
5b234380 device
以下是安装在 Android SDK Manager
:
这也是信息
我的离子
系统:
#->ionic info
Your system information:
Cordova CLI: 4.3.1
Ionic Version: 2.0.0-beta.1
Ionic CLI Version: 2.0.0-beta.17
Ionic App Lib Version: 2.0.0-beta.8
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Mac OS X El Capitan
Node Version: v5.3.0
Xcode version: Not installed
******************************************************
Dependency warning - for the CLI to run correctly,
it is highly suggested to install/upgrade the following:
Install ios-sim to deploy iOS applications. `npm install -g ios-sim` (may require sudo)
Install ios-deploy to deploy iOS applications to devices. `npm install -g ios-deploy` (may require sudo)
******************************************************
我现在只想在Android设备上运行,所以 ios-sim
和 ios-deploy
软件包未安装。
I just want to run on android device right now, so ios-sim
and ios-deploy
packages are not installed.
更新
当我尝试运行添加平台android,它说已经存在:
Update
When I try to run to add platform android, it saying already exist:
#->ionic platform add android
Running command: /Users/Piccaza/ionic-projects/fobs-v0.9.9/hooks/before_platform_add/init_directories.js /Users/Piccaza/ionic-projects/fobs-v0.9.9
Platform android already added.
这里可能是什么问题,所以我无法在设备上运行应用程序?我有点呆了2天,请帮忙。
what might be the issue here, so that I am not able to run the app on device? I am kind of stuck for 2 days please help out.
推荐答案
而不是只需 / code>我尝试使用
sudo
,如下所示:
Instead of just ionic run android
I tried with sudo
, as follows:
sudo离子运行android
sudo ionic run android
应用程序开始运行在设备中。
And app started running in device.
注意:如果我们只是执行命令,ion不会显示任何错误或者起作用:
ion run android
NOTE: ionic wont show any error or waring if we just execute the command:
ionic run android
这篇关于离子运行android - 配置没有在设备上运行应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!