【问题标题】:Android studio error inflating constraint layoutAndroid Studio 错误膨胀约束布局
【发布时间】:2018-04-28 21:53:07
【问题描述】:

Android 工作室掉落 “android.view.InflateException:二进制 XML 文件第 2 行:二进制 XML 文件第 2 行:膨胀类 android.support.constraint.ConstraintLayout 时出错” 当我在 Android Marshmallow 或更低版本上运行我的应用程序时出错。它完美适用于牛轧糖和奥利奥 我添加了“实现'com.android.support.constraint:constraint-layout:1.1.0'”,正如我在其他答案中看到的那样,但它仍然不起作用

xml:

<android.support.constraint.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:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/soros3"
android:padding="0dp"
tools:co0-ntext=".MainActivity">

请帮忙

【问题讨论】:

  • tools:context=".MainActivity"

标签: android


【解决方案1】:

好的 所以我删除了布局的背景并删除了

tools:co0-ntext=".MainActivity"

线,它的工作原理。 我真的不知道为什么,但它有效

【讨论】:

  • 这不是一个有效的属性标签
猜你喜欢
  • 2017-12-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-06-22
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多