react-native-month-year-picker icon indicating copy to clipboard operation
react-native-month-year-picker copied to clipboard

Issue on Android with version 1.8.2

Open hoangduong9112 opened this issue 1 year ago • 3 comments

` 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 Note: /Users/dhd/InfraTech/MAStock/m-a-stock-mobile/node_modules/react-native-gradle-plugin/src/main/java/com/facebook/react/codegen/generator/SchemaJsonParser.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

  • Where: Build file '/Users/dhd/InfraTech/MAStock/m-a-stock-mobile/node_modules/react-native-month-year-picker/android/build.gradle' line: 115

  • What went wrong: A problem occurred configuring project ':react-native-month-year-picker'.

Could not resolve all files for configuration ':react-native-month-year-picker:implementation'. Could not resolve com.facebook.react:react-native:+. Required by: project :react-native-month-year-picker > Cannot choose between the following variants of com.facebook.react:react-native:0.69.2: - debugVariantDefaultRuntimePublication - releaseVariantDefaultRuntimePublication All of them match the consumer attributes: - Variant 'debugVariantDefaultRuntimePublication' capability com.facebook.react:react-native:0.69.2: - Unmatched attributes: - Provides com.android.build.api.attributes.BuildTypeAttr 'debug' but the consumer didn't ask for it - Provides org.gradle.category 'library' but the consumer didn't ask for it - Provides org.gradle.dependency.bundling 'external' but the consumer didn't ask for it - Provides org.gradle.libraryelements 'aar' but the consumer didn't ask for it - Provides org.gradle.status 'release' but the consumer didn't ask for it - Provides org.gradle.usage 'java-runtime' but the consumer didn't ask for it - Variant 'releaseVariantDefaultRuntimePublication' capability com.facebook.react:react-native:0.69.2: - Unmatched attributes: - Provides com.android.build.api.attributes.BuildTypeAttr 'release' but the consumer didn't ask for it - Provides org.gradle.category 'library' but the consumer didn't ask for it - Provides org.gradle.dependency.bundling 'external' but the consumer didn't ask for it - Provides org.gradle.libraryelements 'aar' but the consumer didn't ask for it - Provides org.gradle.status 'release' but the consumer didn't ask for it - Provides org.gradle.usage 'java-runtime' but the consumer didn't ask for it

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

at makeError (/Users/dhd/InfraTech/MAStock/m-a-stock-mobile/node_modules/execa/index.js:174:9)
at /Users/dhd/InfraTech/MAStock/m-a-stock-mobile/node_modules/execa/index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (/Users/dhd/InfraTech/MAStock/m-a-stock-mobile/node_modules/react-native/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:109:5)
at async Command.handleAction (/Users/dhd/InfraTech/MAStock/m-a-stock-mobile/node_modules/@react-native-community/cli/build/index.js:192:9)

info Run CLI with --verbose flag for more details. `

I get this error when run on android with version 1.8.2

hoangduong9112 avatar Aug 30 '22 03:08 hoangduong9112

I found a solution for this issue. I use patch-package (https://www.npmjs.com/package/patch-package) to fix lib (react-native-month-year). In /node_modules/react-native-month-year-picker/android/build.gradle. remove line 115: classpath += files(project.getConfigurations().getByName('implementation').asList())

hoangduong9112 avatar Aug 30 '22 03:08 hoangduong9112

getting the same issue @gusparis https://github.com/gusparis/react-native-month-year-picker/pull/133

jeffreynerona avatar Sep 01 '22 04:09 jeffreynerona

I have the same issue

iamaralinvestplay avatar Oct 03 '22 15:10 iamaralinvestplay