android - 无法加载 AppCompat ActionBar,出现未知错误。Android Studio 3.1.3

标签 android android-layout android-studio

这是我第一次使用 Android studio,我不知道这些错误是什么意思,也不知道它们意味着什么在这里输入图像描述

[Render Problem Failed to load AppCompat ActionBar with unknown error. Missing Constraints in ConstraintLayout

This view is not constrained. It only has designtime positions, so it will jump to (0,0) at runtime unless you add the constraints The layout editor allows you to place widgets anywhere on the canvas, and it records the current position with designtime attributes (such as layout_editor_absoluteX). These attributes are not applied at runtime, so if you push your layout on a device, the widgets may appear in a different location than shown in the editor. To fix this, make sure a widget has both horizontal and vertical constraints by dragging from the edge connections.]

Render Problem

Gradle Project

enter image description here

enter image description here

最佳答案

打开,res --> values --> styles.xml,在这里你会发现这样一行:

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">

DarkActionBar 更改为 NoActionBar

关于android - 无法加载 AppCompat ActionBar,出现未知错误。Android Studio 3.1.3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50940219/

相关文章:

java - 如何运行后台服务,即使应用程序在 MI 设备中被杀死

java - Bitmap.decodeResource 调整图像大小

android - 无法解析 : com. android.support :appcompat-v7:22. 2.1

java - 我无法安装Android Studio(找不到JDK)

java - 检测 POJO 类中哪个字段!= null?

java - 使用 gradle 构建 Cordova 项目时覆盖 Java 版本

android - 我如何开发 Android 应用程序以在不同的屏幕分辨率下工作

android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色

java - 安卓设计: onDraw() not called after invalidate()

java - 循环中的 getLayoutInflater().inflate() 总是返回第一个 View