Publishing to Google Play

  1. We assume that you have already installed JDK, Gradle, Android Studio and other requirements specified here.
  2. Extract project to some folder, e.g. MyApp. So that index.html will be in folder MyApp\Application.
  3. Open terminal/cmd and move to folder MyApp
cd MyApp
  1. Create new cordova project using this command:
cordova create Android com.myapp MyApp
# Android is the folder name
# com.myapp - is reverse domain-style identifier of your application
# MyApp - application name.
  1. Open Android folder
cd Android
  1. Add android platform
cordova platform add android 
  1. Now open file MyApp\Application\config\index.js and uncomment lines to build to Android folder:



 
 
 
 






module.exports = {
    build: {
        env: require('./prod.env'),
        //index: path.resolve(__dirname, '../dist/index.html'),
        //assetsRoot: path.resolve(__dirname, '../dist'),
        index: path.resolve(__dirname, '../../Android/www/index.html'),
        assetsRoot: path.resolve(__dirname, '../../Android/www'),
        //index: path.resolve(__dirname, '../../IOS/www/index.html'),
        //assetsRoot: path.resolve(__dirname, '../../IOS/www'),

        ...
    },
  1. Open Application folder and install libs, if you haven't yet:
cd ..
cd Application
npm install
  1. Build project
npm run build
  1. Open Android folder and build cordova project
cd ..
cd Android
cordova build
  1. Now you can setup signing, icons etc. And finally connect devie and build your app for release:
cordova run android --release
  1. Then you can upload to Google Play signed app from MyApp\Android\platforms\android\build\outputs\apk\.

You can test published Vue Mobile default app in Google Play by the link.