Android Studio 无法找到com.android.tools.build页面

tez616oj  于 2022-12-23  发布在  Android
关注(0)|答案(1)|浏览(198)

我尝试运行我的第一个flutter应用,但没有成功。我已经安装了最新的flutter和dart SDK以及git工具,我从网站上手动安装了gradle。错误消息是:

[   +2 ms]     project : > com.android.tools.build:gradle:7.1.2 > com.android.tools.build:builder:7.1.2
[   +1 ms] Cause 30: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find com.android.tools:annotations:30.1.2.
[   +1 ms] Searched in the following locations:
[   +1 ms]   - https://dl.google.com/dl/android/maven2/com/android/tools/annotations/30.1.2/annotations-30.1.2.pom
[   +1 ms]   - https://repo.maven.apache.org/maven2/com/android/tools/annotations/30.1.2/annotations-30.1.2.pom
[   +3 ms] Required by:
[   +2 ms]     project : > com.android.tools.build:gradle:7.1.2 > com.android.tools.build:builder-model:7.1.2
[   +2 ms] * Get more help at https://help.gradle.org
[   +2 ms] BUILD FAILED in 19s
[   +2 ms] Watched directory hierarchies: []
[ +484 ms] Running Gradle task 'assembleDebug'... (completed in 22.5s)
[   +6 ms] Exception: Gradle task assembleDebug failed with exit code 1
[   +8 ms] "flutter run" took 24,464ms.
[   +9 ms] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
           #1      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:713:9)
           <asynchronous suspension>
           #2      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1209:27)
           <asynchronous suspension>
           #3      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #4      CommandRunner.runCommand (package:args/command_runner.dart:209:13)
           <asynchronous suspension>
           #5      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:281:9)
           <asynchronous suspension>
           #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #7      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)
           <asynchronous suspension>
           #8      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
           <asynchronous suspension>
           #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #10     main (package:flutter_tools/executable.dart:91:3)
           <asynchronous suspension>
           
           
[ +271 ms] ensureAnalyticsSent: 266ms
[   +5 ms] Running shutdown hooks
[   +3 ms] Shutdown hooks complete
[   +3 ms] exiting with code 1
7kjnsjlb

7kjnsjlb1#

这是一个问题,由于互联网速度和限制访问,我使用了自定义DNS服务器,我能够下载所有丢失的文件,并使应用程序运行。由于一些网站在叙利亚被禁止,你可以使用178.22.122.100-185.51.200.2作为DNS服务器地址,并建立良好的工作罚款。

相关问题