Digital Assistant and Mobile

Get Involved. Join the Conversation.

Topic

    Prabeethsoy Nair
    Error: Could not find method...
    Topic posted August 30, 2018 by Prabeethsoy Nair, tagged Android, Bots 
    1407 Views, 1 Comment
    Title:
    Error: Could not find method implementationSdkVersion() for arguments [28] on object of type com.android.build.gradle.AppExtension with Oracle bolt Android client
    Summary:
    Error while creating Oracle bolt client through android sdk
    Content:

    Hi Gurus,

    i am facing below issue in my Oracle chat bot application when i am trying to create android message client for bolt. 
     
    Error:   Could not find method implementationSdkVersion() for arguments [28] on object of type com.android.build.gradle.AppExtension.
     
     
    Error log 
    Caused by: org.gradle.api.GradleScriptException: A problem occurred evaluating project ':app'.
    at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:92)
    at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl$2.run(DefaultScriptPluginFactory.java:199)
    at org.gradle.configuration.ProjectScriptTarget.addConfiguration(ProjectScriptTarget.java:77)
    at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:204)
    at org.gradle.configuration.BuildOperationScriptPlugin$1.run(BuildOperationScriptPlugin.java:61)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
    at org.gradle.configuration.BuildOperationScriptPlugin.apply(BuildOperationScriptPlugin.java:58)
    at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:41)
    at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:26)
    at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34)
    at org.gradle.configuration.project.LifecycleProjectEvaluator.doConfigure(LifecycleProjectEvaluator.java:64)
    ... 97 more
    Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method implementationSdkVersion() for arguments [28] on object of type com.android.build.gradle.AppExtension.
    at org.gradle.internal.metaobject.AbstractDynamicObject.methodMissingException(AbstractDynamicObject.java:179)
     
    **build.gradle**
    apply plugin: 'com.android.application'
     
    android {
        implementationSdkVersion 28
        defaultConfig {
            applicationId "cap.com.cxcapgboltmobi"
            minSdkVersion 15
            targetSdkVersion 28
            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:28.0.0-rc02'
        implementation 'com.android.support.constraint:constraint-layout:1.1.2'
        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'
        // place a dependecy on the created modules to use bots SDK
        implementation project(':bots-client-sdk-android-core-18.2.3.0')
        implementation project(':bots-client-sdk-android-ui-18.2.3.0')
     
        //Other dependencies used by bots SDK
        implementation 'com.google.firebase:firebase-messaging:11.0.4'
        implementation 'com.google.firebase:firebase-core:11.0.4'
        implementation 'com.google.code.gson:gson:2.4'
        implementation 'com.squareup.okhttp3:okhttp:3.4.1'
        implementation 'com.android.support:support-annotations:26.0.2'
        implementation 'com.android.support:appcompat-v7:27.1.1'
        implementation 'com.android.support:recyclerview-v7:27.1.1'
        implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
        implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.5.0'
        implementation 'com.google.android.gms:play-services-location:11.0.4'
        implementation 'com.github.bumptech.glide:glide:4.6.1'
        implementation 'com.android.support:support-v4:27.1.1'
        implementation 'com.android.support:exitinterface:27.1.1'
        implementation 'com.android.support:support-media-compact:27.1.1'
        implementation 'com.google.android.gms:play-services-location:12.0.1'
        implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0'
    }
     
     
     
     
     
     
     
     

     

    Comment

     

    • Rohit Dhamija

      Hi,

      android {
          implementationSdkVersion 28
          defaultConfig {
              applicationId "cap.com.cxcapgboltmobi"
              minSdkVersion 15
              targetSdkVersion 28
              versionCode 1
              versionName "1.0"
              testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
          }

      I guess, The problem is in "implementationSdkVersion" which should be "compileSdkVersion". 

       

      Here is  my build.gradle for reference purpose:

       

      apply plugin: 'com.android.application'

      android {
          compileSdkVersion 27
          defaultConfig {
              applicationId "mob.ora.chatfinance"
              minSdkVersion 19
              targetSdkVersion 27
              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:27.1.1'
          implementation 'com.android.support.constraint:constraint-layout:1.1.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 project(':bots-client-sdk-android-core-18.2.3.0')
          implementation project(':bots-client-sdk-android-ui-18.2.3.0')
          implementation 'com.google.code.gson:gson:2.4'
          implementation 'com.squareup.okhttp3:okhttp:3.4.1'
          implementation 'com.google.firebase:firebase-core:12.0.1'
          implementation 'com.google.firebase:firebase-messaging:12.0.1'
          implementation 'com.android.support:support-annotations:27.1.1'
          implementation 'com.github.bumptech.glide:glide:4.6.1'
          implementation 'com.android.support:support-v4:27.1.1'
          implementation 'com.android.support:appcompat-v7:27.1.1'
          implementation 'com.android.support:exifinterface:27.1.1'
          implementation 'com.android.support:recyclerview-v7:27.1.1'
          implementation 'com.android.support:support-media-compat:27.1.1'
          implementation 'com.google.android.gms:play-services-location:12.0.1'
          implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0'
          implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
      }

       

      Thanks and Regards,

      Rohit Dhamija