ANDROID STUDIO PROBLEM IN OPENING OLD APPLICATION EXAMPLE


App: Delta Bartalk from Udemy Course

https://github.com/flutter/flutter/issues/22470

buildscript {
    repositories {
        google()
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.0'
    }
}
...

And gradle version 4.6 in

flutter_app\android\gradle\wrapper\gradle-wrapper.properties:

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

 

https://stackoverflow.com/questions/50279792/could-not-find-com-android-tools-buildaapt23-2-0

buildscript {
  repositories {
      google() // here
      jcenter()
  }
  dependencies {
      classpath 'com.android.tools.build:gradle:3.2.0-alpha12'
  }
} 
allprojects {
  repositories {
      google() // and here
      jcenter()
}

 

WARNING: Configuration ‘compile’ is obsolete and has been replaced with ‘implementation’. #555

https://github.com/BranchMetrics/android-branch-deep-linking/issues/555

Step by Step solution

1- Go to the build.gradle(module app)

2- In the dependencies, you will see the code like this

compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile  'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:support-v4:23.3.0'
compile 'com.android.support:design:23.3.0'

3- Now you have to ONLY replace the compile with implementation and testCompile with testImplementation. Like this

implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation  'junit:junit:4.12'
implementation  'com.android.support:appcompat-v7:23.3.0'
implementation  'com.android.support:support-v4:23.3.0'
implementation  'com.android.support:design:23.3.0'

4- That’s all. Now click on Sync Now button.

Note– Don’t change the number or version given specified in the code.


Post a Comment

0 Comments