software-mansion / react-native-screens

Native navigation primitives for your React Native app.
MIT License
3.01k stars 510 forks source link

Faild to run android after npm install react-native-screens #514

Closed AnasAlsaadi closed 4 years ago

AnasAlsaadi commented 4 years ago

`* What went wrong: Execution failed for task ':react-native-screens:generateDebugRFile'.

Could not resolve all files for configuration ':react-native-screens:debugRuntimeClasspath'. Could not find material-1.1.0.aar (com.google.android.material:material:1.1.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/google/android/material/material/1.1.0/material-1.1.0.aar Could not find viewpager2-1.0.0.aar (androidx.viewpager2:viewpager2:1.0.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/viewpager2/viewpager2/1.0.0/viewpager2-1.0.0.aar Could not find fragment-1.2.1.aar (androidx.fragment:fragment:1.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/fragment/fragment/1.2.1/fragment-1.2.1.aar Could not find fragment-1.2.1.aar (androidx.fragment:fragment:1.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/fragment/fragment/1.2.1/fragment-1.2.1.aar Could not find fragment-1.2.1.aar (androidx.fragment:fragment:1.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/fragment/fragment/1.2.1/fragment-1.2.1.aar Could not find fragment-1.2.1.aar (androidx.fragment:fragment:1.2.1). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/fragment/fragment/1.2.1/fragment-1.2.1.aar Could not find coordinatorlayout-1.1.0.aar (androidx.coordinatorlayout:coordinatorlayout:1.1.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/coordinatorlayout/coordinatorlayout/1.1.0/coordinatorlayout-1.1.0.aar Could not find coordinatorlayout-1.1.0.aar (androidx.coordinatorlayout:coordinatorlayout:1.1.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/coordinatorlayout/coordinatorlayout/1.1.0/coordinatorlayout-1.1.0.aar Could not find activity-1.1.0.aar (androidx.activity:activity:1.1.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/activity/activity/1.1.0/activity-1.1.0.aar Could not find transition-1.2.0.aar (androidx.transition:transition:1.2.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/transition/transition/1.2.0/transition-1.2.0.aar Could not find lifecycle-viewmodel-savedstate-2.2.0.aar (androidx.lifecycle:lifecycle-viewmodel-savedstate:2.2.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-viewmodel-savedstate/2.2.0/lifecycle-viewmodel-savedstate-2.2.0.aar Could not find lifecycle-viewmodel-savedstate-2.2.0.aar (androidx.lifecycle:lifecycle-viewmodel-savedstate:2.2.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-viewmodel-savedstate/2.2.0/lifecycle-viewmodel-savedstate-2.2.0.aar Could not find lifecycle-viewmodel-2.2.0.aar (androidx.lifecycle:lifecycle-viewmodel:2.2.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-viewmodel/2.2.0/lifecycle-viewmodel-2.2.0.aar Could not find lifecycle-viewmodel-2.2.0.aar (androidx.lifecycle:lifecycle-viewmodel:2.2.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-viewmodel/2.2.0/lifecycle-viewmodel-2.2.0.aar Could not find lifecycle-viewmodel-2.2.0.aar (androidx.lifecycle:lifecycle-viewmodel:2.2.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-viewmodel/2.2.0/lifecycle-viewmodel-2.2.0.aar Could not find lifecycle-viewmodel-2.2.0.aar (androidx.lifecycle:lifecycle-viewmodel:2.2.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-viewmodel/2.2.0/lifecycle-viewmodel-2.2.0.aar Could not find lifecycle-runtime-2.2.0.aar (androidx.lifecycle:lifecycle-runtime:2.2.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-runtime/2.2.0/lifecycle-runtime-2.2.0.aar Could not find lifecycle-runtime-2.2.0.aar (androidx.lifecycle:lifecycle-runtime:2.2.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-runtime/2.2.0/lifecycle-runtime-2.2.0.aar Could not find lifecycle-runtime-2.2.0.aar (androidx.lifecycle:lifecycle-runtime:2.2.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-runtime/2.2.0/lifecycle-runtime-2.2.0.aar Could not find lifecycle-livedata-core-2.2.0.aar (androidx.lifecycle:lifecycle-livedata-core:2.2.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-livedata-core/2.2.0/lifecycle-livedata-core-2.2.0.aar Could not find lifecycle-livedata-core-2.2.0.aar (androidx.lifecycle:lifecycle-livedata-core:2.2.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-livedata-core/2.2.0/lifecycle-livedata-core-2.2.0.aar Could not find lifecycle-livedata-core-2.2.0.aar (androidx.lifecycle:lifecycle-livedata-core:2.2.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-livedata-core/2.2.0/lifecycle-livedata-core-2.2.0.aar Could not find core-runtime-2.1.0.aar (androidx.arch.core:core-runtime:2.1.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/arch/core/core-runtime/2.1.0/core-runtime-2.1.0.aar Could not find core-runtime-2.1.0.aar (androidx.arch.core:core-runtime:2.1.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/arch/core/core-runtime/2.1.0/core-runtime-2.1.0.aar

`

I have error when try this: 1- npm install react-native-screens 2- react-native link react-native-screens 3- react-native run-android

PLEASE ANY HELP !!

WoLewicki commented 4 years ago

What version of react-native are you using?

AnasAlsaadi commented 4 years ago

@WoLewicki 0.62

WoLewicki commented 4 years ago

So it is not needed to use react-native link. It should be enough to add the library via npm/yarn and then just build the project. Can you check?

AnasAlsaadi commented 4 years ago

@WoLewicki

it is working now after try another solution and spent alot of time

girdle version should be ;

classpath 'com.android.tools.build:gradle:3.4.2'

in waraper :

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

react-native-screen/android/build.gridle

implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-beta01'

after all changes working fine !

WoLewicki commented 4 years ago

Ok so I am closing it then. Feel free to comment if you have any questions.

MursiDirect commented 2 years ago

still have the same issue, any help please ? what i get while trying to run the andoid app "react-native run-android"

`Execution failed for task ':react-native-screens:generateDebugRFile'.

Could not resolve all files for configuration ':react-native-screens:debugCompileClasspath'. Failed to transform appcompat-1.1.0.aar (androidx.appcompat:appcompat:1.1.0) to match attributes {artifactType=android-symbol-with-package-name, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}. Execution failed for ExtractAarTransform: C:\Users\Mohammed.gradle\caches\modules-2\files-2.1\androidx.appcompat\appcompat\1.1.0\351d3409fe51f3d862bd2b1bcc0f3b6ded29460e\appcompat-1.1.0.aar. Cannot parse result path string: Failed to transform appcompat-1.1.0.aar (androidx.appcompat:appcompat:1.1.0) to match attributes {artifactType=android-symbol-with-package-name, org.gradle.status=release}. Execution failed for ExtractAarTransform: C:\Users\Mohammed.gradle\caches\modules-2\files-2.1\androidx.appcompat\appcompat\1.1.0\351d3409fe51f3d862bd2b1bcc0f3b6ded29460e\appcompat-1.1.0.aar. Cannot parse result path string: Failed to transform viewpager2-1.0.0.aar (androidx.viewpager2:viewpager2:1.0.0) to match attributes {artifactType=android-symbol-with-package-name, org.gradle.status=release}. Execution failed for LibrarySymbolTableTransform: C:\Users\Mohammed.gradle\caches\transforms-2\files-2.1\7890bc1915851051324e46f63878a44f\jetified-viewpager2-1.0.0. Cannot parse result path string: ` @WoLewicki

my Package.json { "name": "direct", "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 .", "postinstall": "patch-package" }, "dependencies": { "@bugsnag/react-native": "^7.13.2", "@eliav2/react-native-collapsible-view": "^1.4.0", "@monterosa/react-native-parallax-scroll": "^1.8.0", "@react-native-async-storage/async-storage": "^1.15.7", "@react-native-community/cli": "^5.0.1", "@react-native-community/masked-view": "^0.1.11", "@react-native-community/netinfo": "^6.1.0", "@react-navigation/bottom-tabs": "^5.11.11", "@react-navigation/material-bottom-tabs": "^5.3.15", "@react-navigation/native": "^5.9.4", "@react-navigation/stack": "^5.14.5", "accordion-collapse-react-native": "^1.0.1", "i18next": "^20.3.3", "patch-package": "^6.4.7", "react": "17.0.1", "react-i18next": "^11.11.3", "react-native": "0.64.2", "react-native-adjust": "^4.29.4", "react-native-app-intro-slider": "^4.0.4", "react-native-bouncy-checkbox": "^2.1.3", "react-native-calendars": "^1.1264.0", "react-native-collapsible": "^1.6.0", "react-native-datepicker": "^1.7.2", "react-native-device-info": "^8.3.1", "react-native-dropdownalert": "^4.3.0", "react-native-eject": "^0.1.2", "react-native-expandable-listview": "^1.3.1", "react-native-gesture-handler": "^1.10.3", "react-native-image-picker": "^4.0.6", "react-native-image-zoom-viewer": "^3.0.1", "react-native-linear-gradient": "^2.5.6", "react-native-material-textfield": "^0.16.1", "react-native-modalize": "^2.0.8", "react-native-onesignal": "^4.3.1", "react-native-paper": "^4.10.1", "react-native-phone-number-input": "^2.1.0", "react-native-portalize": "^1.0.7", "react-native-reanimated": "^2.2.0", "react-native-restart": "0.0.22", "react-native-safe-area-context": "^3.3.2", "react-native-screens": "^3.4.0", "react-native-skeleton-placeholder": "^5.0.0", "react-native-snap-carousel": "^3.9.1", "react-native-status-bar-height": "^2.6.0", "react-native-svg": "^12.1.1", "react-native-svg-uri": "^1.2.3", "react-native-typing-animation": "^0.1.7", "react-native-vector-icons": "^8.1.0", "react-native-webview": "^11.6.5", "react-native-youtube-iframe": "^2.1.1", "react-redux": "^7.2.4", "redux": "^4.1.0", "redux-thunk": "^2.3.0", "switch-button-react-native": "^1.0.3" }, "devDependencies": { "@babel/core": "7.14.6", "@babel/runtime": "7.14.6", "@react-native-community/eslint-config": "2.0.0", "babel-jest": "26.6.3", "eslint": "7.14.0", "jest": "26.6.3", "metro-react-native-babel-preset": "0.64.0", "react-test-renderer": "17.0.1" }, "jest": { "preset": "react-native" } }