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.
Related
I am building a React Native app and it works fine in debug mode, but when I try to build it in release mode, it shows a blank screen. I have tried several things to troubleshoot the issue, such as updating my dependencies and checking for any syntax errors, but I haven't been able to find the cause of the problem. I am not seeing any error messages, and the app seems to be working as expected in debug mode.
I am not sure what is causing the issue in release mode, and I would appreciate any help or suggestions.
Here is what I have tried so far:
I have checked that my React Native dependencies are up-to-date and correctly configured.
I have ensured that the bundle is being correctly packaged in the binary APK.
I have verified that there are no syntax errors in my code.
Use this error handler https://github.com/a7ul/react-native-exception-handler to catch problems in production. It supports both JS and Native side errors
I'm using react native to build my apps and thought to give Microsoft app center a chance.
The main issue I have is that I cannot finish the build.
This should be a non-production build that will be tested by the QA team.
This is the error I get:
I have found the issue.
I was the Gradle version, there is no 7.3**
The latest version is 7.1.1 so when I changed the URL to gradle-7.1.1-all.zip It worked.
I'm learning React Native and trying to add a component to an Expo Snack for testing. I can't even get the example app to work though.
Is it something different about how Snacks work vs. a desktop development environment? I've encountered that type of difference using JSFiddle, for example.
I straight copy-pasted the code from the Github repo into snack.expo.io and it gave me an error:
Device: (946:881) Unable to resolve module 'module://expo-font.js'
Evaluating module://expo-font.js
Evaluating module://react-native-numeric-input.js
Evaluating module://App.js
Loading module://App.js
I've gotten this error before, but I've never been able to figure out why. Is it an issue with the package, which was updated just 7 days ago, or something else? Please advise.
It may be due to missing of node modules in your project compared to the Github project. As the Stack.expo browser won't give us full freedom to install custom modules, I suggest you to download VS Code and open the Github project in it, then do "npm install" from cmd and "react-native run-android/ios".
I've created a react native app, by simply doing:
react-native init app
I've followed this tutorial: Facebook Getting Started (I use Linux)
and I have done exactly what it says.
However, when I try to run the app (react-native run-android), I got the following message:
Starting JS server...
Building and installing the app on the device (cd android && ./gradlew installDebug)...
Exception in thread "main" java.lang.RuntimeException: Could not determine wrapper version.
at org.gradle.wrapper.GradleWrapperMain.wrapperVersion(GradleWrapperMain.java:111)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Caused by: java.lang.RuntimeException: No build receipt resource found.
at org.gradle.wrapper.GradleWrapperMain.wrapperVersion(GradleWrapperMain.java:97)
... 1 more
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
```
How can I solve this problem?
According to this link
https://github.com/MinecraftForge/ForgeGradle/issues/227
it's because you have some special character in your project path (like "!")
I got the same issue in a Flutter project as I was organizing some of my projects. In my case also found that my source path contained special characters when I change the folders, after removing it works perfectly fine. This will usually happen to project that contains java code and I think this is because java is compiled based on the path you provide, so the compiler does not understand the special characters we used
I upgraded to react-native 0.16.0-rc, ran npm install, then ran react-native upgrade. When trying to launch the iOS app in a simulator (or device, doesn't matter) I get the error:
[error][tid:com.facebook.React.RCTExceptionsManagerQueue] Unhandled JS Exception: babelHelpers.interopRequireDefault is not a function. (In 'babelHelpers.interopRequireDefault(_reactNative)', 'babelHelpers.interopRequireDefault' is undefined)
I've just about run out of ideas here. Is there something I need to add to my xcode project maybe? Merging the latest react-native templates into mine was a nightmare so maybe something got messed up there.
This problem is discussed in this Github issue and fixed by this commit. You can apply this patch temporarily until it is merged into the project with the version 0.16.