0
buildscript {
ext {
    buildToolsVersion = "29.0.3"
    minSdkVersion = 21
    compileSdkVersion = 29
    targetSdkVersion = 31
    ndkVersion = "20.1.5948944"
}

before

buildscript {
ext {
    buildToolsVersion = "29.0.3"
    minSdkVersion = 21
    compileSdkVersion = 29
    targetSdkVersion = 29
    ndkVersion = "20.1.5948944"
}

Also tried with in build.gradle

buildscript {
ext {
    buildToolsVersion = "31.0.0"
    minSdkVersion = 21
    compileSdkVersion = 31
    targetSdkVersion = 31
    ndkVersion = "20.1.5948944"
}

Using android studio to generate .apk or .aab after the above changes .apk not getting installed in mobile. Help here. Build tools api installed in android studio

Sachin Singh
  • 87
  • 1
  • 1
  • 9

1 Answers1

0
<activity
        android:name=".MainActivity"
        android:launchMode="singleTop"
        android:theme="@style/LaunchTheme"
        android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
        android:hardwareAccelerated="true"
        android:windowSoftInputMode="adjustResize"
        android:exported="true">

I only updated targetSdkVersion from 29 to 31 and adding android:exported="true" in androidManifest.xml resolved my issue

CHECK Failure [INSTALL_FAILED_USER_RESTRICTED: Invalid apk] in android

Sachin Singh
  • 87
  • 1
  • 1
  • 9