ionic 运行 android - 配置不是 运行 设备上的应用程序
ionic run android - configurations not running app on device
我正在尝试在我的 android 设备上构建和调试 ionic 2 app
。
以下是当我尝试 运行 命令 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 devices
命令时,我可以看到设备已连接。
List of devices attached
5b234380 device
以下是安装在Android SDK Manager
中的包的截图:
这也是我的 ionic
系统的 informations
:
#->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
软件包。
Update
当我尝试 运行 添加平台 android 时,它说已经存在:
#->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 天请帮忙。
我尝试使用 sudo
而不是 ionic run android
,如下所示:
sudo ionic run android
应用程序在设备中启动 运行。
注意:如果我们只执行命令,ionic 不会显示任何错误或警告:
ionic run android
我正在尝试在我的 android 设备上构建和调试 ionic 2 app
。
以下是当我尝试 运行 命令 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 devices
命令时,我可以看到设备已连接。
List of devices attached
5b234380 device
以下是安装在Android SDK Manager
中的包的截图:
这也是我的 ionic
系统的 informations
:
#->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
软件包。
Update
当我尝试 运行 添加平台 android 时,它说已经存在:
#->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 天请帮忙。
我尝试使用 sudo
而不是 ionic run android
,如下所示:
sudo ionic run android
应用程序在设备中启动 运行。
注意:如果我们只执行命令,ionic 不会显示任何错误或警告:
ionic run android