The emergence of problems
Online emergency repair bug When , Often use hot updates , There was a problem after the last hot update : Open next time after the update app when , There's a hint :
“ This app uses HBuilder3.2.16 Compile or corresponding cli Version compilation , And the mobile terminal SKD The version is 3.2.9. Mismatched versions may cause application exceptions .”
The reason for this prompt is , Last release app It's been more than half a month , During this period, I upgraded HBuilder Application version of , Packing wgt When you file , Used 3.2.16 Version of hbuilder Packed , What is installed on the user's mobile phone 3.2.9 Version of hbuilder Packaged whole package , So when updating, you will be prompted that the compiled version is inconsistent with the version running in the mobile phone .
resolvent
- 1、 REPACK apk
There are many ways to solve this problem , Among them the app Come on , The best way is to use a higher version 3.2.16 Pack a new bag , And let users force updates to the new package , because hbuilder Upgrading will fix a lot bug, Some of them bug It needs our attention , Upgrading to the latest version can reduce bug Purpose .
- 2、 Back off hbuilder edition
However, the whole package forced update is not user-friendly , For users , The best way is to reinstall 3.2.9 Of hbuilder pack , Keep the same version with the user's mobile phone , The next time you need a full package update, upgrade to the latest hbuilder, Such a disadvantage is , When hbuilder Fixed some important bug, As a developer, I can't enjoy this fix at the first time , If this bug It also affects users , Then it must be upgraded .
- 3、 Ignore pop ups
The third way is not to deal with version differences , And directly ignore the pop-up ,“ Mismatched versions may cause application exceptions .”, It may not necessarily mean , Small version update , In most cases, we can directly ignore , The method of ignoring is also very simple :
stay manifest.json
in ,"app-plus"->"compatible"
Add the configuration :
"app-plus": {
"compatible": {
"ignoreVersion": true //true Indicates that the version check prompt box is ignored ,HBuilderX1.9.0 And above support
}
},
For more details, please refer to the instructions on the official website :
uni-app The running environment version is inconsistent with the compiler version