Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using ”---localtesting “ mode for overlay installation will result in plug-in legacy #244

Closed
FortuneDream opened this issue Sep 15, 2021 · 6 comments

Comments

@FortuneDream
Copy link

Describe the bug
I have installed splitapk. Then I modified the code and tried to use the local testing mode to simulate and download the new splitapk. At this time, the plug-in has been downloaded. It is found that the modified code does not take effect because the legacy splitapk is still used at this time

Bundletool version(s) affected
Version: [1.8]

Stacktrace
build-apks --local-testing

To Reproduce
overlay installation

Additional context
Can you provide a good way to avoid this problem? For example, adding new parameters can delete the previous splitapk when the installation is overwritten?

@ymakhno
Copy link

ymakhno commented Sep 16, 2021

Could you provide steps to reproduce for the problem?

@FortuneDream
Copy link
Author

Yes.
First :After installing the app, use the localtesting mode and call startinstall to install the module in the on-demand "module_ 1"

Second : Modify the module_ 1. Use the localtesting mode again.

Finally,If you overwrite the installation, the code will not take effect

@ymakhno
Copy link

ymakhno commented Sep 16, 2021

Have you invoked install-apks after you modified module_1?

@FortuneDream
Copy link
Author

FortuneDream commented Sep 16, 2021

yes.
I found that the root of the problem is that in the case of overwriting the installation and in the local testing mode, instead of calling SplitInstallmanager. startInstall(), I directly use Splitinstallmanager. getinstalledmodules (). This method will judge that the plug-in has been installed.

@ymakhno
Copy link

ymakhno commented Sep 21, 2021

For now you can simply workaround this by:
adb shell run-as $PACKAGE_NAME rm -rf /data/data/$PACKAGE_NAME/files/splitcompat && java -jar bundletool.jar install-apks ...

where $PACKAGE_NAME is a package name of your app.

@ymakhno
Copy link

ymakhno commented Sep 30, 2021

Fixed in 1.8.1.

@ymakhno ymakhno closed this as completed Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants