You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Android应用构建与运行报错:SupportedAbis should not be null求助

Fixing "SupportedAbis should not be null" and ":app:processStagingDebugManifest" Error in Android Build

I’ve run into this exact issue before, and it almost always traces back to misconfigured ABI splits or corrupted build artifacts. Here’s how to resolve it step by step:

1. Audit Your ABI Splits Configuration

The error directly points to issues with how your app handles ABI splits. Open your module-level build.gradle (usually app/build.gradle) and check the splits block:

  • If you’re using ABI splits: Ensure you’ve explicitly defined the ABIs you want to support. Missing abiFilters will trigger this error. Example:

    splits {
        abi {
            enable true
            reset() // Clear default ABIs
            include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' // Specify supported ABIs
            universalApk true // Optional: Generate a universal APK
        }
    }
    
  • If you don’t need ABI splits: Explicitly disable splits (don’t just delete the block—some plugins may enable it implicitly):

    splits {
        abi {
            enable false
        }
    }
    

Also, check if your staging product flavor is overriding splits settings without providing valid abiFilters.

2. Clean and Rebuild Your Project

Corrupted build cache is a frequent culprit. Run these commands in your project’s root directory:

./gradlew clean
./gradlew assembleStagingDebug

Or use Android Studio’s built-in options: Build > Clean Project followed by Build > Rebuild Project.

3. Update Android Gradle Plugin and SDK Tools

Outdated plugin versions often have bugs related to ABI split handling. Go to File > Project Structure > Project and update the Android Gradle Plugin to the latest stable version (match the Gradle version to the plugin’s requirements). Also, update your SDK tools via Tools > SDK Manager > SDK Tools.

4. Validate SDK Version Compatibility

Ensure your compileSdkVersion, targetSdkVersion, and buildToolsVersion are compatible. For example:

defaultConfig {
    compileSdk 34
    targetSdk 34
    buildToolsVersion "34.0.0"
    // Other configs...
}

Mismatched versions can cause unexpected manifest processing errors.

5. Invalidate Caches and Restart

If none of the above work, clear Android Studio’s cached configuration: File > Invalidate Caches... > Invalidate and Restart. This fixes any lingering cached conflicts that might be causing the issue.


内容的提问来源于stack exchange,提问作者AlanT

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 06:53:34