Reputation: 105
any time that i create project in android studio 3 i have problem with gradle sync with errors.
Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar]
/Applications/Desktop/AndroidProjects/RealmProject/app/build/intermediates/manifests/full/debug/AndroidManifest.xml
Error:(11) error: attribute 'android:roundIcon' not found.
Error:(11) attribute 'android:roundIcon' not found.
Error:failed processing manifest.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task ':app:processDebugResources'.
> Failed to execute aapt
Information:BUILD FAILED in 23s
Information:7 errors
Information:0 warnings
Information:See complete output in console
app.gradle module config:
android {
compileSdkVersion 24
defaultConfig {
applicationId "com.example.mohammad.realmproject"
minSdkVersion 17
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:24.0.0'
testImplementation 'junit:junit:4.12'
}
Upvotes: 2
Views: 2909
Reputation: 3332
related to this answer => roundIcon
is an attribute that was first introduced for Android O (8.0, API level 25), therefore you have two available options based on the type of device you're targeting:
minSdkVersion
and targetSdkVersion
are set to 25 in your app's build.gradle
:defaultConfig {
minSdkVersion 25
targetSdkVersion 25
}
android:roundIcon
from your manifest and only use android:icon
.Upvotes: 3