Background:
Create a new page, use navigateTo to jump, generate offline packaging resources, and perform offline packaging in Android Studio. After completion, install (the phone already has a lower version) to the Android phone. After installation, click Jump, the first time It is reported that the page cannot be found. After closing the software and re-entering, click to jump normally
Reason:
Andriod Studio has a cache problem when debugging on the real device. There is no cache problem in the official release package.
If you are using a release package, check yourself:
- Android studio project clean project before packaging
www/manifest.json
Determine the name and code version upgrades in files in local packaged resources
"version": {
"name": "xx",
"code": "xx"
}
manifest.json
Corresponding to the versionName and versionCode in the uniapp project
{
"name" : "",
"appid" : "",
"description" : "",
"versionName" : "2.4.0",
"versionCode" : 240,
"transformPx" : false,
"app-plus" : {}
}
I just did not upgrade versionName and versionCode synchronously, so the resulting page does not jump, and it will be fine after the upgrade.