Error: method does not override or implement a method from a supertype

Asked

Viewed 458 times

0

I have a project in Android Studio for a solution in the company where I am working. The project is two years old or so, and when I imported it from svn for the IDE I started having problems with API versions, dependencies... I changed the versions as I thought they would be correct (I don’t usually work with Android), but at the time of building the project some files are generated, and one of those files is giving the title error. Below I leave some images of the project and the scripts in Gradle:

Project:

inserir a descrição da imagem aqui

Mistakes:

inserir a descrição da imagem aqui

Scripts Gradle:

apply plugin: 'com.android.application'

android {
compileSdkVersion 26

packagingOptions {
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/license.txt'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/notice.txt'
    exclude 'META-INF/ASL2.0'
}

defaultConfig {
    applicationId "com.veedmee.android"
    minSdkVersion 19
    targetSdkVersion 26
    versionCode 23
    versionName "1.194"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
    debug {
        debuggable true
    }
  }
}

dependencies {
compile project(':facebookSDK')
compile files('libs/acra-4.5.0.jar')
compile files('libs/fmmr.jar')
compile files('libs/gson-2.2.4.jar')
compile files('libs/httpmime-4.3.1.jar')
compile files('libs/httpcore-4.3.jar')
compile files('libs/httpclient-4.3.1.jar')
//compile files('libs/apache-mime4j-core-0.7.2.jar')
//compile files('libs/httpclient-cache-4.3.1.jar')
/*compile 'com.android.support:support-v4:22.2.1'*/
//compile 'com.android.support:appcompat-v7:+'
compile project(path: ':notifications', configuration: 'android-endpoints')
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.google.android.gms:play-services-base:11.8.0'
compile 'com.google.android.gms:play-services-gcm:11.8.0'
compile 'com.googlecode.libphonenumber:libphonenumber:8.8.9'
compile 'com.android.support:support-v4:26.1.0'
 }

What are the most common mistakes for this type of situation where we have to deal with old projects and update them? Thank you

Excerpt from Registration.java where the error occurs:

 public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder {


public Builder(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory,
    com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
  super(
      transport,
      jsonFactory,
      DEFAULT_ROOT_URL,
      DEFAULT_SERVICE_PATH,
      httpRequestInitializer,
      false);
  setBatchPath(DEFAULT_BATCH_PATH);
}

/** Builds a new instance of {@link Registration}. */
@Override
public Registration build() {
  return new Registration(this);
}

@Override
public Builder setRootUrl(String rootUrl) {
  return (Builder) super.setRootUrl(rootUrl);
}

@Override
public Builder setServicePath(String servicePath) {
  return (Builder) super.setServicePath(servicePath);
}

@Override
public Builder setBatchPath(String batchPath) {
  return (Builder) super.setBatchPath(batchPath);
}
  • You could put this Registration.java class to take a look at it?

  • I put from the beginning of the class to where the error occurs, this file is generated automatically, I can not change the code..

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.