小编Att*_*man的帖子

Android studio 4.0编辑器窗口消失了

我在 Windows 10 (1909) 版本上使用 Android studio v 4.0。一切都工作正常,直到昨晚我的代码编辑器窗口消失了。

我尝试了以下

  • 重启并使缓存失效
  • 检查更新
  • 重置默认布局 (shift+F12) [窗口 -> 恢复默认布局]
  • 尝试将文件拖到中心打开(编辑器永远不会出现,但面包屑会更新每个选定文件或打开的屏幕截图,如下所示)

在此输入图像描述

许多其他组件也会受到影响,例如

  • Logcat 没有显示任何内容
  • 事件日志没有显示任何内容
  • 构建和同步没有显示任何内容

另一件奇怪的事情是我无法打开设置 [文件 -> 设置](它什么也不显示)

Android Studio 4.0 代码编辑器窗口消失了

这是我安装的 android studio 的关于部分 安卓工作室4.0

idea.log1 包含此异常

2020-06-27 12:26:01,693 [5987243]  ERROR - enapi.editor.impl.SettingsImpl - Error determining tab size 
java.lang.NullPointerException
    at com.intellij.openapi.editor.impl.SettingsImpl.getTabSize(SettingsImpl.java:377)
    at com.intellij.openapi.editor.ex.util.EditorUtil.getTabSize(EditorUtil.java:342)
    at com.intellij.openapi.editor.impl.view.EditorView.getTabSize(EditorView.java:547)
    at com.intellij.openapi.editor.impl.view.LogicalPositionCache.reset(LogicalPositionCache.java:75)
    at com.intellij.openapi.editor.impl.view.EditorView.reinitSettings(EditorView.java:344)
    at com.intellij.openapi.editor.impl.EditorImpl.<init>(EditorImpl.java:501)
    at com.intellij.openapi.editor.impl.EditorFactoryImpl.createEditor(EditorFactoryImpl.java:200)
    at com.intellij.openapi.editor.impl.EditorFactoryImpl.createViewer(EditorFactoryImpl.java:170)
    at com.intellij.execution.impl.ConsoleViewUtil.setupConsoleEditor(ConsoleViewUtil.java:56)
    at com.android.tools.idea.welcome.wizard.deprecated.ProgressStep.<init>(ProgressStep.java:61)
    at com.android.tools.idea.sdk.wizard.VmWizard$SetupProgressStep.<init>(VmWizard.java:132)
    at com.android.tools.idea.sdk.wizard.VmWizard$VmPath.init(VmWizard.java:251)
    at com.android.tools.idea.wizard.dynamic.DynamicWizardPath.attachToWizard(DynamicWizardPath.java:98)
    at com.android.tools.idea.wizard.dynamic.DynamicWizard.addPath(DynamicWizard.java:233)
    at com.android.tools.idea.sdk.wizard.VmWizard.<init>(VmWizard.java:68)
    at com.android.tools.idea.sdk.install.VmInstallListener.lambda$statusChanged$0(VmInstallListener.java:58)
    at com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:154)
    at …
Run Code Online (Sandbox Code Playgroud)

android code-editor android-studio-4.0

6
推荐指数
2
解决办法
1108
查看次数

如何为 otp 添加自动填充建议

我在一些应用程序(不记得名字)中看到,在文本框下,会显示一个小弹出窗口,上面写着

自动填充消息中的代码

我想向我的应用程序添加类似的功能。按照文档中的建议添加自动填充提示并设置自动填充重要性以实现此行为。我都尝试过,但都没有成功。我尝试过以下操作

        <com.google.android.material.textfield.TextInputLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/tv_login"
        android:layout_marginTop="@dimen/x60"
        android:id="@+id/pin"
        app:errorEnabled="true"
        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
        android:layout_centerHorizontal="true">
        <com.google.android.material.textfield.TextInputEditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="PIN"
            android:drawablePadding="@dimen/x16"
            android:inputType="number"
            android:maxLength="6"
            android:id="@+id/et_pin"
            android:importantForAutofill="yes"
            android:autofillHints=".AUTOFILL_HINT_SMS_OTP"
            android:drawableStart="@drawable/ic_pin"/>
    </com.google.android.material.textfield.TextInputLayout>
Run Code Online (Sandbox Code Playgroud)

我想在我的应用程序中得到这种类型的东西

在此输入图像描述

android message autofill one-time-password

4
推荐指数
1
解决办法
3万
查看次数