Could not determine wrapper version - react-native

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

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.

Library linking issue after upgrading to React Native 0.70.3

We upgraded the mobile development project we are working on to React Native v0.70.3 from 0.66.4 and our build starting to give all sort of issue in our build server after that. Both iOS and Android builds are failing with following error messages.
Android:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':react-native-camera-kit:verifyReleaseResources'.
A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
Android resource linking failed
ERROR:/Users/jenkinsoffshore/CICDBuilds/workspace/Mobile-Service-Android/node_modules/react-native-camera-kit/android/build/intermediates/merged_res/release/values/values.xml:2784: AAPT: error: resource android:attr/lStar not found.
iOS:
iOS build ends in success and we can upload to testflight as well. but getting the following error in email and the app crashes in devices.
ITMS-90863: Apple silicon Macs support issue - The app links with libraries that are not present on Mac:
#rpath/hermes.framework/hermes
After you’ve corrected the issues, you can upload a new binary to App Store Connect
We upgraded the MacOS version to Ventura and Xcode along with in the build machine. In developer machine both builds work fine.
Do we have to do anything specifically after upgrading to React Native 0.70.3?
Downgrade to atmost react-native 0.69
Rebuilding the server completely solve the issue. We had to setup everything from scratch. There must be a simple solution that that but project deadlines made us to go for a full re-inttall.

React Native iOS No Bundle URL present but only when using a real device

I am trying to build a project that we have previously built many times on a real device through xcode but not it throws a No Bundle URL present error the moment the app boots.
I have tried updating the app, rebooting and updating the info.plist file but nothing seems to change it.
Other apps are booting fine.
I have my info and the error below.
Error Screen
Check whether you are running correct Project. Clean you build folder and then Run .
Seems like this is a common issue for some. I'd suggest checking out this thread with others that had a similar issue - What is the meaning of 'No bundle URL present' in react-native?

React native init not working

I posted this in the react native github but was asked to post here
I following the instructions on the website to get a react native app up and running.
I get the following messages
Genymotion Andriod simulator Reference Error: can't find variable _fbBatchedBridge
IOS simulator Unable to execute JS call: _fbBatchedBridge is undefined
React Package Manager synchonization failed
React native version 0.18.0
React native cli 0.1.10
Node 4.2.4
Mac Os X Yosemite
XCode Version 7.2
In researching this many claim that the issue is with the network. I opened a browser pointing at localhost:8081 and get a webpage with Cannot GET /
Currently I am not getting any error message on the IOS simulator, just a blank white screen. Android is still giving the same error message on both Genymotion and on my local android device.
There are no error messages on the Terminal or in XCode.
This is very frustrating to try to troubleshoot since I have no idea why it is not working and even where to start.
This error is because the script server is not running.
For Android version, in addition to execute 'react-native run-android' to build the app, you need to execute 'react-native start' to start the script server.
In XCode when you run the application the terminal should be started automatically, but it seems something is wrong in your case. Did you try to close the terminal window and start over?
==============================
when you first start the script server, the console should show
[18:07:15] <START> Building Dependency Graph
[18:07:15] <START> Crawling File System
[18:07:15] <START> Loading bundles layout
[18:07:15] <END> Loading bundles layout (1ms)
React packager ready.
When your client connects to the server, the console should show
[18:07:25] <START> request:/index.android.bundle?platform=android&dev=true
[18:07:25] <START> find dependencies
[18:08:01] <END> Crawling File System (45771ms)
[18:08:01] <START> Building in-memory fs for JavaScript
[18:08:04] <END> Building in-memory fs for JavaScript (3382ms)
[18:08:04] <START> Building in-memory fs for Assets
...
if the second part was not showing up, you may want to check whether you can use the port:
With this image you can see the url should be http://localhost:8081/index.android.bundle?platform=android&dev=true . If you cannot open it in your browser you may need to check your firewall setting or anything else blocking the access.
Also you may want to search index.android.bundle in your native code to check whether the dev url has been modified.

Worklight build error Failed initializing ClientProjectBuilder

I have suddenly started getting worklight build errors like below. I have no clue why it started happening suddenly. The code was working fine until the remote machine I use for Xcode builds was rebooted. Any clue what could be causing it ?
ipad build failed: Failed initializing ClientProjectBuilder
android build failed: Failed initializing ClientProjectBuilder
iphone build failed: Failed initializing ClientProjectBuilder
Regards
Avi
The solution to this error, typically, is to delete the wlBuildResources folder, located in the TMPDIR of the OS.
See here: Worklight - FWLST1040E: android build failed: java.io.FileNotFoundException
Close Eclipse
Locate your temp folder (Windows, OS X)
Delete the wlBuildResources folder
Open Eclipse
Re-build
It may be helpful to also delete the native folder before closing Eclipse, however do note that if you have written custom native code you should first back it up so it won't be lost(!).