Android studio导入旧的安卓项目的时候初始化的时候有问题

Android studio导入旧的安卓项目的时候初始化的时候有问题

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file 'C:\HUAQUAN\MyProject\cktsgjapp\app\build.gradle' line: 5

* What went wrong:
A problem occurred evaluating project ':app'.
> No signature of method: build_3dyzi32ly2c1rpg6gyxsaqihe.android() is applicable for argument types: (build_3dyzi32ly2c1rpg6gyxsaqihe$_run_closure1) values: [build_3dyzi32ly2c1rpg6gyxsaqihe$_run_closure1@755b2fec]

* 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.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':app'.
> compileSdkVersion is not specified. Please add it to build.gradle

* 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 208ms

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.1/userguide/command_line_interface.html#sec:command_line_warnings

img

img


可能需要你把build.gradle文件贴出来才可以定位问题