0 votes

Migrating old project to a newer version of Android Studio 3.4.2

friends I have a project the year 2016 created in android studio, and I want to migrate it to the new version of android studio v3.4.2 which is the one I am using, this is the project for you if you want to check : Project

I have tried to do, to make it run on a API 27, but I generated this error:

ERROR: Failed to resolve: com.android.support:appcompat-v7:23.1.1
Add Google Maven repository and sync project
Show in Project Structure dialog
Affected Modules: app


ERROR: Failed to resolve: com.android.support:support-v4:23.0.0
Add Google Maven repository and sync project
Show in Project Structure dialog
Affected Modules: app

and this is the build gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.epam.merl1n.info.privateblog.merl1nvision"
        minSdkVersion 19
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            debuggable true
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile "com.android.support:support-v4:23.0.0"
    compile "com.android.support:gridlayout-v7:23.0.0"
    compile "com.android.support:cardview-v7:23.0.0"
    compile 'com.android.support:appcompat-v7:23.1.1'
}

as I can do to migrate it???

0voto

FrEqDe Points 2032

You have to edit the build.gradle and you should have something like this:

allprojects {
        repositories {
            jcenter()
            google()
        }
    }

You have to edit the one that is in the root directory of the project. Here you can find more information.

HolaDevs.com

HolaDevs is an online community of programmers and software lovers.
You can check other people responses or create a new question if you don't find a solution

Powered by:

X