Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to capture fingerprint of output files for task ':app:processDebugResources' property 'sourceOutputDir' during up-to-date check #4858

Closed
anik587 opened this issue Mar 13, 2019 · 18 comments

Comments

@anik587
Copy link

anik587 commented Mar 13, 2019

Issue Description

I am getting this error when I add implementation project(':react-native-navigation') into my app\build.gradle unnder dependencies. I am following current documentation and I am not quite sure what's wrong I am doing.
Thanks i advance

Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :react-native-navigation:processReactNative57_5DebugJavaRes NO-SOURCE
> Task :react-native-navigation:transformClassesAndResourcesWithPrepareIntermediateJarsForReactNative57_5Debug
> Task :app:javaPreCompileDebug
> Task :app:mainApkListPersistenceDebug UP-TO-DATE
> Task :app:bundleDebugJsAndAssets SKIPPED
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:generateDebugResources
> Task :app:mergeDebugResources
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:processDebugManifest
> Task :app:processDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Failed to capture fingerprint of output files for task ':app:processDebugResources' property 'sourceOutputDir' during up-to-date check.
> Could not read path 'D:\react-native\rnn8\android\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\android\arch\core'.

* 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

BUILD FAILED in 9s
23 actionable tasks: 16 executed, 7 up-to-date
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: gradlew.bat app:installDebug

My app\build.gradle

def enableSeparateBuildPerCPUArchitecture = false

/**
 * Run Proguard to shrink the Java bytecode in release builds.
 */
def enableProguardInReleaseBuilds = false

android {
    compileSdkVersion rootProject.ext.compileSdkVersion

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {
        applicationId "com.rnn8"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        missingDimensionStrategy "RNN.reactNativeVersion", "reactNative57_5"
        versionCode 1
        versionName "1.0"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86", "arm64-v8a", "x86-64"
        }
    }
    buildTypes {
        release {
            minifyEnabled enableProguardInReleaseBuilds
            matchingFallbacks = ['release', 'debug']
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }
    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
            def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86-64": 4]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
            }
        }
    }
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
    implementation "com.facebook.react:react-native:+"  // From node_modules
    implementation project(':react-native-navigation')
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.compile
    into 'libs'
}

My build.gradel


// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext {
        buildToolsVersion = "28.0.3"
        minSdkVersion = 19
        compileSdkVersion = 28
        targetSdkVersion = 28
        supportLibVersion = "28.0.0"
    }
    repositories {
        google()
        mavenLocal()
        mavenCentral()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
         maven { url 'https://jitpack.io' }
    }
}

My package.json

{
  "name": "rnn8",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest",
  },
  "dependencies": {
    "react": "16.8.3",
    "react-native": "0.59.0",
    "react-native-navigation": "^2.13.1"
  },
  "devDependencies": {
    "@babel/core": "^7.3.4",
    "@babel/runtime": "^7.3.4",
    "babel-jest": "^24.5.0",
    "jest": "^24.5.0",
    "metro-react-native-babel-preset": "^0.53.0",
    "react-test-renderer": "16.8.3"
  },
  "jest": {
    "preset": "react-native"
  }
}

My settings.gradle

rootProject.name = 'rnn8'

include ':app'
include ':react-native-navigation'
project(':react-native-navigation').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-navigation/lib/android/app/')

Environment

  • React Native Navigation version: ^2.13.1
  • React Native version: 0.59.0
  • React 16.8.3
  • Platform(s) (iOS, Android, or both?): Android
  • Device info (Simulator/Device? OS version? Debug/Release?): Simulator
@ShahMoiz
Copy link

i have faced Same issue

@sandipmali
Copy link

I am facing same issue .....Please let us know what is the fix for this issue ...

@Tom-De-Backer
Copy link

This worked for me:

cd android
./gradlew clean
cd ..
react-native run-android

@mohmdalfaha
Copy link

@TomDeBacker1 Thanks, it worked for me.

@jyotijoshisupe
Copy link

i have same issue but its not worked for me

@hu-qi
Copy link

hu-qi commented Jun 10, 2019

This worked for me:

cd android
./gradlew clean
cd ..
react-native run-android

it's worked for me, so magical!
Thanks!

@rohail411
Copy link

Step 1:
Clean Project
Step 2:
Rebuild Project
Step 3:
react-native run-android
Done

@syedammar
Copy link

This worked for me:

cd android
./gradlew clean
cd ..
react-native run-android

Thanks, it's worked for me

@stale
Copy link

stale bot commented Jul 26, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.

@stale stale bot added the 🏚 stale label Jul 26, 2019
@stale
Copy link

stale bot commented Aug 2, 2019

The issue has been closed for inactivity.

@stale stale bot closed this as completed Aug 2, 2019
@joris1995
Copy link

This worked for me:

cd android
./gradlew clean
cd ..
react-native run-android

Hi! This works only on debug builds for me, for release builds it keeps on giving me this error. I already tried re-installing node_modules, and have also verified my project is running AndroidX with jetifier. Do you have any suggestions on how to solve this for release builds?

@anjalii11
Copy link

This worked for me:

cd android
./gradlew clean
cd ..
react-native run-android

Its works !!! great....

@gokujy
Copy link

gokujy commented Oct 3, 2019

This worked for me:

cd android
./gradlew clean
cd ..
react-native run-android

what to do for ionic 4?

@Mayistikar
Copy link

Mayistikar commented Oct 16, 2019

This worked for me:
cd android
./gradlew clean
cd ..
react-native run-android

what to do for ionic 4?

So, if you have an Ionic 4 project, into your project folder, go to platforms/android and run ./gradlew clean.

cd platforms/android
./gradlew clean
ionic cordova run android -l

@Giri2802
Copy link

This worked for me:
cd android
./gradlew clean
cd ..
react-native run-android

what to do for ionic 4?

So, if you have an Ionic 4 project, into your project folder, go to platforms/android and run ./gradlew clean.

cd platforms/android
./gradlew clean
ionic cordova run android -l

./gradlew clean is not working in Ionic 4 what to do now?
and it's showing an error message like this: " What went wrong:
Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check.

The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[17.0.0,17.0.0], [17.2.1,17.2.1]], but resolves to 17.2.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies."
is there any solution for this.

@JMooreo
Copy link

JMooreo commented Nov 8, 2019

I'm getting the same error as @Giri2802

@Sunny41
Copy link

Sunny41 commented Dec 2, 2019

i'm having the same issues with ionic 4 :(

@anshcena
Copy link

This worked for me:
cd android
./gradlew clean
cd ..
react-native run-android

what to do for ionic 4?

So, if you have an Ionic 4 project, into your project folder, go to platforms/android and run ./gradlew clean.
cd platforms/android
./gradlew clean
ionic cordova run android -l

./gradlew clean is not working in Ionic 4 what to do now?
and it's showing an error message like this: " What went wrong:
Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check.

The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[17.0.0,17.0.0], [17.2.1,17.2.1]], but resolves to 17.2.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies."
is there any solution for this.
cd platform cd android gradlew clean ionic cordova run android
this fixed my gradle isse but still i get

Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check.
[cordova] > The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[17.0.0,17.0.0], [17.2.1,17.2.1]], but resolves to 17.2.1. Disable the plugin and check your dependencies tree using
./gradlew :app:dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests