Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RNAdmobNativeAdsManager.java:42: error: getCurrentActivity() is not public in ReactContext; cannot be accessed from outside package #34169

Closed
aleluiah opened this issue Jul 10, 2022 · 1 comment

Comments

@aleluiah
Copy link

Description

() is not public in ReactContext; cannot be accessed from outside package
Context context = getReactApplicationContext().getCurrentActivity();
^
C:\Cliqueon\node_modules\react-native-admob-native-ads\android\src\main\java\com\ammarahmed\rnadmob\nativeads\RNAdmobNativeAdsManager.java:70: error: cannot find symbol
configuration.setTestDeviceIds(Arguments.toList(config.getArray("testDeviceIds")));
^
symbol: method toList(ReadableArray)
location: class Arguments
C:\Cliqueon\node_modules\react-native-admob-native-ads\android\src\main\java\com\ammarahmed\rnadmob\nativeads\Utils.java:29: error: cannot find symbol
List list = Arguments.toList(target.getArray("value"));
^
symbol: method toList(ReadableArray)
location: class Arguments
C:\Cliqueon\node_modules\react-native-admob-native-ads\android\src\main\java\com\ammarahmed\rnadmob\nativeads\Utils.java:58: error: cannot find symbol
List list = Arguments.toList(options.getArray("neighboringContentUrls"));
^
symbol: method toList(ReadableArray)
location: class Arguments

Version

0.69.1

Output of npx react-native info

C:\Cliqueon\node_modules\react-native-admob-native-ads\android\src\main\java\com\ammarahmed\rnadmob\nativeads\RNAdmobNativeAdsManager.java:42: error: getCurrentActivity() is not public in ReactContext; cannot be accessed from outside package
Context context = getReactApplicationContext().getCurrentActivity();
^
C:\Cliqueon\node_modules\react-native-admob-native-ads\android\src\main\java\com\ammarahmed\rnadmob\nativeads\RNAdmobNativeAdsManager.java:70: error: cannot find symbol
configuration.setTestDeviceIds(Arguments.toList(config.getArray("testDeviceIds")));
^
symbol: method toList(ReadableArray)
location: class Arguments
C:\Cliqueon\node_modules\react-native-admob-native-ads\android\src\main\java\com\ammarahmed\rnadmob\nativeads\Utils.java:29: error: cannot find symbol
List list = Arguments.toList(target.getArray("value"));
^
symbol: method toList(ReadableArray)
location: class Arguments
C:\Cliqueon\node_modules\react-native-admob-native-ads\android\src\main\java\com\ammarahmed\rnadmob\nativeads\Utils.java:58: error: cannot find symbol
List list = Arguments.toList(options.getArray("neighboringContentUrls"));
^
symbol: method toList(ReadableArray)

Steps to reproduce

npx react-native run-android on fabric with new architecture enable
justnow
d

Snack, code example, screenshot, or link to a repository

justnow

@cortinico
Copy link
Contributor

Closing as your code is impossible to read and/or copy.
Please provide a reproducer in form of a repository that we can run and reopen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants