1
This is a basic program on android to display 2 texviews and 1 button.

I am not able to run the below code on my phone. The below has been done in android studio.

This is my code-
    <LinearLayout
        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"
        android:orientation="vertical"
        tools:context=".MainActivity">
    <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="QUANTITY"
            />
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="0"
                android:textStyle="bold"
             />
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="ORDER"
            />

[enter image description here

Psypher
  • 10,717
  • 12
  • 59
  • 83
Dev
  • 62
  • 7
  • Have a look at this, Duplicate [aapt2 missing](https://stackoverflow.com/questions/46988102/errorcom-android-tools-aapt2-aapt2exception-aapt2-error-check-logs-for-detail) – chandan Jun 10 '18 at 13:42
  • 1
    Possible duplicate of [Android Studio - How to Change Android SDK Path](https://stackoverflow.com/questions/16581752/android-studio-how-to-change-android-sdk-path) – Psypher Jun 10 '18 at 13:51

1 Answers1

1

It looks like you have corrupted build tools 27.0.3. Delete the directory C:\Users\dmgop\AppData\Local\Android\Sdk\build-tools\27.0.3\, go to the SDK Manager in Android Studio and re-download build tools 27.0.3. This should fix the issue for you.

Izabela Orlowska
  • 7,431
  • 2
  • 20
  • 33