0

My project contains two modules namely admin and user. The user module works without any error however the admin module throws compile time error as follows:

error: style attribute '@android:attr/attr/gravity' not found.
error: style attribute 'attr/@attr/minTextSize (aka com.ict.school.admin:attr/@attr/minTextSize)' not found.
sumit kotal
  • 35
  • 1
  • 7

2 Answers2

0
    first 
     in gradle.properties add code below
    android.enableAapt2=false


    second:
    A new version of Gradle and Android-gradle-plugin is available that fixes these issues.
add this in app geadle:

    buildscript {
        dependencies {
            classpath 'com.android.tools.build:gradle:3.2.0-alpha17'
        }
    }

and after that in gradle-wrapper.properties change distributionUrl:

    distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-all.zip
dariush
  • 216
  • 3
  • 10
0

On "gradle-wrapper.properties" use the latest version:

distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip

And on your "build.gradle" app file the same, the latest version:

dependencies {
        classpath 'com.android.tools.build:gradle:3.3.0-alpha03'
        classpath 'com.google.gms:google-services:4.0.2'
    }

I've been several hours looking for a solution to this AAPT2 Error after upgrading Android Studio to the 3.1.3 version. It solved the issue.

JohnA10
  • 326
  • 1
  • 4
  • 18