Getting this error while building a react-native iOS app on xcode: `React/RCTBridgeModule.h` file not found - react-native

React/RCTBridgeModule.h file not found
after a while of searching, here is my solution:
1. Disable the parallel builds:
+++Xcode menu -> Product -> Scheme -> Edit Schemes...
+++Double click on your application
+++Build tab -> uncheck Parallelize Build
+++Click on the '+' sign, then add React
enter image description here:
[1]: https://i.stack.imgur.com/IeEdK.png
[2]: https://i.stack.imgur.com/4w3pC.png

Related

When I load the react native navigation package for the first time, I get this error during compilation

An error occurred while launching the application. Unknown error: not all success patterns were matched.
It means that "react-native run-android" command failed.
Please, check the View -> Toggle Output -> React Native,
View -> Toggle Output -> React Native: Run android output windows. (error code 712) (error code 303)
enter image description here

Attempting To Run Kotlin Project In IntelliJ Idea But Getting Bug Error

My Previous Question + More
I am trying to start learning Kotlin, and I have installed IntelliJ Idea from JetBrains, I really like the layout of the IDE, and so I don't really want to change it.
Whenever I try to run the program, I get the following error:
Could not open init generic class cache for initialization script 'C:\Users\Jacob\AppData\Local\Temp\wrapper_init1.gradle' (C:\Users\Jacob\.gradle\caches\6.6.1\scripts\9x7j38tmeo1ohlyu8452ntfdm).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 60
I know it's not the code, and since I am not very familiar with IntelliJ Idea or Kotlin, I have no idea where to start looking for the error or where to fix it...
Someone said that this question's answers were the solution, but I looked their, tried what it shows, but still found now solution for my situation... When I follow what they say, I get the same error.
Someone please help!!! 😁
I created instruction:
Install JDK (for example Oracle JDK 14)
Open project folder with build.gradle and settings.gradle in Idea
Add JDK to project: press F4 on left Project Tool -> SDk -> Add -> Apply
Set new SDK to project: press F4 on left Project Tool -> Project -> Project SDK -> Set new SDK -> OK
Set new SDK to Gradle Build Tool: press Ctrl + Alt + S -> Find gradle in search -> Go to Gradle JVM -> Set new SDK -> OK
Create new directory src/main/kotlin/main.kt with code
fun main() {
val jdk = System.getProperty("java.version")
println("Using JDK: $jdk")
}
Go to main.kt in Editor and press Ctrl + Shift + F10 and you must see your JDK version in console like: Using JDK: 14.0.2
Take a look sample project

Not able to show image (API setDrawIcons() not found error)

I am using MPAndroidChart in our android project to show graph and it's very helpful. Using latest version 3.0.1 (https://github.com/PhilJay/MPAndroidChart#usage)
I have some requirement to show image on top of BarEntry after some condition met. Same is working in example code downloaded.
BarDataSet set1;
set1.setDrawIcons(true);// Cannot resolve method 'setDrawIcons(boolen)
Why the above API is not part of library MPChartLib, am I missing something here?
Above problem got solved after integrating MPChartLib source code.
File -> Project Structure
click plus button to add New Module
Import Gradle Project
from Source directory: and finish.
The setDrawIcons method was added in 3.0.2. Change your Gradle option to read compile 'com.github.PhilJay:MPAndroidChart:v3.0.2'

intellij "object index is not a member of package views.html"

I've got Intellij 15.0.5 and I cannot get rid of this error
object index is not a member of package views.
I've created a new play project in Intellij and also using the activator command
activator new PlayTestProject
But I keep getting the above error. I've read all the other similar question on SO but none of them helped and I've tried the following
Right click the project -> Add framework support -> select "Play 2"
Result: I didn't see any change to my project. When I hit OK, the window disappears but if I try the same the second time. Nothing happens and the window is still there!
Preferences -> Languages & Frameworks -> Play2 -> select "Use Play 2 compiler for this project"
Result: I get this error
Error:Module 'client' production: java.lang.NullPointerException
I've tried
invalidate cache & restart
sbt clean
checkout a fresh new project
But I keep getting the same error in Intellij.
Running sbt compile on command line runs the build successful. But Intellij keeps shows me the above error.
How do I fix this ?
Alright if anyone is running into the same problem. The fix was to mark the following two directories as Sources Roots in Intellij.
/target/twirl/main
/target/routes
Steps:
Right click the target folder -> Mark directory as -> Cancel exclusion (If you don't see Cancel exclusion do the next step.
Right click the target/scala-2.11/twirl/main folder -> Mark directory as -> Sources Root
Right click the target/scala-2.11/routes folder -> Mark directory as -> Sources Root
Right click the project Open module settings -> Sources -> and remove the above two directories if there are added in the Excluded folder's section.
This fixed my problem.
I found this problem and it appeared to be caused by an incomplete compile within sbt. (I had done "sbt clean ; sbt compile" but then aborted the compile with Ctrl+C because it had a error.)
Intellij worked correctly again after I ran:
sbt clean
After removing the .idea/ folder, I could successfully re-open/import my project, and the errors were gone.
Just remove the #() from top of index.scala.html because there are no parameters.
#()
<!DOCTYPE html>
<html lang="en">
And in Action you have
def index = Action {
Ok(views.html.index())
}
I had a similar error and just had to run npm install to fetch the necessary dependencies. Listing it here in case anyone has the same issue.

Play Framework & IntelliJ - Cannot resolve symbol index/routes

I'm new to playframework/intellij and I have finally managed to import a play-java-intro succesfully (yey!), but when I try to edit the Application.java file, I see the error shown in the picture below "Cannot resolve symbol index" and "Cannot resolve symbol routes".
What does this mean? How do I get rid of these errors/warnings?
I have tried to run the program aswell to see if it works, and the project works. This means that the errors are showing false.
Also, how do I refresh the project in IntelliJ? I once managed to do this, but that was after a popup came in the topright corner. I have never managed to find the refresh button after that. Just a "Synchronize Project", which does nothing.
Do as following:
1- In intelliJ navigate to Project Structure > Modules
2- In the sources tab find target > scala_2.11 > src_managed > main and click on it.
3- Mark in as 'Sources' by clicking the button on top of browsing pane.
4- Click OK
That should be it.
I was having a similar issue and I Have updated my IntelliJ to version 2017.3 and everything is working fine now.
In Intellij 2022 try running sbt run once and hit the url (e.g localhost:9000) .
Tested on Play official samples