Execution failed for task ':react-native-bluetooth-escpos-printer:compileDebugJavaWithJavac' - react-native

so i got a problem, and i got this error already try finding solution in internet still not yet get it, idk what i forgot to put but the error start when i do yarn start
React native version: 0.71.2
already try to make the jcenter() still did not work, this is the new React Native version.
new mean to this date new

Related

Error when trying to build a React Native application with EAS

I'm trying to build a React Native application using Expo and rnmapbox/maps module, which includes some custom native code.
Up until now, I could build the application without any problems, for Android at least, which is my target platform. But suddenly, it stopped working and the following error log is displayed:
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin class 'org.gradle.api.plugins.BasePlugin'.
> Could not find method maven() for arguments [build_1quotit9ccucu377qnhf7kv5h$_run_closure1$_closure3$_closure5#4a87f9f7] on configuration ':app:archives' of type org.gradle.api.in
ternal.artifacts.configurations.DefaultConfiguration.
What is the problem and how can I possibly fix it?
The problem appears to be with Mapbox. We are experiencing the same error as you on our Android builds under eas build. We just removed the rnmapbox/maps dependency and commented out all the relevant code and our builds are passing.
I added the "image": "latest" field to eas.json configuration and it seemed to fix the problem.
Apparently, there was a bug with older versions.

can't find variable: require after android studio update

After updating my android studio version to Chipmunk 2021.2.1 patch 1 (I think I had bumble bee before). I get this "can't find variable require" error. I tried rolling my app back to a 24 days old stable build to check if it was an error in my code but on my stable branch, I still get the same "can't find variable require " error.
The app is a react native app (no expo) when running the app directly from react-native the same error still occurs.
thanks in advance

React native (Expo) project shows "cant find variable : require"

I am an intermediate react developer.
I was running my react native app peacefully without any problems untill one morning, i did not change anything in my codebase but when i tried to run the app through expo client, it started showing the error in the screenshot.
I have checked and checked this platform, and not a single solution.
I am currently using expo sdk 43 (managed workflow) please help...this is my first time posting here.
This is the error below;
Can't find variable: require
http://127.0.0.1:19000/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&minify=false:5:24.globalcode#http://127.0.0.1:19000/node_modules /expo/AppEntry.bundle?platform=android&dev=true& hot=false&minify=false:720:3.
Click here for the screenshot of the error
I got it fixed.
See what i did,
I created a fresh expo project using "expo init"
Then copied all my files into the new project "except node_modules and .expo folders".
Then i ran "npm install"
Viola!!! Everything works fine now
Note: i tried removing "node_modules" before over and over again and it dint work.
The only thing that worked was starting a new project and following the above steps.

React native app sourcemaps show incorrect location of error when error happens in asynchronous code

I have a react-native app. I recently moved to react-native version 0.61.5 for which I took the long route of creating a new react-native app and porting my code over to avoid any linking issues since new version used PODFILE as the default linking mechanism. Ever since I moved to version 0.61.5, I don't get the correct location of code in error logs. I think this is mainly happening when the code is running in asynchronous fashion which most of the code is. For e.g., look at below screenshot:
It is reporting that it is not able to call map on some array which is apparently undefined but the place where the error is reported is completely incorrect. I have no such file in my codebase and it is probably pointing to some file in some react-native package.
I am using Sentry #sentry/react-native": "^1.1.0". I don't think Sentry can cause issue with the sourcemaps reported during development.
I am not sure how to debug this problem. This problem is causing a lot of issues in debugging any errors as I have to manually figure out where the error happened. Please let me know if you have any tips on how to fix this problem.

React-native syntax error unexpected token import when trying to init a new app

since the update of React-native , when i try to create a new project with the react-native-cli or try to do a command to run a project that i upgrade i get this error. See on the image, it is an error that says import type CommandT from './commands': and i get an error unexpected token import,i want to know if there is a way to change that? even when i try the app with the old version of React-native , it doesn't load the app in the metro bundle
Me too got the same issue after updating react native to 0.56.00. I used the command
react-native init --version="0.55.0"
to create a project. Try this.