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

打apk正常,但打aab找不到权限申明(AAPT: error: not well-formed (invalid token).) #89

Open
Liuyang98 opened this issue Jul 10, 2024 · 0 comments

Comments

@Liuyang98
Copy link

AndroidJunkCode版本
1.3.3

gradle版本
8.7-all

AGP版本
8.5

JDK版本
17

productFlavors配置
sdk_h5 {
dimension "default"
applicationId "com.demo.sample"
versionNameSuffix "-sdk_h5"
}

androidJunkCode配置
androidJunkCode {
variantConfig {
sdk_h5Release {
//注意:这里的release是变体名称,如果没有设置productFlavors就是buildType名称,如果有设置productFlavors就是flavor+buildType,例如(freeRelease、proRelease)
packageBase = "cn.hx.plugin" //生成java类根包名
packageCount = 5 //生成包数量
activityCountPerPackage = 3 //每个包下生成Activity类数量
excludeActivityJavaFile = false
//是否排除生成Activity的Java文件,默认false(layout和写入AndroidManifest.xml还会执行),主要用于处理类似神策全埋点编译过慢问题
otherCountPerPackage = 5 //每个包下生成其它类的数量
methodCountPerClass = 5 //每个类下生成方法数量
resPrefix = "junk_" //生成的layout、drawable、string等资源名前缀
drawableCount = 20 //生成drawable资源数量
stringCount = 20 //生成string数量
}
}
}

bug描述
打apk都是正常的,但生成aab就会报

ERROR: D:\AndroidStudioProjects\xxxx\app\build\intermediates\bundle_manifest\sdk_h5Release\processApplicationManifestSdk_h5ReleaseForBundle\AndroidManifest.xml:13: AAPT: error: not well-formed (invalid token).

定位到该行,为:

如果在xml中声明 ,则可正常生成aab

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