m0dch3n / vue-cli-plugin-cordova

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

Android app shows blank white screen #125

Closed midasdev711 closed 3 years ago

midasdev711 commented 3 years ago

Hi, I followed the doc and created a simple vue project.

vue create test vue add vue-cli-plugin-cordova yarn cordova-prepare yarn cordova-serve-android

It shows only blank screen.

For ios, I set https to false in vue.config.js and it works fine. But it doesn't work at all on android.

It shows white screen for a while and then below error.

The connection to the server was unsuccessful. (https://x.x.x.x:8080)

Do you have any idea about it?

tu6ge commented 2 years ago

Hi @midasdev711 ,I met the same problem as you, how did you solve it ?

m0dch3n commented 2 years ago

@tu6ge

This problem happens more often:

https://github.com/m0dch3n/vue-cli-plugin-cordova/issues?q=is%3Aissue+blank+

midasdev711 commented 2 years ago

<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *; img-src 'self' data: content:; connect-src 'self' ws:;">

Please try to add this line in the index.html.

tu6ge commented 2 years ago

@midasdev711 I revised it as you said , but the problem is still

tu6ge commented 2 years ago

I remove path node_modules , platforms, plugin in src-cordova, and I try it , my problem is solved ,surprised