-1

I have an android project which was developed according to API 25 and was running fine. But, now i wanted to change some code in it and i have also updated my Android Studio to 3.0 since(may be that's the problem). Following are the errors i receive :

C:\Users\nutty geek\Desktop\Ankur\app\build\intermediates\res\merged\debug\layout\activity_main.xml:17: error: No resource identifier found for attribute 'headerLayout' in package 'com.nuttygeek.vastucosmos.vastucompass'

C:\Users\nutty geek\Desktop\Ankur\app\build\intermediates\res\merged\debug\layout\activity_main.xml:17: error: No resource identifier found for attribute 'menu' in package 'com.nuttygeek.vastucosmos.vastucompass'

C:\Users\nutty geek\Desktop\Ankur\app\build\intermediates\res\merged\debug\layout\content_main.xml:2: error: No resource identifier found for attribute 'layout_behavior' in package 'com.nuttygeek.vastucosmos.vastucompass'

C:\Users\nutty geek\Desktop\Ankur\app\build\intermediates\res\merged\debug\layout\content_main.xml:2: error: Error: No resource found that matches the given name (at 'layout_behavior' with value '@string/appbar_scrolling_view_behavior').

Failed to execute aapt com.android.ide.common.process.ProcessException: Failed to execute aapt

i also have added this line to gradle.properties :

android.enableAapt2=false

for disabing AAPT2 but it still give some errors.

Questions: 1. Why has this problem occured ? 2. How can i resolve this issue ?

here is the activity_main.xml of the project...

<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
    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/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:openDrawer="start">
    <include
        layout="@layout/app_bar_main"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
    <android.support.design.widget.NavigationView
        android:id="@+id/nav_view"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:fitsSystemWindows="true"
        app:headerLayout="@layout/nav_header_main"
        app:menu="@menu/activity_main_drawer" />
</android.support.v4.widget.DrawerLayout>
Nutty Geek
  • 89
  • 2
  • 7

1 Answers1

-1

Seems like i was your using some features which demanded the need of this dependency. compile 'com.android.support:design:26.1.0'

i added it and the problem is finally solved !

Nutty Geek
  • 89
  • 2
  • 7