안녕하세요 질문이 2개있습니다. 강의 듣던중 에뮬레이터 실행하니 FAILURE: Build failed with an exception. * Where: Build file 'C:\workspace\Flutter\android\app\build.gradle' line: 5 * What went wrong: An exception occurred applying plugin request [id: 'dev.flutter.flutter-gradle-plugin'] > Failed to apply plugin 'dev.flutter.flutter-gradle-plugin'. > No such property: source for class: java.lang.String * 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 590ms Error: Gradle task assembleDebug failed with exit code 1 에러가 났는데 뭐가문제일까요? plugins { id "com.android.application" id "kotlin-android" // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. id "dev.flutter.flutter-gradle-plugin" } android { namespace = "com.survivalcoding.flutter_recipe_app_course" compileSdk = flutter.compileSdkVersion ndkVersion = flutter.ndkVersion compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = JavaVersion.VERSION_1_8 } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId = "com.survivalcoding.flutter_recipe_app_course" // You can update the following values to match your application needs. // For more information, see: https://flutter.dev/to/review-gradle-config. minSdk = flutter.minSdkVersion targetSdk = flutter.targetSdkVersion versionCode = flutter.versionCode versionName = flutter.versionName } buildTypes { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. signingConfig = signingConfigs.debug } } } flutter { source = "../.." } ============================================================ file > settings > build Tools > gradle 설정 부분에서 jdk 설정부분이 없습니다. PS C:\workspace\Flutter> flutter config --list All Settings: enable-web: (Not set) enable-linux-desktop: (Not set) enable-macos-desktop: (Not set) enable-windows-desktop: (Not set) enable-android: (Not set) enable-ios: (Not set) enable-fuchsia: (Not set) (Unavailable) enable-custom-devices: (Not set) cli-animations: (Not set) enable-native-assets: (Not set) (Unavailable) enable-flutter-preview: (Not set) (Unavailable) enable-swift-package-manager: (Not set) (Unavailable) jdk-dir: C:\Program Files\Java\jdk-17 PS C:\workspace\Flutter> flutter doctor -v [√] Flutter (Channel stable, 3.24.0, on Microsoft Windows [Version 10.0.26100.2314], locale ko-KR) • Flutter version 3.24.0 on channel stable at C:\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 80c2e84975 (8 months ago), 2024-07-30 23:06:49 +0700 • Engine revision b8800d88be • Dart version 3.5.0 • DevTools version 2.37.2 [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 35.0.1) • Android SDK at C:\Users\hong\AppData\Local\Android\sdk • Platform android-35, build-tools 35.0.1 • Java binary at: C:\Program Files\Java\jdk-17\bin\java • Java version Java(TM) SE Runtime Environment (build 17.0.14+8-LTS-191) • All Android licenses accepted. [√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [!] Visual Studio - develop Windows apps (Visual Studio Build Tools 2019 16.11.42) • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools • Visual Studio Build Tools 2019 version 16.11.35425.106 • Windows 10 SDK version 10.0.19041.0 X The current Visual Studio installation is incomplete. Please use Visual Studio Installer to complete the installation or reinstall Visual Studio. [√] Android Studio (version 2024.3) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 21.0.5+-12932927-b750.29) [√] VS Code (version 1.96.4) • VS Code at C:\Users\hong\AppData\Local\Programs\Microsoft VS Code • Flutter extension can be installed from: https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter [√] Connected device (4 available) • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 16 (API 36) (emulator) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.26100.2314] • Chrome (web) • chrome • web-javascript • Google Chrome 134.0.6998.89 • Edge (web) • edge • web-javascript • Microsoft Edge 132.0.2957.127 [√] Network resources • All expected network resources are available. ! Doctor found issues in 1 category. PS C:\workspace\Flutter> flutter config --list 명령어하면 jdk는 17이고 flutter doctor -v 하면 jdk가 21로잡혀있어서 버전이 다른데 jdk 설정하는부분이 없는데 어떻게하면 오류해결과 jdk 수동설정 가능하게 할 수 있을까요?
[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
코드팩토리 디스코드에 질문하면 더욱 빠르게 질문을 받아 볼 수 있습니다! [코드팩토리 디스코드] https://bit.ly/3HzRzUM - 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요 다른 건 아니고 강의와 동일하게 프로젝트를 생성하고 기본 코드를 실행시켰는데 FAILURE: Build failed with an exception. * Where: Build file '...(개인정보상 앞 쪽 생략)Desktop/test_proj/android/build.gradle.kts' line: 16 위와 같은 에러가 발생합니다. 처음엔 자바 버전 문제인가 싶어 필독 사항을 자세히 읽어봤는데 에러 메시지가 좀 다른 것 같고.. 구글링을 통해 터미널에서 플러터를 업데이트 해보기도 하고 여러 가지 시도해봤지만 실패해서 글 드립니다..! 파이썬도 해보고 스위프트도 해보고 여러 가지 해봤지만 설정이 빡세네요 ㅋㅋㅋㅋ 그래도 한 번 하는 김에 확실히 배워보고자 합니다..! 답변 주시면 감사하겠습니다!
di 관련해서 문의 좀 드리겠습니다. 선생님 강의를 듣고 get_it, injectable 패키지를 사용해서 di 를 실 프로젝트에도 적용 하고 있습니다. 여러 singleton 으로 생성 한 여러 usecace들을 한군데 모아 둔 usecases(OrderDetailUseCases) 를 만들어 viewModel 에 주입해서 사용하는 것을 보고 실 프로젝트에도 사용하고 있습니다. 아래 처럼요. @singleton class OrderDetailUseCases { final GetOrderDetailUseCase getDetail; final GetGoodsForBasketUseCase getGoodsForBasket; final DeleteOrderUseCase deleteOrder; OrderDetailUseCases( this.getDetail, this.getGoodsForBasket, this.deleteOrder, ); } 그런데 나중에 새로운 usecase(AddOrderUseCase) 가 생겨서 위 OrderDetailUseCases 에 추가하면 아래와 같은 오류가 뜹니다. Bad state: GetIt: Object/factory with type OrderDetailUseCases is not registered inside GetIt. (Did you accidentally do GetIt sl=GetIt.instance(); instead of GetIt sl=GetIt.instance; Did you forget to register it?) 기존에 추가 했던 getDetail, getGooodsForBasket usecase 는 잘 사용하고 있습니다 분명 build runner 명령어를 실행 해 줬음에도 불구하구요. 그래서 DeleteOrderUseCase 는 따로 가져와 viewModel 에 전달해주고 있습니다. 아래처럼요. final orderDetailViewModelProvier = StateNotifierProvider<OrderDetailViewModel, OrderDetailState>((ref) { final useCases = getIt<OrderDetailUseCases>(); final deleteOrderUc = getIt<DeleteOrderUseCase>(); return OrderDetailViewModel( useCases, deleteOrderUc, ); }); 전 하나의 useCases 에 다 넣고 싶거든요..ㅡ,.ㅡ 이게 패키지가 좀 stable 하지 못한 거 같은 느낌인데 이런 경우를 못 보셨는지요? 경우가 있다면 어떻게 해법이 있는지 들어보고 싶습니다.
[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
StatefulWidget 라이프 사이클 실습 세팅하기 편에서 4분 30초쯤 보면 리스트에서는 if 문을 쓸수있는데 Column에는 if 문을 못 쓴다라고 해서 궁금증이 생겼습니다. 다트 문법은 언제 쓸수 있고 없는지 초보자 입장에서 어떻게 구분 하면 될까요?
[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
Error connecting to the service protocol: failed to connect to http://127.0.0.1:53332/dENDykOhUHc=/ DartDevelopmentServiceException: WebSocketChannelException: HttpException: Connection closed before full header was received, uri = http://127.0.0.1:53332/dENDykOhUHc=/ws the Dart compiler exited unexpectedly. 이런 오류가 앱을 실행하려고 누르면 뜨는데 해결방법이 있을까요??.ㅜㅜ
[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
코드팩토리 디스코드에 질문하면 더욱 빠르게 질문을 받아 볼 수 있습니다! [코드팩토리 디스코드] https://bit.ly/3HzRzUM - 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요 강의 잘 듣고 있습니다 ㅎㅎ 다름이 아니라 안드로이드 스튜디오 세팅 중 궁금한 게 생겨서 문의드립니다 알아 보니 최신 버전에서는 Lunch in a tool window emulator on top 위 두 가지 메뉴가 없는 것 같더라구요 일단 Lunch in a tool window 대신 Launch in the Running Devices Tool Window 메뉴가 있길래 체크를 해제해야 하나 고민하고 있던 중 https://www.inflearn.com/community/questions/1384622/%EC%97%90%EB%AE%AC%EB%A0%88%EC%9D%B4%ED%84%B0-%EC%B0%BD%EC%9D%B4-%EB%9C%A8%EC%A7%80-%EC%95%8A%EC%8A%B5%EB%8B%88%EB%8B%A4-%E3%85%A0%E3%85%A0 위 링크 이외에도 강사님께서 직접 남기신 답글들을 여러 개 확인해보니 체크하라고 하시는 답글이 많길래 일단 체크하고 넘겼습니다.(이게 옳은 건지는 모르겠지만요...ㅎ) 두 번째 문제는 영상과 동일하게 Setting 메뉴에 접근해도 emulator on top 메뉴가 없다는 점입니다. 구글링도 해보고 했는데 다들 저 메뉴가 있으시더라구요? 다들 작성 시점이 구버전이라서 그런가 싶기도 한데 뭐 일단 혹시나 하는 마음으로 gpt한테도 물었더니 최신 버전에는 emulator on top 메뉴가 없다고 하더라구요 그래서 확실히 짚고 넘어가고자 글을 올리게 되었습니다 사용환경은 맥북 pro m1 칩 램 16GB 사용 중이며 원격 서비스를 제공해주시는 건 너무나 감사하지만 제대로 알고 넘어가고 싶어서 정중히 사양드립니다 정말 번거로우시겠지만 이에 대한 해답 알려주시면 너무 감사하겠습니다! 좋은 하루 보내세요!
[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
출첵 프로젝트를 진행하면서 !!필독!! 흔한 에러 해결법 적용 후 아래와 같은 오류가 발생합니다. 그리고 지금까지 진행했던 모든 프로젝트도 동일한 문제가 발생을 하고 있습니다. 어디서부터 처리를 해야 할지 몰라 문의드립니다. 수고하세요. Launching lib/main.dart on iPhone 15 Pro in debug mode... Running Xcode build... Xcode build done. 5.0s Failed to build iOS app Uncategorized (Xcode): Command SwiftGeneratePch emitted errors but did not return a nonzero exit code to indicate failure Error (Xcode): no such file or directory: '/Users/cspark/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation' Error (Xcode): stat cache file '/Users/cspark/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphonesimulator18.2-22C146-07b28473f605e47e75261259d3ef3b5a.sdkstatcache' not found Error (Xcode): unable to rename temporary '/Users/cspark/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/1QOPLZ3HJICL2/CoreFoundation-18CWDCA31ANYQ-d0b62197.pcm.tmp' to output file '/Users/cspark/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/1QOPLZ3HJICL2/CoreFoundation-18CWDCA31ANYQ.pcm': 'No such file or directory' Error (Xcode): could not build module 'CoreFoundation' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:5:9 Error (Xcode): could not build module 'Foundation' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:7:8 Error (Xcode): could not build module 'Foundation' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImageDefines.h:18:8 Error (Xcode): could not build module 'Foundation' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceObjC.h:14:8 Error (Xcode): could not build module 'IOSurface' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVPixelBufferIOSurface.h:25:9 Error (Xcode): could not build module 'Foundation' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/EAGL.h:7:9 Error (Xcode): could not build module 'Foundation' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h:7:8 Error (Xcode): could not build module 'Foundation' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CATransform3D.h:11:8 Error (Xcode): could not build module 'Foundation' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/Symbols.framework/Headers/Symbols.h:7:8 Error (Xcode): could not build module 'Foundation' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDomain.h:7:8 Error (Xcode): could not build module 'Foundation' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/NSString+UserNotifications.h:7:8 Error (Xcode): could not build module 'UIKit' /Users/cspark/projects/play/flutters/codefactory/beginner/chool_check/build/ios/Debug-iphonesimulator/Flutter.framework/Headers/FlutterAppDelegate.h:7:8 Error (Xcode): could not build module 'CoreVideo' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CMFormatDescription.h:28:9 Error (Xcode): could not build module 'Flutter' /Users/cspark/projects/play/flutters/codefactory/beginner/chool_check/ios/Runner/GeneratedPluginRegistrant.h:9:8 Error (Xcode): failed to emit precompiled header '/Users/cspark/Library/Developer/Xcode/DerivedData/Runner-emezfpbjmptfqfbicgzbemweekcj/Build/Intermediates.noindex/PrecompiledHeaders/Runner-Bridging-Header-swift_3HPZX5JRZJTXL-clang_1QOPLZ3HJICL2.pch' for bridging header '/Users/cspark/projects/play/flutters/codefactory/beginner/chool_check/ios/Runner/Runner-Bridging-Header.h' Uncategorized (Xcode): Command PrecompileSwiftBridgingHeader emitted errors but did not return a nonzero exit code to indicate failure Uncategorized (Xcode): Command SwiftEmitModule failed with a nonzero exit code Swift Compiler Error (Xcode): No such file or directory: '/Users/cspark/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation' Swift Compiler Error (Xcode): Stat cache file '/Users/cspark/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphonesimulator18.2-22C146-07b28473f605e47e75261259d3ef3b5a.sdkstatcache' not found Swift Compiler Error (Xcode): Clang importer creation failed Could not build the application for the simulator. Error launching application on iPhone 15 Pro.
Error parsing LocalFile: 'C:\Users\DKSYSTEMS\StudioProjects\bmi_calculator\android\app\src\main\AndroidManifest.xml' Please ensure that the android manifest is a valid XML document and try again. 처음 main_screen 만들고 main에서 빈화면이 나오도록 실행을 하면 이러한 에러가 콘솔에 나옵니다. 어떠한 문제일까요??
[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
코드팩토리 디스코드에 질문하면 더욱 빠르게 질문을 받아 볼 수 있습니다! [코드팩토리 디스코드] https://bit.ly/3HzRzUM - 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요. 폰트 파일을 받고 나서 pubspec.yaml 파일에 따로 weight를 설정해주는 이유가 무엇인가요?
[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
247강 api 테스트 진행중인데 현재 에어코리아 대기오염 현황랑 강의랑 요청변수가 달라진 것 같습니다. itemCode, dataGubun, searchCondition이 사라지고 inqBginDt(조회시작일), inqEndDt(조회종료일), msrstnName(측정소명) 이렇게 위 셋이 사라지고 아래 셋이 생겼습니다. 그래서 파라미터를 받는데 어떤 형식으로 받아야할지 몰라서 질문 남깁니다. 샘플데이터가 각각 20201001, 20201030, 강남구인데 어떤 파라미터로 받아야하나요? 그리고 이게 강의 진행에 문제가 될까요? 감사합니다.