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

Transform Scope Change to SCOPE_FULL_WITH_FEATURES, will not install success? #115

Open
yanglichuan opened this issue Feb 23, 2022 · 0 comments

Comments

@yanglichuan
Copy link

yanglichuan commented Feb 23, 2022

   @Override
    public Set<? super QualifiedContent.Scope> getScopes() {
        return TransformManager.SCOPE_FULL_WITH_FEATURES;
    }

把scope修改为 SCOPE_FULL_WITH_FEATURES,
运行app,报错如下:

Installation did not succeed.
The application could not be installed: INSTALL_FAILED_INVALID_APK

List of apks:
[0] '/Users/ko/Bundle/app/build/outputs/apk/debug/app-debug.apk'
[1] '/Users/ko/Bundle/kk/build/outputs/apk/debug/kk-debug.apk'
The APKs are invalid.
Retry

当用命令行运行:
./gradlew bundleDebug

报错如下:


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageDebugBundle'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.PackageBundleTask$BundleToolWorkAction
   > Module 'base' has no dex files but the attribute 'hasCode' is not set to false in the AndroidManifest.xml.

说明生成的base.apk中没有 dex文件, 应该是transform阶段 失败了

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

1 participant