Cordovalib Problem With Android Studio

01-11-2017

Error Message:

Error:Cause: com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)V

Solution: Change gradle version as follows:

buildscript {
    repositories {
        // Gradle 4.1 and higher include support for Google's Maven repo using
        // the google() method. And you need to include this repo to download
        // Android plugin 3.0.0 or higher.
        google()
        ...
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.0'
    }
}

Problem:

Error:Unable to resolve dependency for ':@debug/compileClasspath': Could not resolve project :CordovaLib.
<a href="openFile:D:/Lessons/berber/berber-ionic/platforms/android/build.gradle">Open File</a><br><a href="Unable to resolve dependency for ':@debug/compileClasspath': Could not resolve project :CordovaLib.">Show Details</a>

Solution: Replace

debugCompile(project(path: "CordovaLib", configuration: "debug"))
    releaseCompile(project(path: "CordovaLib", configuration: "release")) 
with implementation project(':CordovaLib')

© 2019 All rights reserved. Codesenior.COM