Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
481 views
in Technique[技术] by (71.8m points)

android - Can't find 'apksigner' executable to manually sign APK

Following the Sign Your App Manually guide,

You can sign your app from the command line using standard tools from the Android SDK and the JDK

I should have apksigner somewhere to run

$ apksigner sign --ks my-release-key.jks my-app.apk

Where is this executable supposed to be? The documentation never specifies where I'm supposed to get the tool on the Signing guide or the apksigner doc.

I don't recall having this problem last time I manually signed an app. I've searched all the directories I can think of with no luck (including subdirectories):

  • AppDataLocalAndroidsdk
  • Program FilesAndroidAndroid Studio
  • Program FilesJavajdk1.8.0_91

Googling for 'apksigner' just seems to turn up a number of unofficial apk signing tools but no official download. What am I missing?

Running Android Studio 2.2, Build Tools 24.0.2, JDK 1.8

Thanks

ANSWERED: Updating to to 24.0.3 solves it. Thanks to Alex Klyubin, please upvote his answer. For some reason Build Tools 24.0.2 simply does not have apksigner.

Build Tools, Revision 24.0.3 (September 2016)

  • Added apksigner, an APK signing tool to replace jarsigner ...
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

apksigner shipped with Android SDK Build Tools 24.0.3 (see https://developer.android.com/studio/releases/build-tools.html). The tool can be found in the Android SDK's build-tools/<tools version> directory. For example, build-tools/24.0.3/apksigner on Linux/OSX and build-tools/24.0.3/apksigner.bat on Windows.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...