i18n无法正常工作

i18n无法正常工作

本文介绍了Android Studio:插件flutter-i18n无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在连接了flutter-i18n插件的Android Studio中创建"flutter项目"时,没有创建lib/generated/i18n.dart.因此,没有文档文档中所述的可行的机械化机制.

When i create 'flutter project' in Android Studio with flutter-i18n plugin connected there's no lib/generated/i18n.dart created. So no working mechanizm for internazionalization as described in doc.

我的设置是:

[✓] Flutter (Channel stable, v1.0.0, on Linux, locale en_US.UTF-8)
    • Flutter version 1.0.0 at /home/valerius/DevTools/Flutter
    • Framework revision 5391447fae (3 months ago), 2018-11-29 19:41:26 -0800
    • Engine revision 7375a0f414
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at /home/valerius/Android/Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /home/valerius/DevTools/AStudio/182.5264788/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[✓] Android Studio (version 3.3)
    • Android Studio at /home/valerius/DevTools/AStudio/182.5264788
    • Flutter plugin version 33.1.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)


Android Studio 3.3.1
Build #AI-182.5107.16.33.5264788, built on January 29, 2019
JRE: 1.8.0_152-release-1248-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-45-generic

推荐答案

只需检查.idea文件夹中是否存在 misc.xml 文件.

Just check if the file: misc.xml exists inside of .idea folder.

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ExternalStorageConfigurationManager" enabled="true" />
  <component name="NodePackageJsonFileManager">
    <packageJsonPaths />
  </component>
  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
    <output url="file://$PROJECT_DIR$/out" />
  </component>
</project>

这篇关于Android Studio:插件flutter-i18n无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 12:39