We Are Going To Discuss About No signature of method: .android() is applicable for argument types. Exception in build.gradle (app). So lets Start this Java Article.
No signature of method: .android() is applicable for argument types. Exception in build.gradle (app)
- No signature of method: .android() is applicable for argument types. Exception in build.gradle (app)
I had the same issue when migrating to the AGP 7.0 when moving from
aaptOptions
toandroidResources
.
For me it was enough to replaceandroidResources { noCompress '...' }
- android() is applicable for argument types. Exception in build.gradle (app)
I had the same issue when migrating to the AGP 7.0 when moving from
aaptOptions
toandroidResources
.
For me it was enough to replaceandroidResources { noCompress '...' }
Solution 1
I had the same issue when migrating to the AGP 7.0 when moving from aaptOptions
to androidResources
.
For me it was enough to replace
androidResources {
noCompress '...'
}
with
aaptOptions {
noCompress '...'
}
Original Author Of This Content
Solution 2
I had the same issue when migrating to the 'com.android.tools.build:gradle:7.0.0'
I removed the code:
javaCompileOptions {
annotationProcessorOptions {
arguments = [fragmentArgsLogWarnings: 'false']
includeCompileClasspath true
}
}
here is desc about how to add it again for kapt
https://github.com/sockeqwe/fragmentargs#annotation-processor-options
Original Author Of This Content
Solution 3
Best way to deal with this is going in the android { ... }
block and start commenting out different methods/blocks until the configuration moves past the .android()
error and you’ll know which block is causing it. In my case it was a deprecated method in the buildTypes { ... }
block.
Original Author Of This Content
Solution 4
In my case, there was an unwanted character(a semicolon) in build.gradle(app)
I deleted that and rebuiled the project
problem solved.
Original Author Of This Content
Conclusion
So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.