小编Jul*_*Pak的帖子

Android 电鳗 Mac M1:运行 flutter doctor -v 时无法找到捆绑的 java 版本

我在更新到电鳗后遇到了 android studio 的问题。更新之前这不是问题。我有 Mac M1,flutter 版本是Flutter 3.3.10 \xe2\x80\xa2 channel stable

\n

运行时,flutter doctor -v我在 android studio 部分得到了这个:

\n
Android Studio (version 2022.1)\n    \xe2\x80\xa2 Android Studio at /Applications/Android Studio.app/Contents\n    \xe2\x80\xa2 Flutter plugin can be installed from:\n       https://plugins.jetbrains.com/plugin/9212-flutter\n    \xe2\x80\xa2 Dart plugin can be installed from:\n       https://plugins.jetbrains.com/plugin/6351-dart\n    \xe2\x9c\x97 Unable to find bundled Java version.\n    \xe2\x80\xa2 Try updating or re-installing Android Studio.\n
Run Code Online (Sandbox Code Playgroud)\n

我该如何解决这个问题?

\n

android-studio flutter flutter-doctor

7
推荐指数
3
解决办法
1247
查看次数

flutter firebase 应用程序未在 Android 上运行:未指定命名空间

尝试在 Android 模拟器上运行时,我不断收到错误消息。我在这个应用程序中的应用程序付款中有 firebasecore 和 Square。这是错误:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':package_info_plus'.
> Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
   > Namespace not specified. Please specify a namespace in the module's build.gradle file like so:

     android {
         namespace 'com.example.namespace'
     }

     If the package attribute is specified in the source AndroidManifest.xml, it can be migrated automatically to the namespace value in the build.gradle file using the AGP Upgrade Assistant; please …
Run Code Online (Sandbox Code Playgroud)

android gradle firebase gradlew flutter

5
推荐指数
2
解决办法
8969
查看次数

如何在 TextFormfield flutter 2.0.1 中关闭键盘

嘿,我该如何关闭这里的键盘?我希望键盘在该区域外点击时关闭。

  Widget build(BuildContext context) {
return Padding(
  padding: const EdgeInsets.fromLTRB(15, 0, 15, 0),
  child: TextFormField(
    keyboardType: TextInputType.number,
    maxLength: 10,
    controller: widget._phoneController,
    onTap: () => FocusScope.of(context).unfocus(),
    inputFormatters: [
      //input type
      FilteringTextInputFormatter.allow(
        RegExp(r'[0-9]'),
      ),
    ],
    //how the text box is decorated
    decoration: buildInputDecoration(
        Icons.phone, 'Enter your 10 digit phone number'),
  ),
);
}
Run Code Online (Sandbox Code Playgroud)

flutter flutter2.0

4
推荐指数
1
解决办法
6727
查看次数

mac M1 cocoapods 正确的架构吗?flutter run 无法正确安装 pod

我在我的 mac M1 上遇到了一些关于 cocoapods 和架构的问题。这是我这样做时得到的flutter run

控制台输出

我认为这是架构的问题。arch当我在终端中运行时它显示i386

然而,当我从 vscode 终端运行 arch 时,这就是我得到的 在此输入图像描述

cocoapods flutter apple-m1

3
推荐指数
1
解决办法
6158
查看次数

Flutter Android 无法解析类 GradleException @ 第 11 行,第 15 列

由于某种原因,我的项目中出现了 gradle 错误。在应用程序级别 build.gradle 中,我收到此错误Unable to resolve class GradleException @ line 11, column 15.,其中“GradleException”下面有红色波浪线:

if (flutterRoot == null) {
    throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
Run Code Online (Sandbox Code Playgroud)

android gradle firebase gradlew flutter

3
推荐指数
1
解决办法
4146
查看次数