react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

Cannot find symbol ReactActivity

Open ChiroV3 opened this issue 2 years ago • 6 comments

🐛 Bug Report

After creating react native project and installing react-native-navigation project doesn't build on android

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

  1. npx react-native init
  2. yarn add react-native-navigation
  3. npx rnn-link
  4. fix index.js
  5. react-native run-android

Expected behavior

App builds

Actual Behavior

Error is shown:

MainActivity.java:21: error: cannot find symbol public MainActivityDelegate(ReactActivity activity, String mainComponentName)

symbol: class ReactActivity location: class MainActivityDelegate

Your Environment

  • React Native Navigation version: 7.27.1
  • React Native version: 0.68.1
  • Platform(s) (iOS, Android, or both?): Android
  • Device info (Simulator/Device? OS version? Debug/Release?): Simulator

ChiroV3 avatar Apr 27 '22 19:04 ChiroV3

Since this package doesn't currently support the new architecture, you'll need to make sure it's disabled and your MainActivity.java should be essentially empty:

package com.yourorg.YourAppName;

import com.reactnativenavigation.NavigationActivity;

public class MainActivity extends NavigationActivity {
}

This should allow it to work on RN 0.68.

That said, I haven't seen a concrete confirmation that the new stuff will be supported by this project, and if it's not, it's unfortunately a basically dead project anyways.

bfricka avatar Apr 28 '22 22:04 bfricka

Strange, this pull request is related to RN v0.68 https://github.com/wix/react-native-navigation/pull/7500

phuongwd avatar Apr 29 '22 23:04 phuongwd

@bfricka Hi guy, this is what I used: "react-native-navigation": "7.27.1", so what's the newest version I can use of 'react-native', probably 0.66.3? How should I combine their versions? I always get the error: react-native-navigation:compileReactNative66DebugKotlin

Irenedan avatar May 06 '22 14:05 Irenedan

@Irenedan Did you update the kotlinVersion android/build.gradle ?

phuongwd avatar May 10 '22 14:05 phuongwd

having this issue too.. will there be any update from wix developers?

theahmedsabbir avatar May 26 '22 14:05 theahmedsabbir

@bfricka what do you mean "new architecture" and where did you read (or not read...) that they won't support "it"?

It's very concerning.

Maybe @guyca can step in and let us know if it's FUD or if we can count on that lib going forward.

EDIT Ok, Fabric.

Also importing ReactActivity does not help it appears.

eightyfive avatar Jun 23 '22 11:06 eightyfive