So I can build the app with ionic run android and if I build it with ionic run android --prod it builds without errors and launches okay.
The problem is that when I click anywhere on the app the screen turns white. This does not occur when doing a normal build
Not sure what to recommend here but for what itās worth hereās what I would try:
Is your Android SDK (and any related dependencies) up to date? Update and double check.
Are there any plugins installed that, if you remove them, stop this from happening?
As a more extreme measure, have you removed the android platform and reinstalled to see if this might clear the problem?
I tried everythigng and it doesnt work.
Yeah my android SDKs are completely up to date (25).
Is it possible that the problem is that I am building for Android 23?
I am using ionic-app-scripts 0.0.47.
I think the problem must be with the ionic errors. the screen goes into white/transparent and if I keep on clicking after a while it turns normal again and at the next click it turns white again.
Is there a way to disable the error handling (or is that alraedy done with --prod?)?
Hello, just to say that I was able to fix this for me.
I just downgraded the typescript version to ā2.0.9ā (I was using 2.1) and the prod build worked as a breeze. The app loading time is even faster than with RC3.
[10:40:28] ionic-app-scripts 1.0.0
[10:40:28] build prod started ā¦
[10:40:29] clean started ā¦
[10:40:29] clean finished in 15 ms
[10:40:29] copy started ā¦
[10:40:29] ngc started ā¦
[10:40:34] build prod failed: Error encountered resolving symbol values statically. Function calls are not supported.
Consider replacing the function or lambda with a reference to an exported function (position 94:19 in the
original .ts file), resolving symbol AppModule in D:/AraIonicApp/src/app/app.module.ts
[10:40:34] ionic-app-script task: ābuildā
[10:40:34] Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider
replacing the function or lambda with a reference to an exported function (position 94:19 in the original
.ts file), resolving symbol AppModule in D:/AraIonicApp/src/app/app.module.ts
Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exporte
d function (position 94:19 in the original .ts file), resolving symbol AppModule in D:/AraIonicApp/src/app/app.module.ts
at positionalError (D:\AraIonicApp\node_modules@angular\compiler-cli\src\static_reflector.js:595:18)
at simplifyInContext (D:\AraIonicApp\node_modules@angular\compiler-cli\src\static_reflector.js:473:27)
at StaticReflector.simplify (D:\AraIonicApp\node_modules@angular\compiler-cli\src\static_reflector.js:478:22)
at StaticReflector.annotations (D:\AraIonicApp\node_modules@angular\compiler-cli\src\static_reflector.js:60:36)
at NgModuleResolver.resolve (D:\AraIonicApp\node_modules@angular\compiler\bundles\compiler.umd.js:14261:46)
at CompileMetadataResolver._loadNgModuleMetadata (D:\AraIonicApp\node_modules@angular\compiler\bundles\compiler.umd.js:14646:45)
at CompileMetadataResolver.getUnloadedNgModuleMetadata (D:\AraIonicApp\node_modules@angular\compiler\bundles\compiler.umd.js:14636:23)
at addNgModule (D:\AraIonicApp\node_modules@angular\compiler\bundles\compiler.umd.js:12944:43)
at D:\AraIonicApp\node_modules@angular\compiler\bundles\compiler.umd.js:12957:16
at Array.forEach (native)
npm ERR! Windows_NT 6.2.9200
npm ERR! argv āC:\Program Files\nodejs\node.exeā āC:\Users\om\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.jsā ārunā āionic:buildā āāā āāprodā
npm ERR! node v6.9.1
npm ERR! npm v3.10.7
npm ERR! code ELIFECYCLE
npm ERR! ionic-hello-world@ ionic:build: ionic-app-scripts build "--prod"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-hello-world@ ionic:build script āionic-app-scripts build āāprodāā.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts build āāprodā
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ionic-hello-world
npm ERR! Or if that isnāt available, you can get their info via:
npm ERR! npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\AraIonicApp\npm-debug.log
Iām still having the same problem. I have upgraded to ionic 2.2.0 but I still do --prod builds with app-scripts 0.0.46. Everything above results 0.0.46 results in the app not passing the start screen. I tried everything including adding my src to the Ionic 2 Conference app. Same results.
I am still facing same issue structure is like -
src
-aot
-app
-app.component.html
-app.component.ts
-app.module.ts
-app.routing.ts
-main.ts
-node_modules
-index1.html
-package.json
-systemjs.config.js
-tsconfig-aot.json
-tsconfig.json
D:\Application\Dev\src>ānode_modules/.bin/ngcā -p tsconfig-aot.json Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an
exported function (position 39:25 in the original .ts file), resolving symbol AppModule in D:/Application/Dev/src/app/app.module.ts
at positionalError (D:\Application\Dev\src\node_modules@angular\compiler\bundles\compiler.umd.js:25944:39)
at simplifyInContext (D:\Application\Dev\src\node_modules@angular\compiler\bundles\compiler.umd.js:25781:31)
at StaticReflector.simplify (D:\Application\Dev\src\node_modules@angular\compiler\bundles\compiler.umd.js:257
95:17)
at StaticReflector.annotations (D:\Application\Dev\src\node_modules@angular\compiler\bundles\compiler.umd.js:
25291:64)
at NgModuleResolver.resolve (D:\Application\Dev\src\node_modules@angular\compiler\bundles\compiler.umd.js:177
71:86)
at CompileMetadataResolver.getNgModuleMetadata (D:\Application\Dev\src\node_modules@angular\compiler\bundles
compiler.umd.js:18272:64)
at addNgModule (D:\Application\Dev\src\node_modules@angular\compiler\bundles\compiler.umd.js:25053:62)
at D:\Application\Dev\src\node
_modules@angular\compiler\bundles\compiler.umd.js:25064:18
at Array.forEach (native)
at _createNgModules (D:\Application\Dev\src\node_modules@angular\compiler\bundles\compiler.umd.js:25063:30)
Compilation failed