map-ir/mapir-react-native-sdk

App won't run on android

1mehdifaraji opened this issue · 1 comments

I did all the required installation and still can't run the app .

"dependencies": {
"mapir-react-native-sdk": "^2.2.4",
"react": "17.0.2",
"react-native": "0.66.1"
},

Task :@react-native-mapbox-gl_maps:compileDebugJavaWithJavac FAILED
8 actionable tasks: 1 executed, 7 up-to-date

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':@react-native-mapbox-gl_maps:compileDebugJavaWithJavac'.

Could not resolve all files for configuration ':@react-native-mapbox-gl_maps:debugCompileClasspath'.
Failed to transform appcompat-1.0.0.jar (androidx.appcompat:appcompat:1.0.0) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.
> Could not find appcompat-1.0.0.jar (androidx.appcompat:appcompat:1.0.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.0.0/appcompat-1.0.0.jar
Failed to transform vectordrawable-1.0.0.jar (androidx.vectordrawable:vectordrawable:1.0.0) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.
> Could not find vectordrawable-1.0.0.jar (androidx.vectordrawable:vectordrawable:1.0.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/vectordrawable/vectordrawable/1.0.0/vectordrawable-1.0.0.jar
Failed to transform legacy-support-core-utils-1.0.0.jar (androidx.legacy:legacy-support-core-utils:1.0.0) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.
> Could not find legacy-support-core-utils-1.0.0.jar (androidx.legacy:legacy-support-core-utils:1.0.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/legacy/legacy-support-core-utils/1.0.0/legacy-support-core-utils-1.0.0.jar
Failed to transform core-1.0.0.jar (androidx.core:core:1.0.0) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.
> Could not find core-1.0.0.jar (androidx.core:core:1.0.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/core/core/1.0.0/core-1.0.0.jar

  • 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 6s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':@react-native-mapbox-gl_maps:compileDebugJavaWithJavac'.

Could not resolve all files for configuration ':@react-native-mapbox-gl_maps:debugCompileClasspath'.
Failed to transform appcompat-1.0.0.jar (androidx.appcompat:appcompat:1.0.0) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.
> Could not find appcompat-1.0.0.jar (androidx.appcompat:appcompat:1.0.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.0.0/appcompat-1.0.0.jar
Failed to transform vectordrawable-1.0.0.jar (androidx.vectordrawable:vectordrawable:1.0.0) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.
> Could not find vectordrawable-1.0.0.jar (androidx.vectordrawable:vectordrawable:1.0.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/vectordrawable/vectordrawable/1.0.0/vectordrawable-1.0.0.jar
Failed to transform legacy-support-core-utils-1.0.0.jar (androidx.legacy:legacy-support-core-utils:1.0.0) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.
> Could not find legacy-support-core-utils-1.0.0.jar (androidx.legacy:legacy-support-core-utils:1.0.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/legacy/legacy-support-core-utils/1.0.0/legacy-support-core-utils-1.0.0.jar
Failed to transform core-1.0.0.jar (androidx.core:core:1.0.0) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.
> Could not find core-1.0.0.jar (androidx.core:core:1.0.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/core/core/1.0.0/core-1.0.0.jar

  • 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 6s

at makeError (/Users/mahdifaraji/Desktop/react-native-sample/node_modules/execa/index.js:174:9)
at /Users/mahdifaraji/Desktop/react-native-sample/node_modules/execa/index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async runOnAllDevices (/Users/mahdifaraji/Desktop/react-native-sample/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:106:5)
at async Command.handleAction (/Users/mahdifaraji/Desktop/react-native-sample/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js:192:9)

I solved the issue by installing older version of react native

"dependencies": {
"mapir-react-native-sdk": "^2.2.4",
"react": "16.11.0",
"react-native": "0.62.2"
},

Please add support to the latest react native version 0.66

I still could not run the project in iOS because of xcode version incompatibility .