Comments (13)
I was able to fix this by manually adding the Clipboard package to MainApplication.java. For whatever reason, the link command did not add it. I'm on 0.59.10.
import com.reactnativecommunity.clipboard.ClipboardPackage; // <- Add this line
// other import commands
public class MainApplication extends Application implements ReactApplication {
// other code
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
// Other packages...
new ClipboardPackage() // <- Add this line
);
}
// ....More code
from clipboard.
I also could not make it run on Android 10 (32-bit emulator with Expo v38.0.8). There is an orange box saying null is not an object (evaluating NativeClipboard_1.default.setString)
I found a demo but it is not supported for Android 10 too (expo SDK newer than v32 when I tried to use it on Android 120 physical device).
https://snack.expo.io/@aboutreact/clipboard-example?session_id=snack-session-45GVESXWi
from clipboard.
I am not using expo and I am running into this issue.
from clipboard.
Additionally to @cmcaboy
You might need to include
implementation project(':@react-native-clipboard_clipboard')
in android/app/build.gradle
within dependencies {
and
include ':@react-native-clipboard_clipboard'
project(':@react-native-clipboard_clipboard').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-clipboard/clipboard/android')
in android/settings.gradle
from clipboard.
Sorry for not adding extra details, but it is as simple as that
from clipboard.
I also had the same issue and it breaks my production app. What's weird is it works fine on one Android9 phone (Redmi Note7) and not the other running Android9 (Galaxt Note 8). Android10 straight out gives similar error. Using RN0.60.4. If anyone can advise it would be cool. Thanks
from clipboard.
I also had the same issue and it breaks my production app. What's weird is it works fine on one Android9 phone (Redmi Note7) and not the other running Android9 (Galaxt Note 8). Android10 straight out gives similar error. Using RN0.60.4. If anyone can advise it would be cool. Thanks
Nvm. Found the issue, I've been using react-native-code-push package and just added the clipboard library today. Forgot that the codepush only involves js files so it's library linking/binary issue. For others, try to check linking first or make sure the clipboard library is in node_modules
from clipboard.
Same issue here...
from clipboard.
same Issue here but i face that 👍 object (evaluating NativeClipboard_1.default.getString)
from clipboard.
Related to #53, use the deprecated Clipboard
instead if you're using Expo
.
from clipboard.
I solve it after I Add Clipboard from React Native Comunity
from clipboard.
I have the same problem, but it can be solved by uninstalling the app and re installing it
android 8.0.0
RN 0.63.1
@react-native-community/clipboard 1.2.3
from clipboard.
The same issue
from clipboard.
Related Issues (20)
- Unable to empty clipboard :) HOT 1
- Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl. Namespace not specified. HOT 7
- [Android-New Arch] Cannot specify link libraries for target "react_codegen_RNCClipboard" which is not built by this project HOT 15
- Can we deprecate the NPM package for @react-native-community/clipboard
- no idea why need to link
- How get to work with Expo HOT 1
- App Hanging: App hanging for at least 2000 ms. Happens for iOS devices only. HOT 3
- Clear the clipboard
- Android: After upgrading to React Native version 0.73, build failed HOT 7
- Monorepo REACT_NATIVE_NODE_MODULES_DIR error HOT 2
- Getting "copied" send to device in android 13 HOT 1
- Task :react-native-community_clipboard:compileDebugJavaWithJavac FAILED HOT 14
- SetString("") not clear Gboard's clipboard
- Expose access to EXTRA_IS_SENSITIVE for setString on Android
- Error to Deploy to Android RN 0.73.2 HOT 6
- ios listener not being called
- public class ClipboardModule extends NativeClipboardModuleSpec HOT 2
- Allowing RN 0.74 as a peer dependency HOT 9
- pod install fails undefined method `visionos' HOT 6
- Can we use this clipboard to listen to iOS AutoFill text?
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 clipboard.