gpt4 book ai didi

android - 更新至3.5.2后,Android Studio的行为异常

转载 作者:行者123 更新时间:2023-12-03 05:32:17 29 4
gpt4 key购买 nike

将Android Studio更新为3.5.2及其插件后,会发生各种类型的问题。他们之中有一些是:

  • 将所有XML代码转换为某种未知的不可处理的文本格式。
  • 失败的gradle同步
  • paddinglayout_margin这样的Android XML属性显示为未知属性
  • 部署
  • LinearLayouts时不会抛出诸如缺少宽度或高度
  • 之类的错误
  • ImageButton无法自动将图像处理为给定大小。

  • 以下是来自不同文件的代码:

    简单 View 的XML
    <?xml version="1.0" encoding="utf-8"?>
    <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".view.HomeActivity"
    android:padding="18dp"> <!-- Padding: No such attribute -->

    <TextView
    android:id="@+id/appTitleText"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/app_name"
    android:textSize="28sp"
    android:textColor="@color/colorPrimaryDark"
    android:fontFamily="@font/comfortaa_variablefont_wght"
    android:textStyle="bold"
    android:layout_margin="8dp"
    app:layout_constraintTop_toTopOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintEnd_toEndOf="parent"/>
    <!-- Margin: No such attribute -->

    </androidx.constraintlayout.widget.ConstraintLayout>

    变形 View 的XML
    �PNG


    IHDR � � ��o� tEXtSoftware Adobe ImageReadyq�e< �IDATx��]}�$�w�2#+�$'�O����#w~$.��
    �;0�M��6'x{E�?�O1�Q?b�0Y&�h���^��Vcrk�d
    L��]�da�eR����uuUw����t��<^��ꞩ߾zU��jC��&I��C�C�?�YQK���Cm�h.|��/���� �D���~_�}�����A3�t��
    ��)����k~Y�|^d�as��q��I�ڧ�n�/�^�҅B�S�"=T�ڥ�^�eZ�Â�bЬO���o>�T�9߄So���7g��v����n��{��ۖ�)�JP�V%�j�����.��ˆ�>�;�W�c�?fЬ:�7H,�����`�I8��Ih6�P*A񂢔h9�N�kM�G�P�B<p�#^lI˄u��ׂf�)�T���]u�9b���>��c��>�%�B�o���G���K�P*��|Q���Vk��B��Ҁ���9ӄ����~�o���W�~�w1h�C��"ˑ��@c��jEl Ht=m'

    �Ի��l��8�7�4`anAZ�C�9�J<���A���S��T���:
    GqTv�RY��6�td����W ��! �g���b���tZ�"=wfN�M��w���;�"����!�k���<t�C0y|Rv�B9h�P��
    ��� ��$���|� ��y;|冯�GG����Z��Tb�)��H& �E|K!I5>@���64K������#�'� (�V��P�\���V�N� Yکǎ�J��5�j<7�,�~�Ҵ�
    `H��g
    u���raZ\/y�6���� Y]�z����ƈ�fY����nM�)겠m��L�%>+� �4kMNXF�%M�7vЕ9�.I�0 ��r�]Q�H>��5���oU"�j��o5�9����u�=�/�\�Z>�:��Xl�$i*{6��i�fK�g"�@`�$[L:I&�z�G(͖���ʼn6��MJ�r-҃N�c���]$MZ�iB�VI?�ݓ3�F��1�����j�]�N�_(x�X�\��Y�i3��0�i�P�� 4���K�wCf7i�O��t�v���KQ��#x��4[������K��?E�����n�-h-���k)��@�;��z�ӽT�k�������ֶ�ؔkZ�h�JK|���Ru`�MQ��aO��[�f�����m��V��g~�A�u��!��u�ϼ�L���K+�A��'�JN7�+�/_P�B� 塲� �5ȺN�g��$�e��񻨼\(�zAT��Ȯ�nJ��z�E� �f%@c\R9��4<���0���\P].���5�k�_�7m��l�~��=�ZX8��RT����p��C0rud-���-h����O����{��T����0�%m ��� µ�,��m[��]���뿂�,�/�N����#?~Fo�7ľ��C3��Թ]s��&V*��W? ���t�ĔWϯ���r�{���7�
    �H��=�9���l��|F�6
    ��������1�4W��Qp��A�xnj������LF/嘗���Y�4��?�P�Z9 �� ��������T��#x2�����c{�w
    Y_�?����A��_�vϠ�
    E�U�w�&���������7{��B*Рs��.�a��Qh�א7�%���b��b��H��Z���+���,�Y0jC��'}'�of���c����ߓHdH�6����^��|���!x��
    ����;�l�x7v���A7��o}��u�=�M!Z�
    ��J��գ�`ϟ��mNFbW���:��J�T�{��NL�ʂ�V��'HZ����էי��.[�l��y���Y"�C����j�+7���g�#��'���]�O�FGI޿mHir��Wu����W6�\�{.�;�d>M�`[c�cۣ� ����`����7&'��K��U�����ϵQR�^�{ֳ��r��J�Ӵ���5��L��S��u�����8��c�Dɗ� ���0�2&�ǕOʛdR��u&=���s��y%��1}?l{� bALj�4���* �w�^�e����g�鏜��ڐw�?�,�~��<1)�#���>볯w=།���W�٫4X 4�
    �8����`�:k��A��충� �됳���<Ng?m�d�o�F��ykFʤmĘ�C
    ��gC3�ۂv���a2�AA�Eep�BE�}I���I��P>�W��]�O�h���h�gO/Wv} �!
    ��r���-�\�`}��ԀX��t�
    �>.t�1�g[���$��އ..�gZ��ƱX���,�̞4m\��4}�� ��.,�%�Q�ѧQ�O�sûA�̏4�-QЬ�
    �8��]�A{���k��Z���cFԶy&&��Nc��O�s�v��C-�9��P4����Q5~�J�Ԇ��Ϗ��
    SK�DLݍR�h����D�JRC3.���� 5���niB'���a7��?����n��g��iR��
    �󢏞L�8�1)k���dy�5됛�)M���4�9�\~}�����X��9
    ��y��`�ׯӮ�b#ji\�l-�V�D8M\~���d��0B/Z�'�q��OF������:$�i)�a&����5�d��>;
    XZN�e}��i,�~5��ב�7m�%6:��][�G�NG�UL��X`-�2��:�{�ICVxXf�]'� ���4I'��̦����u]�_a���ϕ^��4����)䴟�s5u��)iVxc�t1����0=��e��'i/u�ɪ��r��>I��
    �̣�s�G_j;L���/����eS�D?`;��9�/��(��4����
    Y�}��b0,;����L�vcGO�S��yZ[`nrWyj�X�m}(����o�'�S@�>��HH!1��di���Y�%K�s�i��J�[I�|�%]a?��l6�N^ �

    Gradle文件
    apply plugin: 'com.android.application'
    apply plugin: 'kotlin-android-extensions'
    apply plugin: 'kotlin-android'

    android {
    compileSdkVersion 29
    buildToolsVersion "29.0.1"
    defaultConfig {
    applicationId "com.oobs.juncos"
    minSdkVersion 22
    targetSdkVersion 29
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
    release {
    minifyEnabled false
    proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
    }
    compileOptions {
    sourceCompatibility = 1.8
    targetCompatibility = 1.8
    }
    }

    dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation 'com.google.android.material:material:1.0.0'

    implementation 'com.squareup.okhttp3:okhttp:3.10.0'
    implementation 'com.google.firebase:firebase-messaging:20.0.0'
    implementation "androidx.core:core-ktx:+"
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    }

    apply plugin: 'com.google.gms.google-services'
    repositories {
    mavenCentral()
    }

    我尝试重新检查gradle和其他文件,但没有任何改善。

    最佳答案

    一种稳定的解决方案(对于Linux用户)

    卸载整个Android Studio并重新安装而不导入以前的设置将解决此问题。

    关于android - 更新至3.5.2后,Android Studio的行为异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58760391/

    29 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com