android studio: release apk is not signed

前端 未结 7 2000
误落风尘
误落风尘 2021-02-04 02:07

* I have rephrased the post since originally posted *

When I try to run a just-built release apk, I get an error \"the apk for your currently selected v

7条回答
  •  爱一瞬间的悲伤
    2021-02-04 02:29

    Set signing config in project structure.

    1. File -> Project Structure...
    2. Select Modules/app (or other module)
    3. Click Signing tab and fill in.
      Key Alias and Key Password comes first. Not same order in "Generate Signed APK" dialog.
    4. Click Build Types tab and select release.
      Select "config" in Signing config dropdown list.
    5. Click OK to close Project Structure.
    6. Run -> Run app

    Run (or Debug) app seems to use apks built with "Buiild -> Build APK". So, we should set signing config if build variants of app module is "release".

提交回复
热议问题