2017-12-07 3 views
0

Das ist mein Code:Ich erhalte eine Fehlermeldung, wenn ich versuche, mein Projekt auf Android Studio laufen

protected void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); 
    setContentView(R.layout.activity_main); 

} 

und diese XML-Datei:

<?xml version="1.0" encoding="utf-8"?> 
<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:layout_width="match_parent" 
android:layout_height="match_parent" 
tools:context="com.khanousse.lite.MainActivity" 
tools:layout_editor_absoluteX="8dp" 
tools:layout_editor_absoluteY="25dp"> 


<TextView 
    android:id="@+id/textView" 
    android:layout_width="298dp" 
    android:layout_height="182dp" 
    android:text="Hello World" 
    android:textSize="30sp" /> 
    </android.support.constraint.ConstraintLayout> 

ich nicht, warum ich diese Fehlermeldung erhalten:

Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. >java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $

+0

ist dies Ihr einziger Code? Ich bitte dich nicht, deinen ganzen Code zu posten. Ich schätze, es gibt ein Problem in deinem Array –

Antwort

0

ich hatte dieses Problem früher, ich gelöst es nur um

  1. Reinigen Sie Ihr Projekt build>clean
  2. Projekt neu build>rebuild
Verwandte Themen