我正在尝试向我的小部件添加一些填充,但遇到了这个问题:
TextButton(
style: ButtonStyle(
padding: EdgeInsets.symmetric(vertical: 20.0, horizontal: 60.0),
),
onPressed: () {}, child: const Text('Text'),
),
Run Code Online (Sandbox Code Playgroud)
在开始一个新的 Flutter 项目后,我想在我的项目中使用 Firebase,我在项目中添加了以下内容:
firebase_core并firebase_auth于pubspec.yamlclasspath 'com.google.gms:google-services:4.3.6'到android/build.gradleimplementation platform('com.google.firebase:firebase-bom:28.0.0')在“依赖关系”在应用/的build.gradle到目前为止一切正常,但在将此行添加到app/build.gradle 之后:
apply plugin: 'com.google.gms.google-services'添加此行后,即使没有编辑应用程序代码,我也收到以下错误消息:
Launching lib\main.dart on sdk gphone x86 arm in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\1337\StudioProjects\teest\android\build.gradle' line: 27
* What went wrong:
A problem occurred evaluating root project 'android'.
> A problem occurred configuring project ':app'.
> org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method setVariantDir() …Run Code Online (Sandbox Code Playgroud)