Error getting while creating release build in react native
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':react-native-community_clipboard:verifyReleaseResources'.
> Could not resolve all task dependencies for configuration ':react-native-community_clipboard:releaseRuntimeClasspath'.
> Could not resolve com.facebook.react:react-native:+.
Required by:
project :react-native-community_clipboard
> Failed to list versions for com.facebook.react:react-native.
> Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml.
> Could not GET 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'.
> Read timed out
* 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.
Error found during release build in react native
Currently jcenter down
Solution
try replace jCenter() to mavenCentral() to your project gradle
repositories {
google()
mavenCentral()
}
As from here, replace jcenter() with mavenCentral() in your android/app/build.gradle.
Actually, based on the posted issue on Github a temporary solution could be like the following on the android/build.gradle file:
all { ArtifactRepository repo ->
if(repo instanceof MavenArtifactRepository){
def url = repo.url.toString()
if (url.startsWith('https://jcenter.bintray.com/')) {
remove repo
}
}
}
In my case, it was happing in one of node_modules's package and I used patch-package to keep the solution in the production.
Related
does some one has already attemted use this https://github.com/CanHub/Android-Image-Cropper
library ? could please to send your own github or explain me how to setup. I've setted up but always graddle failing . because I've attempted to setup this library
but in gradle syncning time always I'm getting build faild .
please without bulling or hating
Execution failed for task ':app:mergeDebugNativeLibs'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.github.CanHub:Android-Image-Cropper:3.3.4.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/github/CanHub/Android-Image-Cropper/3.3.4/Android-Image-Cropper-3.3.4.pom
- https://repo.maven.apache.org/maven2/com/github/CanHub/Android-Image-Cropper/3.3.4/Android-Image-Cropper-3.3.4.pom
- https://jcenter.bintray.com/com/github/CanHub/Android-Image-Cropper/3.3.4/Android-Image-Cropper-3.3.4.pom
Required by:
project :app
* 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 8.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/7.0.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 1s
19 actionable tasks: 18 executed, 1 up-to-date
Because of updating ArctixFox Android Studio allproject {repositories } not exist anymore maven { url 'https://jitpack.io' } whe should I add this
From the error you are getting, it seems like Gradle is unable to resolve CanHub dependency. It could be most probably because you may not have included the jitpack repository in your project's build.gradle (not module's build.gradle).
To add jitpack to the repositories, add maven { url 'https://jitpack.io' } to your project level build.gradle
buildscript {
repositories {
....
maven { url 'https://jitpack.io' }
}
}
Because of updating ArctixFox Android Studio allproject {repositories } not exist anymore
allprojects is still available to use in project-level build.gradle, but now it's not get added by default to the new project, and you would get a GradleScriptException after adding it, as the build is configured to prefer settings.gradle over it.
setting.gradle now includes a dependencyResolutionManagement. If you want to add new repositories using allprojects you have to comment or remove dependencyResolutionManagement, or you can just add your repositories to the repositories block of dependencyResolutionManagement in settings.gradle
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
I'm trying to use the dependency of TouchImageView for android. I'm unable to use the functions in the class and getting this error in Log
[1]: https://github.com/MikeOrtiz/TouchImageView
Task failed with an exception.
What went wrong:
Execution failed for task ':hideItPro:mergeDebugNativeLibs'.
Could not resolve all files for configuration ':hideItPro:debugRuntimeClasspath'.
Could not resolve com.github.MikeOrtiz:TouchImageView:1.1.1.
Required by:
project :hideItPro
> Could not resolve com.github.MikeOrtiz:TouchImageView:1.1.1.
> Could not get resource 'https://s3.amazonaws.com/moat-sdk-builds/com/github/MikeOrtiz/TouchImageView/1.1.1/TouchImageView-1.1.1.pom'.
> Could not GET 'https://s3.amazonaws.com/moat-sdk-builds/com/github/MikeOrtiz/TouchImageView/1.1.1/TouchImageView-1.1.1.pom'. Received status code 403 from server: Forbidden
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 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 27s
303 actionable tasks: 270 executed, 33 up-to-date
In settings.gradle
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
//here the dependency
maven { url 'https://jitpack.io' }
jcenter() // Warning: this repository is going to shut down soon
}
}
include ':app'
rootProject.name = "Apk"
this worked for me
Add maven repository in project build.gradle file,
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add dependencies in app build.gradle file,
dependencies {
...
implementation 'com.github.MikeOrtiz:TouchImageView:1.4.1' // last SupportLib version
// or
implementation 'com.github.MikeOrtiz:TouchImageView:$LAST_VERSION' // Android X
}
I am trying to add Neumorphism and DayNightSwitch dependency in Android but the build failed every time.
I tried many times but I didn’t figured out what's the problem is.
The gradle plugin is 7.2 and the Gradle version is 7.0.1
Neumorphism dependency
dependencies {
implementation 'com.github.fornewid:neumorphism:{latest_version}'
}
DayNightSwitch dependency
dependencies {
implementation 'com.github.Mahfa:DayNightSwitch:1.4'
}
8: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.github.fornewid:neumorphism:0.3.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/github/fornewid/neumorphism/0.3.0/neumorphism-0.3.0.pom
- https://repo.maven.apache.org/maven2/com/github/fornewid/neumorphism/0.3.0/neumorphism-0.3.0.pom
Required by:
project :app
* 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.
Please try to specify a version for the dependency
implementation 'com.github.fornewid:neumorphism:0.3.0'
Please add Neumorphism dependecy in your app level build.gradle as below,:
implementation 'com.github.fornewid:neumorphism:0.3.0'
And add these lines inside dependencyResolutionManagement to your Settings.gradle:
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
jcenter() // Warning: this repository is going to shut down soon
}
I am trying to run my first sample flutter app in Intelij IDE, but I get an error which I am unable to resolve.
What I did was, File > New > Project, then I chose flutter, and gave the app name, and clicked Ok.
Next when the interface loaded, I connected my phone and then I saw it displayed in the top right corner, and beside it I selected main.dart and pressed the green play button, but int the console I got an error.
Initializing gradle...
Resolving dependencies...
Launching lib/main.dart on CP8676 I02 in profile mode...
Gradle task 'assembleProfile'...
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':app:_internal_aapt2_binary'.
> Could not resolve com.android.tools.build:aapt2:3.2.1-4818971.
Required by:
project :app
> Could not resolve com.android.tools.build:aapt2:3.2.1-4818971.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/3.2.1-4818971/aapt2-3.2.1-4818971.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/3.2.1-4818971/aapt2-3.2.1-4818971.pom'.
> dl.google.com: Name or service not known
> Could not resolve com.android.tools.build:aapt2:3.2.1-4818971.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/aapt2/3.2.1-4818971/aapt2-3.2.1-4818971.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/aapt2/3.2.1-4818971/aapt2-3.2.1-4818971.pom'.
> jcenter.bintray.com: Name or service not known
* 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 30s
Finished with error: Gradle task assembleProfile failed with exit code
My build.gradle file:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Here is my build.gradle file.I see that when I hover over the buildscript, intellij says, cannot resolve symbol 'buildscript', the same occours for other definitions such as repositories in this file.
i am developing sample application in react-native , i faced this issue when i was run- android emulator my sdk tool version is 25 , but i don't know how it is getting this issue please let me suggestion.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:3.1.0.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:3.1.0.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.0/gradle-3.1.0.pom'.
> org.apache.http.ssl.SSLInitializationException: \Library\Java\Home\jre\lib\security\cacerts (The system cannot find the path specified)
> Could not resolve com.android.tools.build:gradle:3.1.0.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.1.0/gradle-3.1.0.pom'.
> org.apache.http.ssl.SSLInitializationException: \Library\Java\Home\jre\lib\security\cacerts (The system cannot find the path specified)
> Could not resolve com.google.gms:google-services:3.2.0.
Required by:
project :
> Could not resolve com.google.gms:google-services:3.2.0.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/google/gms/google-services/3.2.0/google-services-3.2.0.pom'.
> org.apache.http.ssl.SSLInitializationException: \Library\Java\Home\jre\lib\security\cacerts (The system cannot find the path specified)
> Could not resolve com.google.gms:google-services:3.2.0.
> Could not get resource 'https://jcenter.bintray.com/com/google/gms/google-services/3.2.0/google-services-3.2.0.pom'.
> org.apache.http.ssl.SSLInitializationException: \Library\Java\Home\jre\lib\security\cacerts (The system cannot find the path specified)
* 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
Your project can not access the urls to download the necessary libraries. This is most probably a gradle configuration issue.
Change your Project level build.gradle file like this:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
Update
If it doesn't work, try this too:
repositories {
jcenter()
maven { url 'https://maven.google.com' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha2'
...
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
}
}
Try Using
classpath 'com.android.tools.build:gradle:3.0.1'
and then
clean and rebuild.
File > Invalidate cache and restart
It works for me!!