Skip to content

Commit

Permalink
Tell people how to find zipalign
Browse files Browse the repository at this point in the history
Summary: Hopefully this helps

Reviewed By: satnam6502

Differential Revision: D3181313

fb-gh-sync-id: 1f5704f090a4ff954edad19017c30a3a03ac4a76
fbshipit-source-id: 1f5704f090a4ff954edad19017c30a3a03ac4a76
  • Loading branch information
bertmaher authored and Facebook Github Bot 8 committed Apr 15, 2016
1 parent 9f1fcb7 commit b4d07d3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,19 @@ input. Enjoy!

# FAQ

## I'm getting "Couldn't find zipalign. See README.md to resolve this"

`zipalign` is an optimization step that is bundled with the Android SDK. You
need to tell redex where to find it. For example, if you installed the SDK at
`/path/to/android/sdk`, try:
```
ANDROID_SDK=/path/to/android/sdk redex [... arguments ...]
```
You can alternatively add `zipalign` to your PATH, for example:
```
PATH=/path/to/android/sdk/build-tools/xx.y.zz:$PATH redex [... arguments ...]
```

## How does this compare to ProGuard?

ReDex is conceptually similar to ProGuard, in that both optimize bytecode.
Expand Down
2 changes: 1 addition & 1 deletion redex.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ def zipalign(unaligned_apk_path, output_apk_path):
subprocess.check_call(zipalign +
['4', unaligned_apk_path, output_apk_path])
except:
print("Couldn't find zipalign. Your APK may not be fully optimized.")
print("Couldn't find zipalign. See README.md to resolve this.")
shutil.copy(unaligned_apk_path, output_apk_path)
os.remove(unaligned_apk_path)

Expand Down

0 comments on commit b4d07d3

Please sign in to comment.