简体   繁体   中英

error when emulate ionic 2 app on android studio

On my ionic 2 application, I would like to emaulte the application on android studio .

When I run this command on my terminal ionic emulate -l -s android I have this error:

Error: Cannot find module './version'

This is the output on my terminal:

watch failed: watcher error: 

/home/user/Workspace/ionic-app/home/user/Workspace/ionic-app/src/assets/**/*,/home/user/Workspace/ionic-app/src/index.html,/home/user/Workspace/ionic-app/src/manifest.json,/home/user/Workspace/ionic-app/src/service-worker.js,/home/user/Workspace/ionic-app/node_modules/ionicons/dist/fonts/**/*,/home/user/Workspace/ionic-app/node_modules/ionic-angular/fonts/**/*,/home/user/Workspace/ionic-app/node_modules/ionic-angular/polyfills/polyfills.js,/home/user/Workspace/ionic-app/node_modules/sw-toolbox/sw-toolbox.js:

Error: watch 
/home/user/Workspace/ionic-app/node_modules/ionicons/dist/fonts ENOSPC 
dev server running: http://192.168.0.149:8101/ 

Error: Cannot find module './version'

I don't understand where am I wrong. Why this error occured and what is this ./version module ?

I found the solution. During my project developpement, there was an update of android studio (sdk manager, sdk tools, gradle ... etc).

I have to delete the folder ionic-app/platforms/android , then re-build the application through android studio by importing the ionic application with gradle.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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