简体   繁体   English

无法使用Ionic构建应用

[英]Can't build app with Ionic

I am no longer able to build my app and generate an apk anymore because an error shows up. 由于出现错误,我不再能够构建我的应用并生成apk。 Here is what happens when I try to build the app in the command prompt: Command Prompt 当我尝试在命令提示符下构建应用程序时,将发生以下情况: 命令提示符

Can somebody please help me with this? 有人可以帮我吗? Oh and this is what happens if I type ionic info in the command prompt: 哦,这是如果我在命令提示符下键入ionic info会发生的情况:

Your environment has been set up for using Node.js 0.12.4 (x64) and npm.

C:\Users\Singh>ionic info

Your system information:

Cordova CLI: 5.1.1
Ionic CLI Version: 1.6.1
Ionic App Lib Version: 0.3.3
OS: Windows 7 SP1
Node Version: v0.12.4



C:\Users\Singh>

Try to remove the platform, and then add it again, and then build your application. 尝试删除该平台,然后再次添加它,然后构建您的应用程序。

So, if you have android as targeted platform execute these commands: 因此,如果您将android作为目标平台,请执行以下命令:

ionic platform remove android
ionic platform add android
ionic build android

My son had a very similar problem, and we never did figure out what caused it. 我儿子有一个非常相似的问题,我们从未弄清楚是什么原因造成的。 He ended up creating a brand new blank ionic project, and then just copying the www folder from the old project. 他最终创建了一个全新的空白离子项目,然后仅从旧项目中复制了www文件夹。 It worked, and he was able to get things building again. 它奏效了,他得以重新建立工作。 If you try it, you'll also have to re-add your plugins, copy package.json and bower.json, and then rerun bower install and npm install . 如果尝试使用,还必须重新添加插件,复制package.json和bower.json,然后重新运行bower installnpm install It's not pleasant, but it might be worth a shot if you're desperate. 这并不令人愉快,但如果您不顾一切,可能值得一试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM