如何通过终端解决Android SDK Build Tools版本过低问题
Hey there! Let's unpack this issue for you clearly, since you already have some basic grasp but want to understand the inner workings better.
First, let's clarify the root of that error message:
"The SDK Build Tools revision (23.0.1) is too low for project"
This error pops up because your project's Gradle plugin version and the specified SDK Build Tools version are incompatible. Newer Gradle plugins rely on updated Build Tools to support new Android features, bug fixes, and compatibility standards—so an old Build Tools version can't keep up.
What happens when you click Android Studio's fix prompt?
When you tap that auto-fix button in AS, here's the behind-the-scenes flow:
- First, it checks the Gradle plugin version your project uses (look in the root
build.gradlefile'sdependenciesblock, likeclasspath 'com.android.tools.build:gradle:x.x.x'), then maps it to the recommended compatible SDK Build Tools version. - Next, it automatically updates the
buildToolsVersionfield in each module'sbuild.gradlefile, replacing the old version (23.0.1 in your case) with the matched compatible one. - It also checks if this new Build Tools version is already installed in your local SDK. If not, it prompts you to open the SDK Manager to download and install it.
- Finally, it triggers a Gradle sync to apply the new configuration across your project.
Alternative approach: Use the latest stable SDK Build Tools
If you prefer to manually use the highest available stable Build Tools version, follow these steps:
- Open the SDK Manager (via the SDK icon in AS's top-right corner), navigate to the SDK Build Tools section, and install the latest stable version (skip preview builds marked with
rcorbetaunless you're testing experimental features). - Open each module's
build.gradlefile, find theandroidblock, and update thebuildToolsVersionto your newly installed version. For example:android { buildToolsVersion "34.0.0" // Replace with your installed latest stable version // Other configurations... } - Click the "Sync Project with Gradle Files" button in the AS toolbar to finalize the changes.
A quick note: While using the latest Build Tools usually works smoothly, some older projects might run into compatibility issues with outdated libraries. If that happens, you'll need to roll back to a version that's compatible with both your Gradle plugin and project dependencies.
内容的提问来源于stack exchange,提问作者weilin zhang




