Skip to content

解决因splits导致AndroidManifest分配坑位失败 #643

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.qihoo360.replugin.gradle.host

import com.android.build.OutputFile
import com.android.build.gradle.AppExtension
import com.android.build.gradle.AppPlugin
import com.qihoo360.replugin.gradle.host.creator.FileCreators
Expand Down Expand Up @@ -111,6 +112,14 @@ public class Replugin implements Plugin<Project> {
//3.0.0之前,直接使用
manifestFile = file
}

if (!manifestFile.exists()) {
def abi = output.filters.find { it.filterType == OutputFile.ABI }?.identifier
if (abi != null) {
manifestFile = new File(file, "${abi}/AndroidManifest.xml")
}
}

//检测文件是否存在
if (manifestFile != null && manifestFile.exists()) {
println "${AppConstant.TAG} handle manifest: ${manifestFile}"
Expand Down