My project is pretty old and now I need to do a customization on it. I have installed Android Studio and trying to load the Project.I am having the below issues
Could not create task ':app:processDebugResources'.
Cannot use @TaskAction annotation on method IncrementalTask.taskAction$gradle() because interface .gradle.api.tasks.incremental.IncrementalTaskInputs is not a valid parameter to an action method.
build.gradle(app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 33
buildToolsVersion '33.0.0'
compileOptions.encoding = 'UTF-8'
defaultConfig {
applicationId "com.mobilesalesperson.controller"
minSdkVersion 15
targetSdkVersion 33
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
lintOptions {
disable "ResourceType"
checkReleaseBuilds false
abortOnError false
ignoreWarnings true
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:8.1.0"
}
}
}
dependencies {
implementation 'com.android.support:support-v4:28.0.0'
implementation files('libs/core.jar')
implementation files('libs/ksoap2-android-assembly-2.6.2-jar-with-dependencies.jar')
implementation files('libs/sqljdbc4.jar')
implementation files('libs/ZSDK_API.jar')
implementation 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.5@aar'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation files('libs/itextg-5.5.8.jar')
implementation 'com.android.support:support-annotations:28.0.0'
}
build.gradle(Project)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven {
url '/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
}
}
allprojects {
repositories {
jcenter()
maven {
url '/'
name 'Google'
}
}
}
gradle-wrapper.Properties
#Thu Jan 23 11:41:56 IST 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Local Properties
## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Thu Jan 23 11:41:35 IST 2025
ndk.dir=C\:\\Android\\android-sdk\\ndk-bundle
sdk.dir=C\:\\Users\\sivabala\\AppData\\Local\\Android\\Sdk
My project is pretty old and now I need to do a customization on it. I have installed Android Studio and trying to load the Project.I am having the below issues
Could not create task ':app:processDebugResources'.
Cannot use @TaskAction annotation on method IncrementalTask.taskAction$gradle() because interface .gradle.api.tasks.incremental.IncrementalTaskInputs is not a valid parameter to an action method.
build.gradle(app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 33
buildToolsVersion '33.0.0'
compileOptions.encoding = 'UTF-8'
defaultConfig {
applicationId "com.mobilesalesperson.controller"
minSdkVersion 15
targetSdkVersion 33
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
lintOptions {
disable "ResourceType"
checkReleaseBuilds false
abortOnError false
ignoreWarnings true
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:8.1.0"
}
}
}
dependencies {
implementation 'com.android.support:support-v4:28.0.0'
implementation files('libs/core.jar')
implementation files('libs/ksoap2-android-assembly-2.6.2-jar-with-dependencies.jar')
implementation files('libs/sqljdbc4.jar')
implementation files('libs/ZSDK_API.jar')
implementation 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.5@aar'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation files('libs/itextg-5.5.8.jar')
implementation 'com.android.support:support-annotations:28.0.0'
}
build.gradle(Project)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
}
}
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google/'
name 'Google'
}
}
}
gradle-wrapper.Properties
#Thu Jan 23 11:41:56 IST 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle./distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Local Properties
## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Thu Jan 23 11:41:35 IST 2025
ndk.dir=C\:\\Android\\android-sdk\\ndk-bundle
sdk.dir=C\:\\Users\\sivabala\\AppData\\Local\\Android\\Sdk
Share
Improve this question
asked Jan 29 at 13:24
SivaSiva
1,8612 gold badges15 silver badges29 bronze badges
1 Answer
Reset to default 1i can't say for sure but I think the problem is incompatibility between the Gradle version and the Android Gradle Plugin, Here is how you can fix it:
you should match the version of AGP
in both project-level and app-level build.gradle
file.
use this version in your project-level build.gradle
file:
classpath 'com.android.tools.build:gradle:8.1.0'
and use this in gradle-wrapper.properties
file:
distributionUrl=https\://services.gradle./distributions/gradle-8.1-bin.zip
now you can remove the buildToolsVersion '33.0.0'
in app/build.gradle
file.
after this changes Sync Gradle and then Clean and Rebuild the project. I hope this fixes your problem.