-1

I am new at using Android Studio, but I am quite alright in Java. So I tried to make a Hello World class in Android Studio and it didn't work. The ide gave two errors I had no clue what to do. Here is the piece of code that was giving me the "Attribute is missing the Android namespace prefix"

    <style name="AppTheme.NoActionBar">
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">
    <item name="coordinatorLayoutStyle">
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content">
        @style/Widget.Design.CoordinatorLayout</item>
    </style>

This next piece of code gives me this error "The view is not constrained. It only has designtime positions, so it will jump to (0,0), at runtime unless you add the constraints."

<EditText
    android:id="@+id/HelloWorld"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:ems="10"
    android:inputType="textPersonName"
    android:text="Hello World"
    android:textColor="?android:attr/colorBackground"
    tools:layout_editor_absoluteX="70dp"
    tools:layout_editor_absoluteY="91dp" />

Well, I was trying to follow this tutorial on how to set up Android Studio and how to make a program on it. Well, the guy in the video didn't receive any when he loaded up his program but I did.

  • Please include the exact text of any error messages in the body of the question. BBut if you search for that first message you get the answer: https://stackoverflow.com/q/20342990/1531971 The second is answered here: https://stackoverflow.com/q/37817537/1531971 (If these do not help, then you need to say why, and provide more details about why it doesn't help in your case.) –  Sep 26 '18 at 21:13
  • Thanks for the help. I can't really provide more info as I am quite new to Android Studio and have very little idea in what I am doing. – user10201106 Sep 26 '18 at 22:10
  • Possible duplicate of [This view is not constrained, it only has designtime positions, so it will jump to (0,0) unless you add constraints The](https://stackoverflow.com/questions/45226854/this-view-is-not-constrained-it-only-has-designtime-positions-so-it-will-jump) –  Sep 27 '18 at 14:06

1 Answers1

0

The first error is caused by name it should be android:name

The second error is caused when you use a "Constraint Layout" and don't add any constraints. I suggest looking at the layout overview here: https://developer.android.com/guide/topics/ui/declaring-layout

Then look at this video about constraint layouts: https://developer.android.com/training/constraint-layout/

Ves
  • 387
  • 2
  • 10