简体   繁体   English

如何使用离子框架旧版本构建android应用?

[英]How can build android app using ionic framwork old version?

One year before i install ionic framework and build one android app, that app is running sucessfully still now. 在我安装ionic框架并构建一个android应用程序的前一年,该应用程序现在仍然可以成功运行。 But now i want some more enhancement for this app, so i am install ionic framework in another system and run the ionic cordova build android command in that project directory, but it will throw below error. 但是现在我想要对该应用程序进行更多增强,因此我将ionic框架安装在另一个系统中,并在该项目目录中运行ionic cordova build android命令,但是它将抛出错误。

[WARN] ionic.project file found in C:\\xampp\\htdocs\\officeapp--please rename it to ionic.config.json, or your project directory will not be detected! 在C:\\ xampp \\ htdocs \\ officeapp中找到[WARN] ionic.project文件-请重命名为ionic.config.json,否则将不会检测到您的项目目录!

[ERROR] Unable to find command: cordova build android You may need to be in an Ionic project directory. [错误]无法找到命令:cordova build android您可能需要在Ionic项目目录中。

Project Commands: You are not in a project directory. 项目命令:您不在项目目录中。

In that project directory there is no ionic.config.json. 在该项目目录中没有ionic.config.json。 So i am install new project and compare the files in the new project i found ionic.config.json. 因此,我正在安装新项目,并在发现ionic.config.json的新项目中比较文件。 And i compare bower.json files there is some version change, so i thing the version is the problem. 我比较bower.json文件有一些版本更改,所以我觉得版本是问题。

Old project bower.json 旧项目bower.json

{
 "name": "HelloIonic",
 "private": "true",
 "devDependencies": {
  "ionic": "driftyco/ionic-bower#1.3.1",
  "platform.js": "platform#^1.3.1"
 },
 "dependencies": {
  "angular-messages": "1.3.6"
 }
}

Newly created todo project 新创建的待办项目

{
 "name": "HelloIonic",
 "private": "true",
 "devDependencies": {
  "ionic": "driftyco/ionic-bower#1.3.3"
 }
}

Please help anyone how can build app with old code, because all are working fine i want minmal change for this app. 请帮助任何人如何用旧代码构建应用程序,因为一切正常,我希望对此应用程序进行最小的更改。

As per your question explanation I see you are entering wrong command to build ionic project for the android platform. 根据您的问题解释,我看到您输入错误的命令来为android平台构建ionic项目。

[ERROR] Unable to find command: cordova build android You may need to be in an Ionic project directory. [错误]无法找到命令:cordova build android您可能需要在Ionic项目目录中。

Use following commands to build ionic project, 使用以下命令来构建离子项目,

ionic build android

For more help please check here for basic of Ionic. 如需更多帮助,请在此处查看Ionic的基础知识。

Hopes this will help you !! 希望这对您有帮助!

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

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