LoginSignup
0
0

Android Studio: Version の設定

Posted at

Android Studio で、APK ファイルのバージョンを指定する方法です。

Gradle Scripts -> build.gradle.kts (Module :app)

で設定します。
image.png

例えば、1.2.3 と指定して、Build します。

   versionName = "1.2.3"

作成された app-debug.apk のバージョンを調べます。

image.png

aapt dump badging app-debug.apk | grep  versionName

実行結果

$ aapt dump badging app-debug.apk | grep  versionName
package: name='com.example.n001' versionCode='1' versionName='1.2.3' compileSdkVersion='33' compileSdkVersionCodename='13'
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0