Get Android .apk file VersionName or VersionCode WITHOUT installing apk

前端 未结 9 2572
鱼传尺愫
鱼传尺愫 2020-11-28 17:32

How can I get programmatically get the version code or version name of my apk from the AndroidManifest.xml file after downloading it and without installing it.



        
9条回答
  •  一向
    一向 (楼主)
    2020-11-28 18:08

    Following worked for me from the command line:

    aapt dump badging myapp.apk
    

    NOTE: aapt.exe is found in a build-tools sub-folder of SDK. For example:

    /build-tools/23.0.2/aapt.exe
    

提交回复
热议问题