Android Studio layout designer creates numbers in Persian

287 Views Asked by At

When I manually design layouts using the Android Studio layout designer, the margin numbers are created in Persian format and the designer does not work properly. This has been happening since I updated 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>

Note My operating system is Windows and has two languages, Persian and English

3

There are 3 best solutions below

0
On BEST ANSWER

Android Studio has banned Iran in new versions. There are several ways you can hide your identity. For example, change the clock of your operating system

1
On

Finally I found the solution. This is due to Google sanctions on the new version of Android Studio.

Solution in Windows 10: setting -> time & language -> region -> select united states in country or region drop down

0
On

This is a new bug with local datetime formats (such as Persian in this case) in logcat in Android Studio versions equal or newer than 4.2.

We have to use English (United States) format in region settings to avoid this problem. (Tested in both ver 4.2 and Arctic fox)

Solution: In windows 10 Go to Control Panel > Region > Formats tab > Change format to English (United States)