我将从GitHub下载的项目作为模块导入到我的Android Studio项目中."导入模块..."向导工作正常,但当Adroid Studio尝试重建项目时,它返回给我这个错误:
Cannot get property 'compileSdkVersion' on extra properties extension as it does not exist Open File
Run Code Online (Sandbox Code Playgroud)
该错误与导入模块的"build.gradle"文件中的此行相关:
compileSdkVersion rootProject.compileSdkVersion
Run Code Online (Sandbox Code Playgroud)
我试图在项目"build.gradle"中添加"ext"部分,如下所示:
ext {
compileSdkVersion 26
}
Run Code Online (Sandbox Code Playgroud)
但是这样我收到一个新的错误:
Gradle DSL method not found: 'compileSdkVersion()' Possible causes: ...
Run Code Online (Sandbox Code Playgroud) android android-studio build.gradle android-gradle-plugin gradle-plugin
I followed the steps in the Flutter document and tried to build my first Flutter app in Intellij IDEA. And when I try to run it,there was an error about my JAVA_HOME variable. And an error about cannot resolve symbol "Properties" in the build.gradle file. I really don't know what to do.
This is my error information displayed in the Console window.
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Finished with error: ProcessException: Process …Run Code Online (Sandbox Code Playgroud)