summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/java/java.go b/java/java.go
index 9c4bd869e..7e82c59d6 100644
--- a/java/java.go
+++ b/java/java.go
@@ -1395,7 +1395,7 @@ func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) {
j.deviceProperties.UncompressDex = j.shouldUncompressDex(ctx)
j.compile(ctx)
- if Bool(j.properties.Installable) || ctx.Host() {
+ if (Bool(j.properties.Installable) || ctx.Host()) && !android.DirectlyInAnyApex(ctx, ctx.ModuleName()) {
if j.deviceProperties.UncompressDex {
alignedOutputFile := android.PathForModuleOut(ctx, "aligned", ctx.ModuleName()+".jar")
TransformZipAlign(ctx, alignedOutputFile, j.outputFile)