小编M K*_*imi的帖子

Azure 构建错误:“Android Gradle 插件需要 Java 11 才能运行。您当前正在使用 Java 1.8”

Flutter在 中构建应用程序时azure devOps,我收到此错误:

Build file 'D:\a\1\s\android\app\build.gradle' line: 24

* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin 'com.android.internal.application'.
   > Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
     You can try some of the following options:
       - changing the IDE settings.
       - changing the JAVA_HOME environment variable.
       - changing `org.gradle.java.home` in `gradle.properties`.
Run Code Online (Sandbox Code Playgroud)

我已经尝试过,这些解决方案:

  • 创建jitpack.yml具有价值的文件- openjdk11
  • 将以下行添加到块app/build.gradle内的文件中android {}

... …

java build azure build.gradle flutter

10
推荐指数
1
解决办法
3268
查看次数

Flutter 中已弃用“canLaunch”

我使用了url_launcher包。

String query = Uri.encodeComponent(Utils.getSelectedStoreAddress());
var appleUrl = 'maps:q=$query';
var googleUrl = 'https://www.google.com/maps/search/?api=1&query=$query';

_launch(appleUrl);
_launch(googleUrl);

Future<void> _launch(String url) async {
await canLaunch(url)
    ? await launch(url)
    : _showSnackBar('could_not_launch_this_app'.tr());
}
Run Code Online (Sandbox Code Playgroud)

一切都很好,直到我收到此警告:

info: 'canLaunch' is deprecated and shouldn't be used. Use canLaunchUrl instead. 
Run Code Online (Sandbox Code Playgroud)

url deprecated flutter url-launcher

9
推荐指数
1
解决办法
2万
查看次数

inputType EditText 中的 textMultiLine 和 textImeMultiLine 有什么区别?

我想明白之间的差别textMultiLine,并 textImeMultiLine为选择android:inputTypeEditText。但是,我一直无法理解答案。文档说

IME 是一种允许用户输入文本的控件。


但我不明白 texMultiLine 与 textImeMultiLine 有何不同。

android multiline android-edittext android-inputtype android-textinputedittext

5
推荐指数
1
解决办法
2188
查看次数