Comments (3)
@prashantpadhariya1137 what are you trying to do here?
Are you creating a new react native app or are you trying to integrate React native in an existing app?
In both cases, what you are doing is not the right process.
To create a new app, please run:
// Using Expo
npx create-expo-app@latest
// Using the community CLI
npx @react-native-community/cli@latest init <Name of your project> --version latest
If you want to integrate React native in an existing app, we have some docs here but they might be outdated.
from react-native.
I'm trying to create android library using react-native project and call that library in another android native project.
- Created .aar file using react-native project and call react-native functions from android native.
like this
public static void sendEvent(String eventName, @javax.annotation.Nullable Object params) {
android.util.Log.d("TAG", "sendEvent: 123 R"+reactContext);
reactContext
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
.emit(eventName, params);
}
send event like this .
- Import that .aar file in to another Android native project and call this sendEvent() method but reactcontext is getting null in my project so i need reactcontext value in Android native project.
Let me know how to get reactcontext value in android native project.
from react-native.
@prashantpadhariya1137 I understand.
This is not the right way to create a library for react-native: there is more boilerplate and setup needed for that.
Please follow the guide here to get started
from react-native.
Related Issues (20)
- ReactNative 0.68.0 -> 0.73.0 : much more slower on android release builds HOT 7
- Extra line wrap on some Android devices on some combinations of lineHeight, letterSpacing and other related properties
- Just a test bug for React Native Dev Tools HOT 2
- [0.75.3] Build failing with: "RNGP - Autolinking: Could not find project.android.packageName in react-native config output!" HOT 13
- reactnative.dev SITE IS DOWN. IT HAS BEEN DOWN FOR MORE THAN 3 HOURS HOT 6
- AlignItems may sometimes become invalid on Android HOT 4
- I can't open the new architecture according to the steps on the official website, on ios and android platforms HOT 6
- Another DevTools Test Issue HOT 2
- Test issue HOT 2
- In IOS TextInput does not update style if copy and pasted string is bigger then maxLength HOT 8
- [id: 'com.facebook.react.settings'] > java.io.UncheckedIOException: HOT 3
- Run-android command is stuck without giving any output HOT 4
- Build failed on android with "Task : android:buildCMakeDebug[arm64-v8a] FAILED" HOT 8
- [Android] Headless Crash `Tried to finish non-existent task with id` HOT 3
- "Cannot find EventEmitter for receivedTouches" error in Android Native UI Component HOT 1
- Swift Package Manager (SPM) does not work with RN 0.75.2 HOT 5
- Error "no implicit conversion of String into Array" in Pod Install after migrating to RN > 0.74 (0.74.0 until 0.75.3) HOT 6
- React Native Library .so files are not fortified HOT 5
- [iOS] Crash in ActionSheetIOS: `attempt to insert nil object from objects`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native.