새 flutter 프로젝트를 만들었고 실행하면 오류가 발생합니다.
Target kernel_snapshot failed: Exception: The value of -DDartDefines is not formatted correctly.
The value must be a JSON-encoded list of strings but was:
[flutter.inspector.structuredErrors=true]
build failed.
FAILURE: Build failed with an exception.
* Where:
Script 'D:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 882
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'D:\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* 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
Exception: Gradle task assembleDebug failed with exit code 1
나는 플러터 클린을 시도했고 동일한 오류
플러터 닥터 로그 :
D:\flutter\bin\flutter.bat doctor --verbose
[√] Flutter (Channel master, v1.16.4-pre.69, on Microsoft Windows [Version 10.0.18363.959], locale en-US)
• Flutter version 1.16.4-pre.69 at D:\flutter
• Framework revision 19e7db585d (4 months ago), 2020-04-01 11:16:01 -0700
• Engine revision c9506cb8e9
• Dart version 2.8.0 (build 2.8.0-dev.18.0 eea9717938)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at C:\Users\user\AppData\Local\Android\sdk
• Platform android-29, build-tools 29.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[√] Android Studio (version 4.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 47.1.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[!] VS Code (version 1.47.2)
• VS Code at C:\Users\user\AppData\Local\Programs\Microsoft VS Code
X Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[!] Connected device
! No devices available
! Doctor found issues in 3 categories.
Process finished with exit code 0
Flutter Doctor가 제공하는 내용에 따르면 문제는 Android Sdk가 설치되지 않았거나 제대로 구성되지 않은 것과 관련이있을 수 있습니다. Flutter는 Android SDK 경로를 업데이트하는 명령을 제공합니다.
flutter config --android-sdk <path-to-your-android-sdk-path>
Android Studio에서 직접 설치할 수 있습니다. Android Studio에서 SDK Manager를 열려면 Tools> SDK Manager를 클릭하거나 툴바에서 SDK Manager를 클릭합니다. "사용되지 않는 패키지 숨기기"를 선택 취소하고 사용되지 않는 것으로 간주 된 패키지를 설치해야 할 수 있습니다.
또는이 링크에서 설치하고 이전에 말한 것처럼 구성 할 수 있습니다. https://www.google.com/url?sa=t&source=web&rct=j&url=https://android-sdk.fr.uptodown.com/ windows & ved = 2ahUKEwi-itWCkuzqAhXTZTUKHa29CRMQFjACegQIAhAB & usg = AOvVaw1QSSVVMrZzFltXvboDbTeQ
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다