m0dch3n / vue-cli-plugin-cordova

Vue Cli 3 Cordova Plugin
MIT License
417 stars 63 forks source link

Android application not running #46

Closed ksankumar closed 5 years ago

ksankumar commented 5 years ago

When i deploy application, application installed successfully. But not running. I followed below way vue cli version: 3.2

vue create test
cd test
vue add vuetify
vue add cordova
npm run cordova-serve-android

This is my repo for your reference https://github.com/ksankumar/cordova-test

https://github.com/ksankumar/cordova-test/blob/master/Screenshot_20190102-083353_TestApp%5B1%5D.jpg

m0dch3n commented 5 years ago

is the ip correct? is this the ip of your dev desktop ? is the phone in the same network then your desktop ? can you open the address in the browser on the phone ? can you open the page on your desktop ? is the dev server running ?

ksankumar commented 5 years ago

Thanks @m0dch3n . Before that i need to know why we getting this issue with IP. ? How do we solve this IP based base URL settings?

m0dch3n commented 5 years ago

your screenshot shows an url, your cordova app, is trying to open this url...

Please read also this and the links etc, if your dev server ip is incorrect...

https://github.com/m0dch3n/vue-cli-plugin-cordova/issues/43

Nevertheless, I think, this is a problem NOT related to the plugin, but to your environment, so I'll close the issue... You can still post here, but I can't guarantee, to answer, because I can't support these kind of problems

ksankumar commented 5 years ago

Even if i give correct IP app works good when i was in same wifi. If i turned to some other wifi or data network, again i m getting same kind of IP related issue. So is there any solution for avoiding to get IP related error?

m0dch3n commented 5 years ago

to be short:

dev server, and phone need to be in same network, without having connection issues to each others... If the plugin isn't detecting the correct ip of your devserver, because it has multiples, try to change the order of priority like mentioned in the other issue or start the dev server by passing the parameter...

m0dch3n commented 5 years ago

for build, you don't need a connection to devserver... all the files are served locally from the phones filesystem

ksankumar commented 5 years ago

Got it. So for, instead of deploy directly to device, i should build app ''cordova-build-android" and install manually. then only i won't get any IP based errors. I'm i right?

m0dch3n commented 5 years ago

all these things are well documented in the cordova documentation

I'll stop my support now here, sorry, but seems, you don't have a lot of cordova experience, so maybe it's better, you start with how cordova works...

In short, my plugin is only building the app, and running some cordova commands (cordova run android, cordova build android, ...) to avoid you, doing this manually all the time...

m0dch3n commented 5 years ago

It's not doing much more, so if things don't work, it's usually cordova related

m0dch3n commented 5 years ago

And unfortunately, I don't have enough time, to support cordova problems too, but there is a great community behind cordova, where you will find a lot of information...