ionic-cli: ionic cordova build android --release --prod,this command to build app have a lots bug
From @zengyufang on November 9, 2017 5:59
Ionic version: (check one with “x”) (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1) [ ] 2.x [ ] 3.x
I’m submitting a … (check one with “x”) [ ] bug report [ ] feature request
Please do not submit support requests or “How to” questions here. Instead, please use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
Expected behavior:
Steps to reproduce:
Related code:
insert short code snippets here
Other information:
I can’t get the device information with the app I packaged with the release command,but debugger command is geted the device information,I don’t know Why is that???and other bug of slides on android app used release command
Ionic info: (run ionic info
from a terminal/cmd prompt and paste output below):
insert the output from ionic info here
Copied from original issue: ionic-team/ionic#13372
About this issue
- Original URL
- State: open
- Created 7 years ago
- Reactions: 2
- Comments: 24 (11 by maintainers)
remove import ‘rxjs/Rx’; and add specific import
my solution was to remove the import and add the specific import from:
import { BehaviorSubject } from 'rxjs/Rx';
to:
did you try the solution above?
On my side, I had to modify the import of Rxjs (commented line with import ‘rxjs/Rx’;, and added specific import resolved my issue) Avoid import 'rxjs/Rx’
See –build-optimizer errors “Cannot read property ‘type’ of undefined”
and it avoids loading all Rxjs
it is not possible to use typescript 2.6.1 with angular5.0. Or did I miss something?
WARN @angular/compiler-cli@5.0.0 requires a peer of typescript@>=2.4.2 <2.5
upgrade typescript to 2.6.1 fix the bug for me the bug is about rxjs with typescript , but the release log suggest us to use typescript@2.4.2
From @Sampath-Lokuge on November 9, 2017 7:13
Why can’t you test this in debug mode first on your device?
ionic cordova run android --prod --device
From @zengyufang on November 9, 2017 7:0
I’m sorry ,I didn’t express myself clearly before.I used “ionic doctor check” to check errors.but before I’m used “ionic cordova build android --release --prod” build app can’t get the device info, used"ionic cordova build android --release" build app can get the device info
From @Sampath-Lokuge on November 9, 2017 6:48
If you use
ionic doctor check
then it’ll show any errors in your app. Run it and see that. ThisCLI
is not for releasing the app. Just for checking errors and etc.From @Sampath-Lokuge on November 9, 2017 6:29
You can run
ionic doctor check
and see the latest updates which you need to do and errors on your project.