我正在构建" cutePuppyPics" Ionic 2中的演示应用程序。它可以在Web浏览器和iOS模拟器中运行。但是,当我为Android构建时,该应用程序不会出现,并且没有错误消息。以下是我在终端窗口中看到的内容:
$ ionic run android
• You're trying to build for android, but don't have the platform installed yet.
∆ Installing android for you.
√ Installed platform 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
√ Compiling files complete.
Hash: 855722ed018197485183
Version: webpack 1.12.10
Time: 7550ms
Asset Size Chunks Chunk Names
app.bundle.js 2.67 MB 0 [emitted] main
[0] multi main 64 bytes {0} [built]
+ 361 hidden modules
√ Webpack complete
√ Fonts copied to www/build/fonts
Running command: /Users/susancrayne/cutePuppyPics/hooks/after_prepare/010_add_platform_class.js /Users/susancrayne/cutePuppyPics
add to body class: platform-android
ANDROID_HOME=/Users/susancrayne/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home
No target specified, deploying to emulator
No emulator specified, defaulting to Nexus_5_API_23_for_BernieAppAndroid
Waiting for emulator...
HAXM is working and emulator runs in fast virt mode
emulator: UpdateChecker: skipped version check
答案 0 :(得分:1)
事实证明,ANDROID_HOME环境变量不正确。