question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could not find com.redmadrobot:input-mask-android:6.0.0 error

See original GitHub issue

Hello,

When I installed the react-native-text-input-mask package on new React Native project and try to run on Android, I’m getting the following error.

* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.redmadrobot:input-mask-android:6.0.0.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/com/redmadrobot/input-mask-android/6.0.0/input-mask-android-6.0.0.pom
       - file:/C:/Users/username/.m2/repository/com/redmadrobot/input-mask-android/6.0.0/input-mask-android-6.0.0.pom
       - file:/C:/dosyalar/mobile/Test/node_modules/react-native/android/com/redmadrobot/input-mask-android/6.0.0/input-mask-android-6.0.0.pom
       - file:/C:/dosyalar/mobile/Test/node_modules/jsc-android/dist/com/redmadrobot/input-mask-android/6.0.0/input-mask-android-6.0.0.pom
       - https://dl.google.com/dl/android/maven2/com/redmadrobot/input-mask-android/6.0.0/input-mask-android-6.0.0.pom
       - https://www.jitpack.io/com/redmadrobot/input-mask-android/6.0.0/input-mask-android-6.0.0.pom
     Required by:
         project :app > project :react-native-text-input-mask

* 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 7s

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:10
  • Comments:9

github_iconTop GitHub Comments

27reactions
raulmax319commented, Sep 6, 2021

Hi, this is due to the removal of jcenter() from react-native v0.65+ to mavenCentra(). Since this package uses an implementation called Input Mask Android from jcenter react-native can’t find the repo anymore. You could just add jcenter() back to your android/build.gradle file as a workaround until Input Mask Android moves to mavenCentral repository.

Like this:

allprojects {
    repositories {
        mavenCentral()
        mavenLocal()
        // ...
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }

        google()
        jcenter() <- Added Back
        maven { url 'https://www.jitpack.io' }
    }
}
22reactions
TheSalarKhancommented, Oct 11, 2021

Thanks @mccooll it worked for me.

I’m using react native 0.66. And this patch worked for me

diff --git a/android/build.gradle b/android/build.gradle
index 36d98e3..33dee63 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -36,4 +36,11 @@ allprojects {
         google()
         maven { url 'https://www.jitpack.io' }
     }
+    configurations.all {
+        resolutionStrategy {
+            dependencySubstitution {
+                substitute module("com.redmadrobot:input-mask-android:6.0.0") using module('com.github.RedMadRobot:input-mask-android:6.0.0')
+            }
+        }
+    }
 }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not find com.android.tools.build:gradle:7.3.3. error ...
The "com.android.tools.build:gradle:$version" is what we called Android Gradle Plugin(AGP), its latest stable version is 7.0.4 (until 1st ...
Read more >
How to fix "Could not find com.android.tools.build.gradle" error ...
A quick fix is given for error " Could not find com.android.tools.build.gradle" in android studio#build#gradle#AndroidStudio# error.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found