Closed vahost closed 3 years ago
Capacitor doesn't use the package.json version for setting the native version.
The native version can be configured by changing versionName
field in the app's build.gradle
file.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.
Bug Report
Capacitor Version
Platform(s)
Current Behavior
I am using Quasar Framework. When I build and sign the app for Google Play, then upload it to the Google Play console, it reports that the version that I set in my package.json file gets changed to version 1.0.
If I use Cordova instead, the package uploads successfully and maintains the assigned version number in package.json.
So I'm pretty sure this issue is specific to Capacitor.
Expected Behavior
The .apk file should upload successfully with the assigned version from package.json getting picked up correctly.
Code Reproduction
Here is my package.json file:
I'm running the following command to build the package:
quasar build -m capacitor -T android
and then I'm signing the final .apk file before uploading it to Google Play.
Other Technical Details
npm --version
output: 6.14.9node --version
output: 12.18.3pod --version
output (iOS issues only):Additional Context
Here is the output when I run quasar info:
Operating System - Windows_NT(10.0.19041) - win32/x64 NodeJs - 12.18.3
Global packages NPM - 6.14.9 yarn - 1.21.1 @quasar/cli - 1.1.0 @quasar/icongenie - 2.3.0 cordova - 10.0.0
Important local packages quasar - 1.14.5 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time @quasar/app - 2.1.8 -- Quasar Framework local CLI @quasar/extras - 1.9.10 -- Quasar Framework fonts, icons and animations eslint-plugin-quasar - Not installed vue - 2.6.12 -- Reactive, component-oriented view layer for modern web interfaces. vue-router - 3.2.0 -- Official router for Vue.js 2 vuex - 3.5.1 -- state management for Vue.js electron - 7.1.7 -- Build cross platform desktop apps with JavaScript, HTML, and CSS electron-packager - Not installed electron-builder - Not installed @babel/core - 7.12.9 -- Babel compiler core. webpack - 4.44.2 -- Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff. webpack-dev-server - 3.11.0 -- Serves a webpack app. Updates the browser on changes. workbox-webpack-plugin - Not installed register-service-worker - 1.7.1 -- Script for registering service worker, with hooks typescript - 3.9.5 -- TypeScript is a language for application scale JavaScript development @capacitor/core - 2.4.4 -- Capacitor: cross-platform mobile apps with the web @capacitor/cli - 2.4.4 -- Capacitor: Cross-platform apps with JavaScript and the web @capacitor/android - 2.4.4 -- Capacitor: cross-platform mobile apps with the web @capacitor/ios - Not installed
Quasar App Extensions None installed
Networking Host - Abraham Ethernet 2 - 10.0.0.198 Wi-Fi - 10.0.0.125