-2

Here's my code, I have no idea what is wrong with it I am completely new at this and I would appreciate it a lot if I can receive some feedback thanks:)When I try to launch my app in the emulator it tells me I can't because of theses errors:

  1. Error:Error: Duplicate resources: C:\Users\Kam\AndroidStudioProjects\SchoolAid5\app\src\main\res\layout-ldltr-v14\activity_my.xml:layout-ldltr-v17/activity_my, C:\Users\Kam\AndroidStudioProjects\SchoolAid5\app\src\main\res\layout-ldltr\activity_my.xml:layout-ldltr-v17/activity_my

  2. Error:Execution failed for task ':app:mergeDebugResources'. C:\Users\Kam\AndroidStudioProjects\SchoolAid5\app\src\main\res\layout-ldltr-v14\activity_my.xml: Error: Duplicate resources: C:\Users\Kam\AndroidStudioProjects\SchoolAid5\app\src\main\res\layout-ldltr-v14\activity_my.xml:layout-ldltr-v17/activity_my, C:\Users\Kam\AndroidStudioProjects\SchoolAid5\app\src\main\res\layout-ldltr\activity_my.xml:layout-ldltr-v17/activity_my

and here is my code where theres errors are:

`

<GridLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:id="@+id/gridlayout"
        android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true">

        <Button
            android:layout_width="match_parent"
            android:layout_height="100dp"
            android:id="@+id/button1classes"
            android:layout_row="0"
            android:layout_column="0"
            android:textAlignment="textStart"
            android:textSize="25sp"
            android:textColor="#ffffffff"
            android:text="@string/classes"
            android:width="150dp"
            android:onClick="onOpenclasses_screen"/>

        <Button
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/homework"
            android:id="@+id/button2homework"
            android:layout_row="1"
            android:layout_column="0"
            android:clickable="true"
            android:width="150dp"
            android:height="100dp"
            android:textSize="25sp"
            android:textAlignment="textStart"
            android:textColor="#ffffffff" />

        <Button
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/notes"
            android:id="@+id/button3notes"
            android:layout_row="2"
            android:layout_column="0"
            android:clickable="true"
            android:height="100dp"
            android:textColor="#ffffffff"
            android:textSize="25sp"
            android:width="150dp" />

        <Button
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/calendar"
            android:id="@+id/button2calendar"
            android:layout_row="3"
            android:layout_column="0"
            android:clickable="true"
            android:height="100dp"
            android:textColor="#ffffffff"
            android:textSize="25sp"
            android:width="125dp" />

        <Button
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/share"
            android:id="@+id/button3share"
            android:layout_row="4"
            android:layout_column="0"
            android:clickable="true"
            android:height="100dp"
            android:textColor="#ffffffff"
            android:textSize="25sp"
             />
    </GridLayout>
</LinearLayout>

keep in mind I am a complete noob just trying to build an app for a project. I could really use help for this and for the future of my project. Thanks again sorry for the long post.

Tiny
  • 27,221
  • 105
  • 339
  • 599
Kamran
  • 1

1 Answers1

0

Looks like you may have duplicate activity_my.xml files. Make sure that only one file will be accessed by a given device. If you just want to target all devices with one layout. Simply put all layouts in res/layout/ and delete the deeper layout dirs.

Cory Roy
  • 5,379
  • 2
  • 28
  • 47