Can't get dependencies for first Android Studio gradle build

#1

Hey everyone,
just ejected my Expo project to android. and opened the android folder with android studio.
on my first try to build, i got a failure to download almost any dependency.

the dependencies failing:
api ‘com.facebook.react:react-native:32.0.0’
api ‘host.exp.exponent:expo-app-loader-provider:1.0.0’
api ‘host.exp.exponent:expo-core:2.0.0’
api ‘host.exp.exponent:expo-constants-interface:2.0.0’
api ‘host.exp.exponent:expo-constants:2.0.0’
api ‘host.exp.exponent:expo-errors:1.0.0’
api ‘host.exp.exponent:expo-file-system-interface:2.0.0’
api ‘host.exp.exponent:expo-file-system:2.0.0’
api ‘host.exp.exponent:expo-image-loader-interface:2.0.0’
api ‘host.exp.exponent:expo-permissions:2.0.0’
api ‘host.exp.exponent:expo-permissions-interface:2.0.0’
api ‘host.exp.exponent:expo-sensors-interface:2.0.0’
api ‘host.exp.exponent:expo-react-native-adapter:2.0.0’
api ‘host.exp.exponent:expo-task-manager:1.0.0’
api ‘host.exp.exponent:expo-task-manager-interface:1.0.0’

when im trying to follow the link i get in the expception (for example: HttpRequestException: Could not GET ‘https://dl.google.com/dl/android/maven2/com/facebook/react/react-native/32.0.0/react-native-32.0.0.pom’)
i get a generic google 404 page. the same when it’s from JFrog or bintray (their 404 page).

I can’t accept that ALL of those dependencies are really not available.

Any offers/tips/help please?

Thanks in advance

#2

Hey @avihuja - those dependencies should not be downloaded from any remote maven repository, but rather should be included from your local machine. It’s hard to tell why gradle can’t find them without more information. Could you post the full error message that you get when you try to make a build, and also your package.json file? Also, what operating system are you on?

#3

I am also getting error on com.facebook.react. Trying to build on Mac after Eject. Below error message coming up after waiting for a few minutes on “Execute Project.afterEvaluate listener” step in Android Studio.

Could not find com.facebook.react:react-native:32.0.0.
Required by:
    project :app
Search in build.gradle files
#4

I have the same issue on ubuntu, after upgrading to Expo SDK32 from SDK31
on windows the build is ok…

#5

Hi, I could solve this issue by updating the version from 2.0.0 to 2.0.1


diff --git a/android/app/build.gradle b/android/app/build.gradle
index 29ae184..b258b87 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -227,7 +227,7 @@ dependencies { 
-    api 'host.exp.exponent:expo-location:2.0.0'
+    api 'host.exp.exponent:expo-location:2.0.1'

see also the currrent gradle of expo here

#6

The real problem was that the yarn.lock file was not commited which points to exact version
32.0.4 brakes the build so lock file must point to 32.0.3

...
expokit@^32.0.0:
  version "32.0.3"
  resolved "https://registry.yarnpkg.com/expokit/-/expokit-32.0.3.tgz#fa3760ad9b88a91d4f2b39e43ea716f864de6cc4"
  integrity sha512-CG+BhsPsjjonOX8ea0vxgC38T3v585fH9j5wv7lOXWt4LxPMh+EjUM7rV3/mD9yIL4WbI8GbBP6KtYbhuA9SlQ==
  dependencies:
    jsc-android "^224109.1.0"
 ...
#7

this is not my problem… now i can’t get the kotlin-reflect dependency… something is messed up

#8

I can confirm this fixed the issue for me as well.

#9

Hi, I found solve for you. It is worked for me

You need install the ExpoKit:
npm install --save expokit

1 Like
closed #10

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.