【问题标题】:Android Studio layout designer creates numbers in PersianAndroid Studio 布局设计器用波斯语创建数字
【发布时间】:2021-10-28 14:06:12
【问题描述】:

当我使用 Android Studio 布局设计器手动设计布局时,边距数字以波斯格式创建,并且设计器无法正常工作。 自从我更新 Android Studio 以来,这种情况一直在发生。

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <TextView
        android:id="@+id/tryAgain"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        tools:layout_editor_absoluteX="۳۲dp"
        tools:layout_editor_absoluteY="۳۴dp" />

</androidx.constraintlayout.widget.ConstraintLayout>

注意我的操作系统是 Windows,有两种语言,波斯语和英语

【问题讨论】:

    标签: android android-studio android-layout intellij-idea android-layout-editor


    【解决方案1】:

    我终于找到了解决方案。这是由于 Google 对新版 Android Studio 的制裁。

    Windows 10 中的解决方案:设置 -> 时间和语言 -> 地区 -> 在国家或地区下拉菜单中选择美国

    【讨论】:

      【解决方案2】:

      Android Studio 已在新版本中禁止伊朗。有几种方法可以隐藏您的身份。例如,更改操作系统的时钟

      【讨论】:

        【解决方案3】:

        这是 Android Studio 版本等于或高于 4.2 的 logcat 中本地日期时间格式(例如本例中的波斯语)的一个新错误。

        我们必须在区域设置中使用英语(美国)格式来避免这个问题。 (在 4.2 版和北极狐中测试)

        解决方案:在 windows 10 中,转到控制面板 > 区域 > 格式选项卡 > 将格式更改为英语(美国)

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多