There is no verbose flag.
Summary: On certain devices, dex is automatically stripped. To generate a debuggable APK, you must export a specific flag and then run the build. When you do this, the build system tries to set a flag that doesn't exist in the dex compiler and breaks the build.
Test: Successful Build on master branch
Change-Id: I85bbcc7ab426e9810dc241c99a08077f65e265bc
Signed-off-by: Abdelrahman Daim <adaim@meta.com>
diff --git a/java/dex.go b/java/dex.go
index faf51a3..e16b052 100644
--- a/java/dex.go
+++ b/java/dex.go
@@ -223,18 +223,11 @@
var requestReleaseMode bool
requestReleaseMode, flags = android.RemoveFromList("--release", flags)
- if ctx.Config().Getenv("NO_OPTIMIZE_DX") != "" {
+ if ctx.Config().Getenv("NO_OPTIMIZE_DX") != "" || ctx.Config().Getenv("GENERATE_DEX_DEBUG") != "" {
flags = append(flags, "--debug")
requestReleaseMode = false
}
- if ctx.Config().Getenv("GENERATE_DEX_DEBUG") != "" {
- flags = append(flags,
- "--debug",
- "--verbose")
- requestReleaseMode = false
- }
-
// Don't strip out debug information for eng builds, unless the target
// explicitly provided the `--release` build flag. This allows certain
// test targets to remain optimized as part of eng test_suites builds.