Buildを行うとこんな感じ。
とりあえず、回避。
Executing tasks: [clean, :app:assembleDebug] in project C:\Users\xxxx\AndroidStudioProjects\MyApplication
Build-tool 31.0.0 is missing DX at C:\Users\xxxx\AppData\Local\Android\Sdk\build-tools\31.0.0\dx.bat
Build-tool 31.0.0 is missing DX at C:\Users\xxxx\AppData\Local\Android\Sdk\build-tools\31.0.0\dx.bat
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2s
Tools - SDK Manager
から
SDK Platforms
で以下をチェック
- Android 11.0(R)
- Android 10.0(Q)
- Android 9.0(Pie)
SDK Tools
で
Show Package Details
にチェックをつけて
以下をチェック
Android SDK Build-Tools 31
- 31.0.0
- 30.0.3
- 29.0.3
- 28.0.3
- 27.0.3
以下のファイルを修正
.\app\build.gradle
android {
compileSdkVersion 30 <<<
buildToolsVersion "30.0.3" <<<
defaultConfig {
applicationId "com.example.myapplication"
minSdkVersion 19
targetSdkVersion 30 <<<
Build - Rebuild Project
を実行