skip to Main Content

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

Answers


  1. Chosen as BEST ANSWER

    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


  2. 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

    Login or Signup to reply.
  3. 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)

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search