Can't use the repository
matheus-foscarinid opened this issue · 3 comments
Platform Android
Hello guys, its my first post :)
I am really a beginner student and for my high school conclusion work I have to use a library to deal with BLE Beacons, the problem is that when I install the dependency, the app doesn't open anymore, maybe it is a very simple error but I really got stuck, what I did:
Steps to reproduce
- react-native init MyProject
- cd MyProject
- react-native run-android (until here the app is still working)
- npm install react-native-beacons-manager
- react-native link react-native-beacons-manager
6.3. react-native run-android (until here the app is still working)
Actual behavior
so, here it stops working
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 967 file(s) to forward-jetify. Using 4 workers...
info JS server already running.
info Installing the app...
> Configure project :react-native-beacons-manager
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed soon. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.5.2.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
> Task :react-native-beacons-manager:javaPreCompileDebug FAILED
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.0.1/userguide/command_line_interface.html#sec:command_line_warnings
11 actionable tasks: 2 executed, 9 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-beacons-manager:javaPreCompileDebug'.
> Could not resolve all files for configuration ':react-native-beacons-manager:debugCompileClasspath'.
> Failed to transform react-native-0.12.0.aar (com.facebook.react:react-native:0.12.0) to match attributes {artifactType=android-classes, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.
> Execution failed for AarToClassTransform: C:\Users\Usuario\.gradle\caches\modules-2\files-2.1\com.facebook.react\react-native\0.12.0\20e2c83f3f507ca5c0c73e7cb08263308b4b1d6f\react-native-0.12.0.aar.
> duplicate entry: META-INF/MANIFEST.MF
> Failed to transform support-v4-23.0.1.aar (com.android.support:support-v4:23.0.1) to match attributes {artifactType=android-classes, org.gradle.status=release, org.gradle.usage=java-api}.
> Execution failed for AarToClassTransform: C:\Users\Usuario\.gradle\caches\modules-2\files-2.1\com.android.support\support-v4\23.0.1\9e8da0e4ecf9f63258c7fbd273889252cba2d0c3\support-v4-23.0.1.aar.
> duplicate entry: META-INF/MANIFEST.MF
> Failed to transform support-v4-23.0.1.aar (com.android.support:support-v4:23.0.1) to match attributes {artifactType=android-classes, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.
> Execution failed for AarToClassTransform: C:\Users\Usuario\.gradle\caches\modules-2\files-2.1\com.android.support\support-v4\23.0.1\9e8da0e4ecf9f63258c7fbd273889252cba2d0c3\support-v4-23.0.1.aar.
> duplicate entry: META-INF/MANIFEST.MF
* 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 8s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-beacons-manager:javaPreCompileDebug'.
> Could not resolve all files for configuration ':react-native-beacons-manager:debugCompileClasspath'.
> Failed to transform react-native-0.12.0.aar (com.facebook.react:react-native:0.12.0) to match attributes {artifactType=android-classes, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.
> Execution failed for AarToClassTransform: C:\Users\Usuario\.gradle\caches\modules-2\files-2.1\com.facebook.react\react-native\0.12.0\20e2c83f3f507ca5c0c73e7cb08263308b4b1d6f\react-native-0.12.0.aar.
> duplicate entry: META-INF/MANIFEST.MF
> Failed to transform support-v4-23.0.1.aar (com.android.support:support-v4:23.0.1) to match attributes {artifactType=android-classes, org.gradle.status=release, org.gradle.usage=java-api}.
> Execution failed for AarToClassTransform: C:\Users\Usuario\.gradle\caches\modules-2\files-2.1\com.android.support\support-v4\23.0.1\9e8da0e4ecf9f63258c7fbd273889252cba2d0c3\support-v4-23.0.1.aar.
> duplicate entry: META-INF/MANIFEST.MF
> Failed to transform support-v4-23.0.1.aar (com.android.support:support-v4:23.0.1) to match attributes {artifactType=android-classes, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.
> Execution failed for AarToClassTransform: C:\Users\Usuario\.gradle\caches\modules-2\files-2.1\com.android.support\support-v4\23.0.1\9e8da0e4ecf9f63258c7fbd273889252cba2d0c3\support-v4-23.0.1.aar.
> duplicate entry: META-INF/MANIFEST.MF
* 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 8s
at makeError (C:\Users\Usuario\Desktop\Coisas do Beacon\Biblioteca dos Beacons\Testando Bibliotecas com o Adri\BibliotecaBeacons\node_modules\execa\index.js:174:9)
at C:\Users\Usuario\Desktop\Coisas do Beacon\Biblioteca dos Beacons\Testando Bibliotecas com o Adri\BibliotecaBeacons\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async runOnAllDevices (C:\Users\Usuario\Desktop\Coisas do Beacon\Biblioteca dos Beacons\Testando Bibliotecas com o Adri\BibliotecaBeacons\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:5)
at async Command.handleAction (C:\Users\Usuario\Desktop\Coisas do Beacon\Biblioteca dos Beacons\Testando Bibliotecas com o Adri\BibliotecaBeacons\node_modules\@react-native-community\cli\build\index.js:186:9)
Expected behavior
What should happen
I think it should work, but I'm really a beginner, I have 0 experience in RN and mobile development
Try to use the newest (unreleased) version of this package.
In package.json change to:
"react-native-beacons-manager": "git://github.com/MacKentoch/react-native-beacons-manager.git#53c1bda",
and run yarn or npm install again.
Try to use the newest (unreleased) version of this package.
In package.json change to:
"react-native-beacons-manager": "git://github.com/MacKentoch/react-native-beacons-manager.git#53c1bda",
and run yarn or npm install again.
Ohhh, thanks @nbastoWM . It really helped us!
@matheus-foscarinid @nbastoWM Are you able to scan the iBeacons using this library?
If yes could you please share your code or help me in fixing this issue.