카테고리 없음

firebase core 설치

T:iA 2021. 12. 21. 18:15

flutter 를 시작해겠다. 

 

flutter를 시작하면서 정리를 하면서 내가 필요한 것을 적어볼려고 한다. 

먼저 코어 설치이다. 

flutter와 함께 쉽게 쓸수 있는 것이기에 참고하기 바랍니다.

 

기본적으로 프로젝트를 만들줄 알것이라고 생각하고 바로 들어가겠습니다. 

 

오늘 기준으로 

firebase_core: ^1.10.6

pubspec.yaml 에 추가를 하고,  

 

main.dart에서 추가를 해보자.

import 'package:flutter/material.dart';
void main() async{
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp();
  runApp(MyApp());
}

 

이상없이 실행된다면 잘 적용되고 있다는 것입니다.

 

혹시... 오류가 생긴다면..

 

flutter Suggestion: use a compatible library with a minSdk of at most 16,  or increase this project's minSdk version to at least 19,  or use tools:overrideLibrary="com.google.firebase.firebase_analytics" to force usage (may lead to runtime failures)

 

요게 나온다면...

build.gradle 에서 

minSdkVersion 19

수정해야합니다!!! 꼭!!