I am getting Gradle error every time when I am creating a new project in AndroidStudio? I have installed and reinstalled android studio on mac but the error still appearing and getting the same error. Below my errors from Logcat.
/Users/yodgorbekkomilov/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/d531dbb8e7f408824a92fa6cc86908a2/res/layout/select_dialog_item_material.xml
Error:(31, 27) No resource found that matches the given name (at 'paddingStart' with value '?attr/listPreferredItemPaddingStart'). Error:(32, 25) No resource found that matches the given name (at 'paddingEnd' with value '?attr/listPreferredItemPaddingEnd'). /Users/yodgorbekkomilov/Desktop/MyApplication2/app/build/intermediates/res/merged/debug/layout/select_dialog_item_material.xml
Error:(31, 27) No resource found that matches the given name (at 'paddingStart' with value '?attr/listPreferredItemPaddingStart'). Error:(32, 25) No resource found that matches the given name (at 'paddingEnd' with value '?attr/listPreferredItemPaddingEnd').
Error:java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Error while executing process /Users/yodgorbekkomilov/Library/Android/sdk/build-tools/26.0.2/aapt with arguments {package -f --no-crunch -I /Users/yodgorbekkomilov/Library/Android/sdk/platforms/android-26/android.jar -M /Users/yodgorbekkomilov/Desktop/MyApplication2/app/build/intermediates/manifests/full/debug/AndroidManifest.xml -S /Users/yodgorbekkomilov/Desktop/MyApplication2/app/build/intermediates/res/merged/debug -m -J /Users/yodgorbekkomilov/Desktop/MyApplication2/app/build/generated/source/r/debug -F /Users/yodgorbekkomilov/Desktop/MyApplication2/app/build/intermediates/res/debug/resources-debug.ap_ --custom-package com.example.yodgorbekkomilov.myapplication -0 apk --output-text-symbols /Users/yodgorbekkomilov/Desktop/MyApplication2/app/build/intermediates/symbols/debug --no-version-vectors}
Error:org.gradle.process.internal.ExecException: Process 'command '/Users/yodgorbekkomilov/Library/Android/sdk/build-tools/26.0.2/aapt'' finished with non-zero exit value 1 Error:Execution failed for task ':app:processDebugResources'.
Failed to execute aapt
below my buld.gradle file
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.yodgorbekkomilov.myapplication"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}