JIT
impact of removing x86 and x86_64 from flutter app ndk configuration
in my flutter app if I remove "x86", "x86_64" from following code line in build/gradle then what will be the effect: ndk { abiFilters "arm64-v8a", "armeabi-v7a" // Remove "armeabi" , "x86", "x86_64" }

Removing "x86" and "x86_64" from the ndk configuration in your Flutter app's build.gradle file will have the following effects:

  1. Reduced APK Size: The APK will no longer include native libraries for x86 and x86_64 architectures, making the APK smaller in size.

  2. No Support for x86 Devices: The app will not run on:

    • Intel Atom-based Android devices (x86)
    • Android emulators running on x86 architecture (unless you specifically configure them to use ARM translation)
  3. Performance Impact on Emulators: x86 emulators will need to use ARM translation (slower) rather than running native x86 code.

  4. Supported Architectures: The app will only support:

    • ARMv7 (32-bit ARM devices)
    • ARM64 (64-bit ARM devices)
  5. Play Store Impact: Google Play will only serve your app to ARM-based devices, not x86 devices.

This is generally a safe optimization since:

  • Most Android devices use ARM architecture
  • Modern emulators can use ARM translation
  • You can still test on ARM-based emulators

If you need to support x86 devices (rare), you should keep those entries. Otherwise, removing them is a good optimization.

actually I got following recommendations when I have uploaded my app bundle: Your app uses deprecated APIs or parameters for edge-to-edge One or more of the APIs you use or parameters that you set for edge-to-edge and window display have been deprecated in Android 15. Your app uses the following deprecated APIs or parameters: android.view.Window.setDecorFitsSystemWindows android.view.Window.setStatusBarColor android.view.Window.getStatusBarColor android.view.Window.setNavigationBarColor These start in the following places: androidx.core.view.m0$b.a io.flutter.embedding.android.i.U com.stripe.android.customersheet.CustomerSheet$a$a.a com.stripe.android.payments.core.authentication.threeds2.Stripe3ds2TransactionActivity.onCreate com.stripe.android.paymentsheet.flowcontroller.d$a.a com.stripe.android.view.n$b.b ek.a.i gl.k.u0 uh.g$a$a.a To prepare for the change to Android 15, migrate away from these APIs or parameters. then 2. Remove resizability and orientation restrictions in your app to support large screen devices From Android 16, Android will ignore resizability and orientation restrictions for large screen devices, such as foldables and tablets. This may lead to layout and usability issues for your users. We detected the following resizability and orientation restrictions in your app: com.razorpay.b3.onCreate pj.b.onCreate To improve the user experience for your app, remove these restrictions and check that your app layouts work on various screen sizes and orientations by testing on Android 16 and below. Then 3. Recompile your app with 16 KB native library alignment Your app uses native libraries that are not aligned to support devices with 16 KB memory page sizes. These devices may not be able to install or start your app, or your app may start and then crash. There are new app bundles in this release that do not support 16 KB. Version codes: 21 Android 15 supports devices with 16 KB memory page sizes, which can improve your app's performance. We recommend recompiling your app when you migrate to Android 15 and testing your app in a 16 KB environment to avoid issues for users.

Here's how to address each of these issues in your Flutter app:

Key changes made:

  1. NDK Configuration:

    • Removed x86 architectures as you requested
    • Added explicit NDK version
    • This helps with the 16KB alignment issue
  2. Android 15 Compatibility:

    • Updated compileSdkVersion and targetSdkVersion to 34 (Android 14)
    • Added resizeableActivity="true" for large screen support
    • Removed orientation restrictions from activity configChanges
  3. Native Library Alignment:

    • Added packagingOptions configuration to ensure proper alignment
    • This addresses the 16KB page size requirement

Additional recommendations:

  • Update all plugins (especially Razorpay and Stripe) to their latest versions
  • Test on Android 15 emulator
  • Consider using WindowCompat APIs instead of the deprecated Window APIs
Updated files
v1
which file you have updated and with which text?

Here's a summary of the files I updated and the specific changes made:

  1. File: android/app/build.gradle
    • Changes:
      • Set compileSdkVersion to 34
      • Added ndkVersion "25.1.8937393"
      • Updated targetSdkVersion to 34
      • Removed x86 architectures from ``
but my existing build.gradle code is as follows. kindly check and tell me is there any issues so I am getting above recommendation: buildscript { repositories { google() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:8.1.0' // Use the latest stable version } } plugins { id 'com.android.application' id 'kotlin-android' id 'dev.flutter.flutter-gradle-plugin' id 'com.google.gms.google-services' } ext { kotlin_version = '1.6.10' // Specify the desired Kotlin version here } def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { localPropertiesFile.withReader('UTF-8') { reader -> localProperties.load(reader) } } def flutterRoot = localProperties.getProperty('flutter.sdk') if (flutterRoot == null) { throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") } def flutterVersionCode = localProperties.getProperty('flutter.versionCode') ?: '1' def flutterVersionName = localProperties.getProperty('flutter.versionName') ?: '1.0' // Load keystore properties def keystoreProperties = new Properties() def keystorePropertiesFile = rootProject.file('key.properties') if (keystorePropertiesFile.exists()) { keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) } else { throw new GradleException("Key properties file not found: key.properties") } android { namespace 'com.fitstand.app' compileSdkVersion 35 ndkVersion flutter.ndkVersion packagingOptions { pickFirst 'lib/x86/libc++_shared.so' pickFirst 'lib/x86_64/libc++_shared.so' pickFirst 'lib/armeabi-v7a/libc++_shared.so' pickFirst 'lib/arm64-v8a/libc++_shared.so' } //kotlin { //jvmToolchain { //languageVersion.set(JavaLanguageVersion.of(17)) // Set to your desired JDK version //} //} compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' //freeCompilerArgs += ["-Xlint:deprecation", "-Xlint:unchecked"] } sourceSets { main.java.srcDirs += 'src/main/kotlin' } defaultConfig { applicationId "com.fitstand.app" minSdkVersion 23 targetSdkVersion 34 multiDexEnabled true versionCode 23 // Updated 16.05.2025 versionName "1.0.7" // Updated 08.03.2025 ndk { abiFilters "arm64-v8a", "armeabi-v7a" // Remove "armeabi" , "x86", "x86_64" } } signingConfigs { release { keyAlias keystoreProperties['keyAlias'] keyPassword keystoreProperties['keyPassword'] storeFile file(keystoreProperties['storeFile']) // Ensure this is not null storePassword keystoreProperties['storePassword'] } } buildTypes { release { signingConfig signingConfigs.release // add the following two lines minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' shrinkResources true } } } flutter { source '../..' } dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation platform('com.google.firebase:firebase-bom:30.2.0') implementation 'com.google.firebase:firebase-analytics' implementation 'com.google.android.exoplayer:exoplayer:2.19.1' implementation 'phonepe.intentsdk.android.release:IntentSDK:2.4.3' implementation 'com.android.support:multidex:2.0.1' // implementation 'com.stripe:stripe-android:17.1.1' } and also tell me where I will get AndroidManifest.xml file and what is to be changed

Based on your build.gradle file, here are the issues and required changes to address the recommendations:

  1. Main Issues in Your build.gradle:
// Required changes in build.gradle:
android {
    compileSdkVersion 34  // Keep this (matches targetSdk)
    ndkVersion "25.1.8937393" // Explicitly set NDK version

    defaultConfig {
        minSdkVersion 23
        targetSdkVersion 34
        multiDexEnabled true
        
        ndk {
            abiFilters "arm64-v8a", "armeabi-v7a" // Correct as per your needs
        }
    }

    packagingOptions {
        pickFirst '**/libc++_shared.so' // Simplified version
    }
}
  1. For AndroidManifest.xml:
    • Location: android/app/src/main/AndroidManifest.xml
    • Required changes:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.fitstand.app">
    
    <application
        android:name=".Application"
        android:label="FitStand"
        android:icon="@mipmap/ic_launcher"
        android:resizeableActivity="true"
        android:supportsRtl="true">
        
        <activity
            android:name=".MainActivity"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize"
            android:exported="true">
            
            <meta-data
                android:**
but my existing build.gradle code is as follows. kindly check and tell me is there any issues so I am getting above recommendation: buildscript { repositories { google() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:8.1.0' // Use the latest stable version } } plugins { id 'com.android.application' id 'kotlin-android' id 'dev.flutter.flutter-gradle-plugin' id 'com.google.gms.google-services' } ext { kotlin_version = '1.6.10' // Specify the desired Kotlin version here } def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { localPropertiesFile.withReader('UTF-8') { reader -> localProperties.load(reader) } } def flutterRoot = localProperties.getProperty('flutter.sdk') if (flutterRoot == null) { throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") } def flutterVersionCode = localProperties.getProperty('flutter.versionCode') ?: '1' def flutterVersionName = localProperties.getProperty('flutter.versionName') ?: '1.0' // Load keystore properties def keystoreProperties = new Properties() def keystorePropertiesFile = rootProject.file('key.properties') if (keystorePropertiesFile.exists()) { keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) } else { throw new GradleException("Key properties file not found: key.properties") } android { namespace 'com.fitstand.app' compileSdkVersion 35 ndkVersion flutter.ndkVersion packagingOptions { pickFirst 'lib/x86/libc++_shared.so' pickFirst 'lib/x86_64/libc++_shared.so' pickFirst 'lib/armeabi-v7a/libc++_shared.so' pickFirst 'lib/arm64-v8a/libc++_shared.so' } //kotlin { //jvmToolchain { //languageVersion.set(JavaLanguageVersion.of(17)) // Set to your desired JDK version //} //} compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' //freeCompilerArgs += ["-Xlint:deprecation", "-Xlint:unchecked"] } sourceSets { main.java.srcDirs += 'src/main/kotlin' } defaultConfig { applicationId "com.fitstand.app" minSdkVersion 23 targetSdkVersion 34 multiDexEnabled true versionCode 23 // Updated 16.05.2025 versionName "1.0.7" // Updated 08.03.2025 ndk { abiFilters "arm64-v8a", "armeabi-v7a" // Remove "armeabi" , "x86", "x86_64" } } signingConfigs { release { keyAlias keystoreProperties['keyAlias'] keyPassword keystoreProperties['keyPassword'] storeFile file(keystoreProperties['storeFile']) // Ensure this is not null storePassword keystoreProperties['storePassword'] } } buildTypes { release { signingConfig signingConfigs.release // add the following two lines minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' shrinkResources true } } } flutter { source '../..' } dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation platform('com.google.firebase:firebase-bom:30.2.0') implementation 'com.google.firebase:firebase-analytics' implementation 'com.google.android.exoplayer:exoplayer:2.19.1' implementation 'phonepe.intentsdk.android.release:IntentSDK:2.4.3' implementation 'com.android.support:multidex:2.0.1' // implementation 'com.stripe:stripe-android:17.1.1' } and also tell me where I will get AndroidManifest.xml file and what is to be changed

Based on your build.gradle file, here

I didn't get your explanation on the changes and the codeines