Inspectopedia Help

String should be int

String should be int

The properties compileSdkVersion, minSdkVersion and targetSdkVersion are usually numbers, but can be strings when you are using an add-on (in the case of compileSdkVersion) or a preview platform (for the other two properties).

However, you can not use a number as a string (e.g. "19" instead of 19); that will result in a platform not found error message at build/sync time.

Issue id: StringShouldBeInt

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for Android 2023.3, Qodana for JVM 2023.3

Plugin:

Android, 2022.3.1 Beta 2

Last modified: 13 July 2023