DefaultTaskContainer#register(String, Class, Action) on task set cannot be executed in the current context












2















With this error : DefaultTaskContainer#register(String, Class, Action) on task set cannot be executed in the current context.
No details is shown in the IDE but Android Studio is failing to run the application after getting updated. I am using android studio for developing one of my project. All the sudden the issue occurred.



Here are my gradle files:
Project Level :






// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.0'
repositories {
google()
jcenter()

// Add repository
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0-alpha02'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.firebase:firebase-core:16.0.5'

// Check for v3.1.2 or higher
classpath 'com.google.gms:google-services:4.2.0'

// Add dependency
classpath 'io.fabric.tools:gradle:1.25.4'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {

jcenter()
maven {
url "https://maven.google.com"
}
google()
}


}

task clean(type: Delete) {
delete rootProject.buildDir
}





app level :






apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'

android {
compileSdkVersion 28
defaultConfig {
applicationId "com.bendroidappsn.***"
minSdkVersion 15
targetSdkVersion 28
multiDexEnabled true
versionCode 24
versionName "APPLE"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true

}
lintOptions {
checkReleaseBuilds false
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-multidex-rules.pro'

}
}

}


ext {
//supportLibraryVersion = '28.0.0-rc01'
supportLibraryVersion = '28.0.0'
playServicesVersion = '17.0.0'
}

dependencies {
implementation "com.google.android.gms:play-services-ads:$playServicesVersion"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'android.arch.navigation:navigation-fragment:1.0.0-alpha07'
implementation 'android.arch.navigation:navigation-ui:1.0.0-alpha07'
implementation 'android.arch.navigation:navigation-fragment-ktx:1.0.0-alpha07'
implementation 'android.arch.navigation:navigation-ui-ktx:1.0.0-alpha07'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'

implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:support-vector-drawable:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-firestore:17.1.2'
implementation 'com.android.support:gridlayout-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"


implementation 'com.google.firebase:firebase-config:16.1.0'

// Add dependency
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'

compile 'com.android.support:multidex:1.0.3'

}


configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {

//if(!details.equals(com.android.support:multidex)) {
if (!requested.name.startsWith("multidex")) {
details.useVersion "$supportLibraryVersion"
}

}

}
}

repositories {
mavenCentral()
}












share|improve this question























  • Did you just update to 3.4.0 Canary? I'm going through the same problem.

    – Michael Obi
    Nov 19 '18 at 13:06
















2















With this error : DefaultTaskContainer#register(String, Class, Action) on task set cannot be executed in the current context.
No details is shown in the IDE but Android Studio is failing to run the application after getting updated. I am using android studio for developing one of my project. All the sudden the issue occurred.



Here are my gradle files:
Project Level :






// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.0'
repositories {
google()
jcenter()

// Add repository
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0-alpha02'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.firebase:firebase-core:16.0.5'

// Check for v3.1.2 or higher
classpath 'com.google.gms:google-services:4.2.0'

// Add dependency
classpath 'io.fabric.tools:gradle:1.25.4'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {

jcenter()
maven {
url "https://maven.google.com"
}
google()
}


}

task clean(type: Delete) {
delete rootProject.buildDir
}





app level :






apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'

android {
compileSdkVersion 28
defaultConfig {
applicationId "com.bendroidappsn.***"
minSdkVersion 15
targetSdkVersion 28
multiDexEnabled true
versionCode 24
versionName "APPLE"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true

}
lintOptions {
checkReleaseBuilds false
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-multidex-rules.pro'

}
}

}


ext {
//supportLibraryVersion = '28.0.0-rc01'
supportLibraryVersion = '28.0.0'
playServicesVersion = '17.0.0'
}

dependencies {
implementation "com.google.android.gms:play-services-ads:$playServicesVersion"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'android.arch.navigation:navigation-fragment:1.0.0-alpha07'
implementation 'android.arch.navigation:navigation-ui:1.0.0-alpha07'
implementation 'android.arch.navigation:navigation-fragment-ktx:1.0.0-alpha07'
implementation 'android.arch.navigation:navigation-ui-ktx:1.0.0-alpha07'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'

implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:support-vector-drawable:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-firestore:17.1.2'
implementation 'com.android.support:gridlayout-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"


implementation 'com.google.firebase:firebase-config:16.1.0'

// Add dependency
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'

compile 'com.android.support:multidex:1.0.3'

}


configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {

//if(!details.equals(com.android.support:multidex)) {
if (!requested.name.startsWith("multidex")) {
details.useVersion "$supportLibraryVersion"
}

}

}
}

repositories {
mavenCentral()
}












share|improve this question























  • Did you just update to 3.4.0 Canary? I'm going through the same problem.

    – Michael Obi
    Nov 19 '18 at 13:06














2












2








2








With this error : DefaultTaskContainer#register(String, Class, Action) on task set cannot be executed in the current context.
No details is shown in the IDE but Android Studio is failing to run the application after getting updated. I am using android studio for developing one of my project. All the sudden the issue occurred.



Here are my gradle files:
Project Level :






// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.0'
repositories {
google()
jcenter()

// Add repository
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0-alpha02'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.firebase:firebase-core:16.0.5'

// Check for v3.1.2 or higher
classpath 'com.google.gms:google-services:4.2.0'

// Add dependency
classpath 'io.fabric.tools:gradle:1.25.4'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {

jcenter()
maven {
url "https://maven.google.com"
}
google()
}


}

task clean(type: Delete) {
delete rootProject.buildDir
}





app level :






apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'

android {
compileSdkVersion 28
defaultConfig {
applicationId "com.bendroidappsn.***"
minSdkVersion 15
targetSdkVersion 28
multiDexEnabled true
versionCode 24
versionName "APPLE"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true

}
lintOptions {
checkReleaseBuilds false
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-multidex-rules.pro'

}
}

}


ext {
//supportLibraryVersion = '28.0.0-rc01'
supportLibraryVersion = '28.0.0'
playServicesVersion = '17.0.0'
}

dependencies {
implementation "com.google.android.gms:play-services-ads:$playServicesVersion"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'android.arch.navigation:navigation-fragment:1.0.0-alpha07'
implementation 'android.arch.navigation:navigation-ui:1.0.0-alpha07'
implementation 'android.arch.navigation:navigation-fragment-ktx:1.0.0-alpha07'
implementation 'android.arch.navigation:navigation-ui-ktx:1.0.0-alpha07'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'

implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:support-vector-drawable:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-firestore:17.1.2'
implementation 'com.android.support:gridlayout-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"


implementation 'com.google.firebase:firebase-config:16.1.0'

// Add dependency
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'

compile 'com.android.support:multidex:1.0.3'

}


configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {

//if(!details.equals(com.android.support:multidex)) {
if (!requested.name.startsWith("multidex")) {
details.useVersion "$supportLibraryVersion"
}

}

}
}

repositories {
mavenCentral()
}












share|improve this question














With this error : DefaultTaskContainer#register(String, Class, Action) on task set cannot be executed in the current context.
No details is shown in the IDE but Android Studio is failing to run the application after getting updated. I am using android studio for developing one of my project. All the sudden the issue occurred.



Here are my gradle files:
Project Level :






// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.0'
repositories {
google()
jcenter()

// Add repository
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0-alpha02'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.firebase:firebase-core:16.0.5'

// Check for v3.1.2 or higher
classpath 'com.google.gms:google-services:4.2.0'

// Add dependency
classpath 'io.fabric.tools:gradle:1.25.4'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {

jcenter()
maven {
url "https://maven.google.com"
}
google()
}


}

task clean(type: Delete) {
delete rootProject.buildDir
}





app level :






apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'

android {
compileSdkVersion 28
defaultConfig {
applicationId "com.bendroidappsn.***"
minSdkVersion 15
targetSdkVersion 28
multiDexEnabled true
versionCode 24
versionName "APPLE"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true

}
lintOptions {
checkReleaseBuilds false
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-multidex-rules.pro'

}
}

}


ext {
//supportLibraryVersion = '28.0.0-rc01'
supportLibraryVersion = '28.0.0'
playServicesVersion = '17.0.0'
}

dependencies {
implementation "com.google.android.gms:play-services-ads:$playServicesVersion"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'android.arch.navigation:navigation-fragment:1.0.0-alpha07'
implementation 'android.arch.navigation:navigation-ui:1.0.0-alpha07'
implementation 'android.arch.navigation:navigation-fragment-ktx:1.0.0-alpha07'
implementation 'android.arch.navigation:navigation-ui-ktx:1.0.0-alpha07'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'

implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:support-vector-drawable:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-firestore:17.1.2'
implementation 'com.android.support:gridlayout-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"


implementation 'com.google.firebase:firebase-config:16.1.0'

// Add dependency
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'

compile 'com.android.support:multidex:1.0.3'

}


configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {

//if(!details.equals(com.android.support:multidex)) {
if (!requested.name.startsWith("multidex")) {
details.useVersion "$supportLibraryVersion"
}

}

}
}

repositories {
mavenCentral()
}








// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.0'
repositories {
google()
jcenter()

// Add repository
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0-alpha02'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.firebase:firebase-core:16.0.5'

// Check for v3.1.2 or higher
classpath 'com.google.gms:google-services:4.2.0'

// Add dependency
classpath 'io.fabric.tools:gradle:1.25.4'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {

jcenter()
maven {
url "https://maven.google.com"
}
google()
}


}

task clean(type: Delete) {
delete rootProject.buildDir
}





// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.0'
repositories {
google()
jcenter()

// Add repository
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0-alpha02'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.firebase:firebase-core:16.0.5'

// Check for v3.1.2 or higher
classpath 'com.google.gms:google-services:4.2.0'

// Add dependency
classpath 'io.fabric.tools:gradle:1.25.4'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {

jcenter()
maven {
url "https://maven.google.com"
}
google()
}


}

task clean(type: Delete) {
delete rootProject.buildDir
}





apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'

android {
compileSdkVersion 28
defaultConfig {
applicationId "com.bendroidappsn.***"
minSdkVersion 15
targetSdkVersion 28
multiDexEnabled true
versionCode 24
versionName "APPLE"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true

}
lintOptions {
checkReleaseBuilds false
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-multidex-rules.pro'

}
}

}


ext {
//supportLibraryVersion = '28.0.0-rc01'
supportLibraryVersion = '28.0.0'
playServicesVersion = '17.0.0'
}

dependencies {
implementation "com.google.android.gms:play-services-ads:$playServicesVersion"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'android.arch.navigation:navigation-fragment:1.0.0-alpha07'
implementation 'android.arch.navigation:navigation-ui:1.0.0-alpha07'
implementation 'android.arch.navigation:navigation-fragment-ktx:1.0.0-alpha07'
implementation 'android.arch.navigation:navigation-ui-ktx:1.0.0-alpha07'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'

implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:support-vector-drawable:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-firestore:17.1.2'
implementation 'com.android.support:gridlayout-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"


implementation 'com.google.firebase:firebase-config:16.1.0'

// Add dependency
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'

compile 'com.android.support:multidex:1.0.3'

}


configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {

//if(!details.equals(com.android.support:multidex)) {
if (!requested.name.startsWith("multidex")) {
details.useVersion "$supportLibraryVersion"
}

}

}
}

repositories {
mavenCentral()
}





apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'

android {
compileSdkVersion 28
defaultConfig {
applicationId "com.bendroidappsn.***"
minSdkVersion 15
targetSdkVersion 28
multiDexEnabled true
versionCode 24
versionName "APPLE"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true

}
lintOptions {
checkReleaseBuilds false
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-multidex-rules.pro'

}
}

}


ext {
//supportLibraryVersion = '28.0.0-rc01'
supportLibraryVersion = '28.0.0'
playServicesVersion = '17.0.0'
}

dependencies {
implementation "com.google.android.gms:play-services-ads:$playServicesVersion"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'android.arch.navigation:navigation-fragment:1.0.0-alpha07'
implementation 'android.arch.navigation:navigation-ui:1.0.0-alpha07'
implementation 'android.arch.navigation:navigation-fragment-ktx:1.0.0-alpha07'
implementation 'android.arch.navigation:navigation-ui-ktx:1.0.0-alpha07'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'

implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:support-vector-drawable:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-firestore:17.1.2'
implementation 'com.android.support:gridlayout-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"


implementation 'com.google.firebase:firebase-config:16.1.0'

// Add dependency
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'

compile 'com.android.support:multidex:1.0.3'

}


configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {

//if(!details.equals(com.android.support:multidex)) {
if (!requested.name.startsWith("multidex")) {
details.useVersion "$supportLibraryVersion"
}

}

}
}

repositories {
mavenCentral()
}






android gradle






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 13 '18 at 20:41









Md Mamunur RasidMd Mamunur Rasid

112




112













  • Did you just update to 3.4.0 Canary? I'm going through the same problem.

    – Michael Obi
    Nov 19 '18 at 13:06



















  • Did you just update to 3.4.0 Canary? I'm going through the same problem.

    – Michael Obi
    Nov 19 '18 at 13:06

















Did you just update to 3.4.0 Canary? I'm going through the same problem.

– Michael Obi
Nov 19 '18 at 13:06





Did you just update to 3.4.0 Canary? I'm going through the same problem.

– Michael Obi
Nov 19 '18 at 13:06












3 Answers
3






active

oldest

votes


















4














Try to set



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



in the file gradle-wrapper.properties



that works for me






share|improve this answer































    2














    I ran into this exact issue after updating to Android Studio 3.4 Canary 4.
    Disabling instant run fixed it.






    share|improve this answer































      0














      just change
      classpath 'com.android.tools.build:gradle:3.4.0-alpha02'



      to below one:



      classpath 'com.android.tools.build:gradle:3.4.0-alpha03'



      and rebuild the project.






      share|improve this answer























        Your Answer






        StackExchange.ifUsing("editor", function () {
        StackExchange.using("externalEditor", function () {
        StackExchange.using("snippets", function () {
        StackExchange.snippets.init();
        });
        });
        }, "code-snippets");

        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "1"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53289179%2fdefaulttaskcontainerregisterstring-class-action-on-task-set-cannot-be-execu%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        4














        Try to set



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



        in the file gradle-wrapper.properties



        that works for me






        share|improve this answer




























          4














          Try to set



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



          in the file gradle-wrapper.properties



          that works for me






          share|improve this answer


























            4












            4








            4







            Try to set



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



            in the file gradle-wrapper.properties



            that works for me






            share|improve this answer













            Try to set



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



            in the file gradle-wrapper.properties



            that works for me







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 19 '18 at 15:27









            Gustavo Forero CarvajalGustavo Forero Carvajal

            1086




            1086

























                2














                I ran into this exact issue after updating to Android Studio 3.4 Canary 4.
                Disabling instant run fixed it.






                share|improve this answer




























                  2














                  I ran into this exact issue after updating to Android Studio 3.4 Canary 4.
                  Disabling instant run fixed it.






                  share|improve this answer


























                    2












                    2








                    2







                    I ran into this exact issue after updating to Android Studio 3.4 Canary 4.
                    Disabling instant run fixed it.






                    share|improve this answer













                    I ran into this exact issue after updating to Android Studio 3.4 Canary 4.
                    Disabling instant run fixed it.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Nov 19 '18 at 13:21









                    Michael ObiMichael Obi

                    3561416




                    3561416























                        0














                        just change
                        classpath 'com.android.tools.build:gradle:3.4.0-alpha02'



                        to below one:



                        classpath 'com.android.tools.build:gradle:3.4.0-alpha03'



                        and rebuild the project.






                        share|improve this answer




























                          0














                          just change
                          classpath 'com.android.tools.build:gradle:3.4.0-alpha02'



                          to below one:



                          classpath 'com.android.tools.build:gradle:3.4.0-alpha03'



                          and rebuild the project.






                          share|improve this answer


























                            0












                            0








                            0







                            just change
                            classpath 'com.android.tools.build:gradle:3.4.0-alpha02'



                            to below one:



                            classpath 'com.android.tools.build:gradle:3.4.0-alpha03'



                            and rebuild the project.






                            share|improve this answer













                            just change
                            classpath 'com.android.tools.build:gradle:3.4.0-alpha02'



                            to below one:



                            classpath 'com.android.tools.build:gradle:3.4.0-alpha03'



                            and rebuild the project.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Nov 14 '18 at 8:03









                            Zumbarlal SaindaneZumbarlal Saindane

                            697416




                            697416






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Stack Overflow!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53289179%2fdefaulttaskcontainerregisterstring-class-action-on-task-set-cannot-be-execu%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                Florida Star v. B. J. F.

                                Error while running script in elastic search , gateway timeout

                                Adding quotations to stringified JSON object values