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.

[2.3.0] Cannot build on android

See original GitHub issue

Description

Version 2.3.0 does not build on android. Looks like it’s importing code from the ansi-styles package which is a NodeJS package not compatible with Hermes.

Platforms

  • iOS
  • Android
  • Web

Screenshots

Steps To Reproduce

  1. ./gradlew bundleRelease

Expected behavior

App builds

Actual behavior

info Writing bundle output to:, /Users/gabriel/Code/pom/fom-native/android/app/build/generated/assets/react/development/release/index.android.bundle
info Writing sourcemap output to:, /Users/gabriel/Code/pom/fom-native/android/app/build/intermediates/sourcemaps/react/development/release/index.android.bundle.packager.map
info Done writing bundle output
info Done writing sourcemap output
/Users/gabriel/Code/pom/fom-native/android/app/build/generated/assets/react/development/release/index.android.bundle:71915:25: error: Invalid regular expression: Quantifier has nothing to repeat
          var matches = /(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(hex.toString(16));

Snack or minimal code example

/**
 * @format
 */

import 'react-native-gesture-handler';
import { AppRegistry } from 'react-native';
import { name as appName } from './app.json';

const App = () => null;

AppRegistry.registerComponent(appName, () => App);

Package versions

  • React: 17.0.2
  • React Native: 0.67.2
  • React Native Gesture Handler: 2.3.0
  • React Native Reanimated: 2.3.2

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
j-piaseckicommented, Mar 14, 2022

@cinemanja It should be fixed in Gesture Handler 2.3.2.

1reaction
j-piaseckicommented, Mar 7, 2022

It seems the issue was due to the new Gesture Handler testing API introduced in 2.3.0. Above PR should be fixing the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cannot build project after upgrading Android Studio to 2.3
So, happily updated my Android Studio from stable version 2.2 to canary channel 2.3. But, unfortunately, it has serious bug. Project is not...
Read more >
Room - Android Developers
To use Room with KSP, you can apply the KSP Gradle plugin and replace the kapt configuration in your build file with ksp...
Read more >
com.android.tools.build:gradle:2.3.0 failed to compile ...
With 2.2.3 my project compiles, but with 2.3.0 it fails with: IllegalArgumentException (no error message) on: :app:processDebugResources FAILED Build: 2.3 ...
Read more >
Cant build project with Android Studio 2.3 and Gradle-kotlin
extract that to ' C:\Program Files\Android\Android Studio\gradle ' · open android studio and go to ' File>Setting>Build, Execution,Deployment>Gradle ' and choose ...
Read more >
What is this error in build adroid and build app bundle in unity ...
Could not resolve all artifacts for configuration ':classpath'. Could not resolve com.android.tools.build:gradle:2.3.0.
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