react-native-screens: error in running project: Could not find swiperefreshlayout.jar (androidx.swiperefreshlayout:swiperefreshlayout:1.0.0).

I am trying to install react-native-screens in my project. I installed it without any problem but when i want to run the app, the following problem will occur:

` Executing tasks: [:app:assembleDebug] in project D:\Programming\Projects\Sharmarket\mobile app\v1.0.0\Sharmarket\android

Gradle Daemon started in 3 s 898 ms

Task :app:generatePackageList Task :app:preBuild Task :react-native-screens:preBuild UP-TO-DATE Task :react-native-screens:preDebugBuild UP-TO-DATE Task :react-native-screens:checkDebugManifest UP-TO-DATE Task :react-native-screens:processDebugManifest UP-TO-DATE Task :app:preDebugBuild Task :react-native-screens:compileDebugAidl NO-SOURCE Task :app:compileDebugAidl NO-SOURCE Task :react-native-screens:packageDebugRenderscript NO-SOURCE Task :app:checkDebugManifest Task :app:compileDebugRenderscript NO-SOURCE Task :app:generateDebugBuildConfig Task :app:bundleDebugJsAndAssets SKIPPED Task :app:prepareLintJar UP-TO-DATE Task :app:generateDebugSources Task :react-native-screens:generateDebugBuildConfig UP-TO-DATE Task :react-native-screens:compileDebugRenderscript NO-SOURCE Task :react-native-screens:generateDebugResValues UP-TO-DATE Task :react-native-screens:generateDebugResources UP-TO-DATE Task :react-native-screens:packageDebugResources UP-TO-DATE Task :react-native-screens:generateDebugRFile UP-TO-DATE Task :react-native-screens:prepareLintJar UP-TO-DATE Task :react-native-screens:generateDebugSources UP-TO-DATE Task :react-native-screens:javaPreCompileDebug FAILED

FAILURE: Build failed with an exception.

What went wrong: Execution failed for task ‘:react-native-screens:javaPreCompileDebug’.

Could not resolve all files for configuration ‘:react-native-screens:debugCompileClasspath’. Could not find swiperefreshlayout.jar (androidx.swiperefreshlayout:swiperefreshlayout:1.0.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/swiperefreshlayout/swiperefreshlayout/1.0.0/swiperefreshlayout-1.0.0.jar

  • 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. Use ‘–warning-mode all’ to show the individual deprecation warnings. See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 23s 13 actionable tasks: 5 executed, 8 up-to-date

`

package.json: { "name": "Sharmarket", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "start": "react-native start", "test": "jest", "lint": "eslint ." }, "dependencies": { "react": "16.9.0", "react-native": "0.61.5", "react-native-screens": "^2.2.0" }, "devDependencies": { "@babel/core": "^7.8.7", "@babel/runtime": "^7.8.7", "@react-native-community/eslint-config": "^0.0.7", "babel-jest": "^25.1.0", "eslint": "^6.8.0", "jest": "^25.1.0", "metro-react-native-babel-preset": "^0.58.0", "react-test-renderer": "16.9.0" }, "jest": { "preset": "react-native" } }

Dependencies in app/build.gradle

` dependencies { implementation fileTree(dir: “libs”, include: [“*.jar”]) implementation “com.facebook.react:react-native:+” // From node_modules

implementation ‘androidx.appcompat:appcompat:1.1.0-rc01’ implementation ‘androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02’

if (enableHermes) {
    def hermesPath = "../../node_modules/hermes-engine/android/";
    debugImplementation files(hermesPath + "hermes-debug.aar")
    releaseImplementation files(hermesPath + "hermes-release.aar")
} else {
    implementation jscFlavor
}

} `

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15

Commits related to this issue

Most upvoted comments

this, not work for me BUT i fix it by change this: androidx.swiperefreshlayout:swiperefreshlayout:1.0.0

GO to

.\node_modules\react-native-screens\android\build.gradel

change the version of swiperefreshlayout:1.0.0 to swiperefreshlayout:1.1.0-beta01

sorry, i tried more than 100 way but none of them was’nt a solution, if you live in iran like me, i think it’s a temporary fix داداش اگه مثه من تو ایرانی، فکرکنم این فعلا تنها راهمون باشه، ی هفته درگیرش بودم، فقط تونستم کیرفنی بش بزنم

On Thu, Mar 26, 2020 at 2:51 AM Mohmmad Najafian notifications@github.com wrote:

this, not work for me BUT i fix it by change this: androidx.swiperefreshlayout:swiperefreshlayout:1.0.0

GO to

.\node_modules\react-native-screens\android\build.gradel

change the version of swiperefreshlayout:1.0.0 to swiperefreshlayout:1.1.0-beta01

@i-man92 https://github.com/i-man92 Jan, You saved my day, I did this and it works, thank you! BUT I think it’s not good to change node_modules files is there other solutions? Can you create PR or anything to fix this in the right way?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/software-mansion/react-native-screens/issues/410#issuecomment-604117941, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANDJFDI4BJ3UGX27O2M3BOLRJJ7V7ANCNFSM4LENJVYA .