Error inflating class ConstraintLayout
Ich habe Probleme mit Android Studio. Ich habe vor kurzem aktualisiert mein SDK-Manager zu gehören;
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta5'
classpath ist
classpath 'com.android.tools.build:gradle:2.2.3'
Projekt baut gut. Intellisense und Dokumentation funktioniert. Aber wenn ich versuche zu laufen (in debug) die app auf meinem Handy, ich bekomme diese Fehlermeldung;
Caused by: android.view.InflateException: Binary XML file line #2:
Binary XML file line #2: Error inflating class ConstraintLayout
at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:443)
at android.app.Activity.setContentView(Activity.java:2172)
Ich synchronisiert haben, gradle. Ich habe neu gestartet, Android-Studio. Ich habe gereinigt und wieder aufgebaut und das Projekt.
Irgendwelche Ideen auf, wie man dieses Problem beheben?
danke!
- - edit - -
XML sieht wie folgt aus;
<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/PLAY_PARENT"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/greenfelt2"
android:padding="0dp">
fügen Sie Ihre xml-code.
InformationsquelleAutor ausgeorge | 2017-02-28
Du musst angemeldet sein, um einen Kommentar abzugeben.
Sollten Sie hinzufügen, wie unten
compile 'com.android.support.constraint:constraint-layout:1.0.2'
Für die neueste Version überprüfen Sie hier
überprüfen Sie heraus dieses Projekt für mehr auf ConstraintLayout github.com/Arjun-sna/android-constraintlayout-demo
Wenn Sie Warnungen, aktuelle version: 'com.android.Unterstützung.constraint:constraint-layout:1.0.2'
nur ein update. Neue version der constraint-layout aus.
1.1.0
InformationsquelleAutor arjun
Kann es mehrere Gründe
Abhängigkeit version Problem (gleiche wie oben)
out-of-memory-Problem : In meinem Fall habe ich Hinzugefügt wurde das Bild in hoher Auflösung für hintergrund der constraint-layout oder auf der gleichen Seite(.xml-Datei), die wir verwendet das Bild in hoher Auflösung, für jede Bildansicht Quelle.
InformationsquelleAutor Kona Suresh
Ich hatte das gleiche Problem, die app läuft einwandfrei in anderen Handys, bekam aber diese Ausnahme mit einem ZTE-Gerät. Ich habe es behoben durch das deaktivieren der Sofortigen Ausführung im Android Studio.
InformationsquelleAutor manuel