Closed riksnelders closed 6 years ago
I didn't test on windows, so your problem was solved by running the command as administrator on windows, because otherwise the folder is not created?
No, only the folder creation. Still getting the error that android is not installed as a platform
If you have choosen "src-cordova" as path, you get this error, when src-cordova/platforms/android i.e doesn't exist...
Nevertheless, can you please copy paste me your console, when you do "vue add cordova" so I can see, if there is any special error message...
Ran vue add cordova in root project folder. Next to that, folder is created, but the platforms i selected are not added. thats the culprit.
currently I don't have windows, so I can't try by myself...
Nevertheless, please try the following steps:
cordova create src-cordova com.vue.example.app VueExampleAppName
cordova platform add android
Paste me the outputs here
Then
npm run cordova-serve-android
Should work...
Think i found the problem. If i run bash in my terminal, administrator rights are gone it seems. Ran it normally then platforms get added
Try in your bash, the cordova commands, maybe they need administrator rights...
Yes this does work!
Its the creating.. I ran as admin, with and without bash. Not all the files are being created. cuz platforms is empty now. but theres a platform folder.
Yes this does work!
Its the creating.. I ran as admin, with and without bash. Not all the files are being created. cuz platforms is empty now. but theres a platform folder.
ok, can you please try manually the steps above, and paste the outputs...
Interesting, it seems the administrator right problems, do not exist, if you run the commands manually...
As I said, I currently can't try on windows by myself, but maybe, you can the solve the problem, just:
This will invoke generator.js which itselfs executes the cordova commands...
To have more outout about the command, take a look in index.js
{
cwd: srcCordovaPath,
env: process.env,
stdio: 'inherit', // pipe to console
encoding: 'utf-8'
})
I was running cordova 7.x.x That might cause it? I just updated. ill check back later
also notices when changing the baseDir of the projct in windows. this goes to c:/ if "/"
So far, the serve-android is not working.. the build version is working
I replaced node's spawn with cross-spawn https://www.npmjs.com/package/cross-spawn
This should solve the admin and folder creation issues...
Can you please retry with 2.0.6 ?
Ill give it a go tomorrow. Thanks! 👌
Ok, on the win 10, where I tested, everything worked fine, in the CMD console... However, I didn't try Bash under Windows
Hey. I just checked the serve-android. Its routing to the https:// version. So i need to be on local network with my device. and its not showing the actually APP If run from terminal it goes straight to app.
Havent got time to check the full install. but Im guessing, since the serve actually runs it works: )
Hey. I just checked the serve-android. Its routing to the https:// version. So i need to be on local network with my device. and its not showing the actually APP If run from terminal it goes straight to app.
Havent got time to check the full install. but Im guessing, since the serve actually runs it works: )
very strange, on my machine it didn't use https and the serve command command should also ignore https, if you have this setting somewhere in your vue.config.js or .env, because I'm overriding it...
Everything seems to be working now :)
Getting following error:
ERROR No platforms installed in "path here\src-cordova"
Things that might be wrong: folder is not created [ solved, run as administrator on windows] platforms are not added cause working directory not recognized as cordova based project