我在更新到电鳗后遇到了 android studio 的问题。更新之前这不是问题。我有 Mac M1,flutter 版本是Flutter 3.3.10 \xe2\x80\xa2 channel stable
运行时,flutter doctor -v我在 android studio 部分得到了这个:
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.\nRun Code Online (Sandbox Code Playgroud)\n我该如何解决这个问题?
\n尝试在 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) 嘿,我该如何关闭这里的键盘?我希望键盘在该区域外点击时关闭。
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) 我在我的 mac M1 上遇到了一些关于 cocoapods 和架构的问题。这是我这样做时得到的flutter run
我认为这是架构的问题。arch当我在终端中运行时它显示i386
由于某种原因,我的项目中出现了 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)