请选择 进入手机版 | 继续访问电脑版
  • 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

你好我正在使用离子科尔多瓦

原作者: [db:作者] 来自: 网络 收藏 邀请

我正在尝试用离子建立APK文件。我已经遵守了所有教程和一切正常,直到我试图用这个命令来生成APK:你好我正在使用离子科尔多瓦

$ ionic cordova build --release android 

,并告诉我这个错误 如何解决这一问题? 请帮助

$ ionic cordova build --release android 
    Running app-scripts build: --platform android --target cordova 
    [22:57:28] build dev started ... 
    [22:57:28] clean started ... 
    [22:57:28] clean finished in 9 ms 
    [22:57:28] copy started ... 
    [22:57:30] deeplinks started ... 
    [22:57:31] deeplinks finished in 416 ms 
    [22:57:31] transpile started ... 
    [22:57:38] transpile finished in 7.50 s 
    [22:57:38] preprocess started ... 
    [22:57:38] preprocess finished in less than 1 ms 
    [22:57:38] webpack started ... 
    [22:57:40] copy finished in 11.79 s 
    [22:57:57] webpack finished in 18.34 s 
    [22:57:57] sass started ... 
    [22:57:59] sass finished in 2.21 s 
    [22:57:59] postprocess started ... 
    [22:57:59] postprocess finished in 17 ms 
    [22:57:59] lint started ... 
    [22:57:59] build dev finished in 30.98 s 
    > cordova build android --release 

You have been opted out of telemetry. To change this, run: cordova telemetry on. 
Android Studio project detected 

(node:7784) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'variables' of undefined 
(node:7784) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. 

[22:58:05] tslint: ...der (8)/App Source Code/App Source Code/src/providers/shared-data/shared-data.ts, line: 71 
      Property 'push' is declared but never used. 

     L70: public events: Events, 
     L71: private push: Push, 
     L72: public platform: Platform, 

[22:58:05] tslint: ...der (8)/App Source Code/App Source Code/src/providers/shared-data/shared-data.ts, line: 8 
      'PushObject' is declared but never used. 

     L7: import { LoadingProvider } from '../loading/loading'; 
     L8: import { Push, PushObject, PushOptions } from '@ionic-native/push'; 
     L9: import { Device } from '@ionic-native/device'; 

[22:58:05] tslint: ...der (8)/App Source Code/App Source Code/src/providers/shared-data/shared-data.ts, line: 8 
      'PushOptions' is declared but never used. 

     L7: import { LoadingProvider } from '../loading/loading'; 
     L8: import { Push, PushObject, PushOptions } from '@ionic-native/push'; 
     L9: import { Device } from '@ionic-native/device'; 

[22:58:05] tslint: ...der (8)/App Source Code/App Source Code/src/providers/shared-data/shared-data.ts, line: 10 
      All imports are unused. 

     L9: import { Device } from '@ionic-native/device'; 
     L10: import { Facebook } from '@ionic-native/facebook'; 
     L11: import { FCM } from '@ionic-native/fcm'; 

[22:58:05] tslint: ...zm/Desktop/New folder (8)/App Source Code/App Source Code/src/pages/cart/cart.ts, line: 44 
      Property 'storage' is declared but never used. 

     L43: public toast: Toast, 
     L44: private storage: Storage, 
     L45: public events: Events, 

[22:58:05] tslint: ...op/New folder (8)/App Source Code/App Source Code/src/pages/products/products.ts, line: 8 
      All imports are unused. 

     L7: import { TranslateService } from '@ngx-translate/core'; 
     L8: import { share } from 'rxjs/operator/share'; 
     L9: import { CartPage } from '../cart/cart'; 

[22:58:05] lint finished in 6.59 s 

回答

0

构建应用程序比它的服务不同。这是更严格的原因,你的应用程序需要尊重你的目标平台的规范。 所以,你必须纠正你在日志中看到(如删除一些变量或进口你的错误,你不使用,例如:

`import { Device } from '@ionic-native/device';` 

编辑: 你有未使用的导入虽然它不是。一个错误,这是一个错误,所以当建立你的应用程序时,你不应该这样做 你也有一些未使用的私有变量所以请删除它们 只要阅读日志,你就会知道错误的位置&什么删除。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
下一篇:
如何将双纬和双经度设置为数组发布时间:2022-02-24
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap