0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【Android Studio】エラーInstalled Build Tools revision XX.X.X is corrupted. Remove and install again using the SDK Manager. 対処法

Posted at

AndroidStudioでビルドを実行しようとすると以下のエラーが出てきました。

Installed Build Tools revision 30.0.3 is corrupted. Remove and install again using the SDK Manager.

ビルドツールのバージョン30.0.3に問題があるみたいなので、このビルドツールを31.0.0にバージョンアップしてみます。

build.gradleファイルを以下のように変更します。

android {
    namespace "com.example.myfirst_app"
    compileSdkVersion 31                 //ここを31に変更
    buildToolsVersion = '31.0.0'         //ここを'31.0.0'に変更 
    ndkVersion flutter.ndkVersion

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = '1.8'
    }

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    defaultConfig {
        minSdkVersion flutter.minSdkVersion
        targetSdkVersion 31              //ここを31に変更
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }

これで問題なくビルド実行できました:raised_hands_tone3:

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?