question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
   > A problem occurred configuring project ':react-native-device-info'.
      > Failed to notify project evaluation listener.
         > com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)V

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.3'
        classpath 'com.google.gms:google-services:3.2.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}
"react-native-device-info": "^0.21.5"

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

11reactions
fonovcommented, May 9, 2018

I forgot update build:gradle to

classpath 'com.android.tools.build:gradle:3.1.2'
7reactions
XeeshanAnsaricommented, Jul 6, 2019

please update the files

android/gradle/gradle-wrapper.properties distributionUrl=https://services.gradle.org/distributions/gradle-4.1-all.zip

android/build.gradle classpath ‘com.android.tools.build:gradle:3.0.1’

and also add the google() in the buildscript/repositories buildscript { repositories { jcenter() google() } }

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to find method 'com.android.build.gradle.tasks.factory ...
I am following an android development course of Udacity Intents and activity. here they are asking for importing a project from GitHub ...
Read more >
AndroidJavaCompile.java - Google Git
... Android Open Source Project. *. * Licensed under the Apache License, Version 2.0 (the "License"); ... package com.android.build.gradle.tasks.factory;.
Read more >
Problems in building a Github Android project - Super User
build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)V'. Possible causes for this unexpected error include:<ul> ...
Read more >
搜索 - CSDN博客
Android 解决:build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)V. MoonLoong 于 2018-05-04 15:42:24 发布 6750 收藏.
Read more >
Android build failed with Failed to notify project evaluation ...
Failed to notify project evaluation listener. > com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)V.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found