6
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【flutter】firebase登録時にsetting.gradeでのエラー

Posted at
pubspec.yaml
dependencies:
  flutter:
    sdk: flutter
  provider: ^4.1.3
  firebase_core: ^0.4.5
  cloud_firestore: ^0.13.7

firebase_core,cloud_firestoreを登録した際に

**Plugin project :firebase_core_web not found. Please update settings.gradle.**
**Plugin project :cloud_firestore_web not found. Please update settings.gradle.**

のようなエラーが出力された。

この時、以下のような対応でエラーを解消した。

ステップ1 minsdkを16-21に変更

build.grade
 defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.example.trainingmaxapp"
        minSdkVersion 21 //16から21に変更
        targetSdkVersion 28
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }

ステップ2 setting.gradeを追加する

setting.grade
include ':app'

def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()

def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
    pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}

plugins.each { name, path ->
    def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
    include ":$name"
    project(":$name").projectDir = pluginDirectory
}

これでエラーが解消される。

6
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?