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
}
Related
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.
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 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 want to use the jitsi_meet flutter package example.
https://github.com/gunschu/jitsi_meet
clone is done.
but when I run it gradle sends an error.
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':jitsi_meet:compileDebugAidl'.
Could not resolve all task dependencies for configuration ':jitsi_meet:debugCompileClasspath'.
Could not resolve org.jitsi.react:jitsi-meet-sdk:2.8.0.
Required by:
project :jitsi_meet
Could not resolve org.jitsi.react:jitsi-meet-sdk:2.8.0.
Could not get resource 'https://github.com/jitsi/jitsi-maven-repository/raw/master/releases/org/jitsi/react/jitsi-meet-sdk/2.8.0/jitsi-meet-sdk-2.8.0.pom'.
Could not GET 'https://raw.githubusercontent.com/jitsi/jitsi-maven-repository/master/releases/org/jitsi/react/jitsi-meet-sdk/2.8.0/jitsi-meet-sdk-2.8.0.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
BUILD FAILED in 1m 49s
Finished with error: Gradle task assembleDebug failed with exit code 1
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
Here is my build.gradle file:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
And here is gradle-wrapper:
#Fri Jan 12 02:39:29 EST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip
The full error trace is here:
Error:FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'CryptoGallery'.
> Could not resolve all files for configuration ':classpath'.
> Could not find com.android.tools.build:gradle:4.1.
Searched in the following locations:
file:/home/xavi/android-studio/gradle/m2repository/com/android/tools/build/gradle/4.1/gradle-4.1.pom
file:/home/xavi/android-studio/gradle/m2repository/com/android/tools/build/gradle/4.1/gradle-4.1.jar
https://jcenter.bintray.com/com/android/tools/build/gradle/4.1/gradle-4.1.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/4.1/gradle-4.1.jar
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1/gradle-4.1.pom
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1/gradle-4.1.jar
Required by:
project :
* 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 0s
I took a look in the directory /home/xavi/android-studio/gradle/m2repository/com/android/tools/build/gradle/4.1/ and saw that I do have a gradle 4.1 build, but it doesn't contain a simple .jar like the others do. It's the full download from the official gradle website. It contains many executables, but none labeled gradle-4.1.jar like the others.
Edit: After changing classpath to the correct line, android studio prompts me to update my gralde to 4.4.1, and I get a traceback.
Don't confuse gradle with the androd plugin for gradle.
Change:
classpath 'com.android.tools.build:gradle:4.1'
with:
classpath 'com.android.tools.build:gradle:3.0.1'
More info here.