Ich folge einem Kurs über das Herunterladen von Android Studio und wie man es einrichten, ich habe die richtigen Treiber für mein Handy heruntergeladen, aber wenn ich versuche, mein Hallo Weltprogramm zu laufen, habe ich Probleme.Nicht in der Lage zu Hallo Welt
Denken Sie daran, dass der Kurs selbst mich riet, eine Datei namens activity_main.xml zu aktualisieren. Das war der vorherige Inhalt der 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:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.udacity.myapplication.MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintLeft_toLeftOf="@+id/activity_main"
app:layout_constraintTop_toTopOf="@+id/activity_main"
app:layout_constraintRight_toRightOf="@+id/activity_main"
app:layout_constraintBottom_toBottomOf="@+id/activity_main" />
</android.support.constraint.ConstraintLayout>
Dieser Codeabschnitt musste aktualisiert werden, um mit den Videos übereinzustimmen. Neues Segment:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.udacity.myapplication.MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!" />
</RelativeLayout>
Wenn ich versuche, hier die App auf meinem Handy zu laufen ist, was ich bekommen:
Error:(7, 28) No resource found that matches the given name (at ‘paddingBottom’ with value ‘@dimen/activity_vertical_margin’).
Error:(8, 26) No resource found that matches the given name (at ‘paddingLeft’ with value ‘@dimen/activity_horizontal_margin’).
Error:(9, 27) No resource found that matches the given name (at ‘paddingRight’ with value ‘@dimen/activity_horizontal_margin’).
Error:(10, 25) No resource found that matches the given name (at ‘paddingTop’ with value ‘@dimen/activity_vertical_margin’).
Error:Execution failed for task ‘:app:processDebugResources’.
Jede Hilfe?
in Ihrer @dimen Datei, haben Sie * 5dp 1dp *? –
yasin