首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >flutter项目没有应用程序级构建gradle依赖项部分

flutter项目没有应用程序级构建gradle依赖项部分
EN

Stack Overflow用户
提问于 2020-10-13 15:30:41
回答 1查看 177关注 0票数 1

Flutter项目在应用程序级别的build中没有依赖项部分,我无法手动添加它,因为它也没有显示任何建议

代码语言:javascript
复制
android {
    compileSdkVersion 29

    lintOptions {
        disable 'InvalidPackage'
    }

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.example.flutter_app"
        minSdkVersion 16
        targetSdkVersion 29
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }

    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 '../..'
}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-10-13 15:47:05

您可以在下面添加依赖项。

代码语言:javascript
复制
 flutter {
   source '../..'
 }

就像这样:

代码语言:javascript
复制
flutter {
   source '../..'
 }

dependencies {
  // implementation 'com.google.firebase:firebase-analytics:17.2.0'
  implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  testImplementation 'junit:junit:4.12'
  androidTestImplementation 'androidx.test:runner:1.1.1'
  androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
  implementation "androidx.appcompat:appcompat:1.2.0"
  implementation 'com.facebook.android:facebook-marketing:[4,5)' 
  implementation 'com.facebook.android:facebook-android-sdk:[5,6)'
  implementation 'com.google.firebase:firebase-messaging:7.0.2'
 }

 apply plugin: 'com.google.gms.google-services'
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64338328

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档