درود. دوستان من برای این تست کنم ببینم بدون دسترسی به expo هم میتونم پروژه react native رو build بگیرم یا نه اول دستور npx expo prebuild رو زدم و برام پوشه android رو ساخت. بعد رفتم و توی تنظیمات gradle داخل پوشه اندروید maven mirror از مایکت رو گذاشتم. تا یه حدی خوب پیش رفت ولی الان این ارور رو میگیرم و نمیتونه به مخزن های رسمی وصل شه :
Execution failed for task ':expo-gradle-plugin:expo-autolinking-settings-plugin:compileKotlin'.
> Could not resolve all files for configuration ':expo-gradle-plugin:expo-autolinking-settings-plugin:compileClasspath'.
> Could not resolve com.android.tools.build:gradle:8.5.0.
Required by:
project :expo-gradle-plugin:expo-autolinking-settings-plugin
> Could not resolve com.android.tools.build:gradle:8.5.0.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/8.5.0/gradle-8.5.0.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/8.5.0/gradle-8.5.0.pom'.
> Got socket exception during request. It might be caused by SSL misconfiguration
> Connect to dl.google.com:443 [dl.google.com/142.250.75.174] failed: Connection timed out: no further information
> Could not resolve com.android.tools.build:gradle:8.5.0.
> Could not get resource 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/8.5.0/gradle-8.5.0.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/8.5.0/gradle-8.5.0.pom'.
> Got socket exception during request. It might be caused by SSL misconfiguration
> Connect to repo.maven.apache.org:443 [repo.maven.apache.org/104.18.19.12, repo.maven.apache.org/104.18.18.12] failed: Connection timed out: no further information
اینم تنظیماتم (ورژن jdk 21 هست) :
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https://maven.myket.ir/gradle/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
pluginManagement {
def reactNativeGradlePlugin = new File(
providers.exec {
workingDir(rootDir)
commandLine("node", "--print", "require.resolve('@react-native/gradle-plugin/package.json', { paths: [require.resolve('react-native/package.json')] })")
}.standardOutput.asText.get().trim()
).getParentFile().absolutePath
includeBuild(reactNativeGradlePlugin)
def expoPluginsPath = new File(
providers.exec {
workingDir(rootDir)
commandLine("node", "--print", "require.resolve('expo-modules-autolinking/package.json', { paths: [require.resolve('expo/package.json')] })")
}.standardOutput.asText.get().trim(),
"../android/expo-gradle-plugin"
).absolutePath
includeBuild(expoPluginsPath)
repositories {
maven { url 'https://maven.myket.ir' }
}
}
plugins {
id("com.facebook.react.settings")
id("expo-autolinking-settings")
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
maven { url 'https://maven.myket.ir' }
}
}
extensions.configure(com.facebook.react.ReactSettingsExtension) { ex ->
if (System.getenv('EXPO_USE_COMMUNITY_AUTOLINKING') == '1') {
ex.autolinkLibrariesFromCommand()
} else {
ex.autolinkLibrariesFromCommand(expoAutolinking.rnConfigCommand)
}
}
expoAutolinking.useExpoModules()
rootProject.name = 'MyExpoOfflineApp'
expoAutolinking.useExpoVersionCatalog()
include ':app'
includeBuild(expoAutolinking.reactNativeGradlePlugin)
و این :
buildscript {
repositories {
maven { url 'https://maven.myket.ir' }
}
}
allprojects {
repositories {
maven { url 'https://maven.myket.ir' }
}
}تا اینجایی که من میرور های ایرانی رو تست کردم. به نظر میاد هیچ کدومشون تمام دیپندنسی های لازم برای پروژه های ری اکت نیتیو رو ندارن.
اگر موفق شدی لطفا اطلاع بده
شاید پاسخ شما همینجا باشد