lewinjun / react-native-lewin-qrcode Goto Github PK
View Code? Open in Web Editor NEWreact-native 识别照片二维码
react-native 识别照片二维码
打包报错'linker command failed with exit code 1'
data无输出
*已解决
最后定位到的错误原因:com.google.zxing.NotFoundException。
找到原因,但是不会java 自己修改代码后编译就错了,,希望大大看到了修复下这个问题。
import {readerQR} from 'react-native-lewin-qrcode'
readerQR(path).then((data)=>{
this.setState({reader: {
message: '识别成功',
data: data
}});
// 十秒后自动清空
setTimeout(() => {
this.setState({reader: {
message: null,
data: null
}})
}, 10000);
}).catch((err)=>{
this.setState({reader: {
message: '识别失败',
data: null
}});
});
代码如上 报错cannot read property 'readerQR' of undefined
ld: library not found for -lQRCode
clang: error: linker command failed with exit code 1 (use -v to see invocation)
RN版本v0.62
在pod install的时候报错 [!] No podspec found for QrCode
in ../node_modules/react-native-lewin-qrcode
import {readerQR} from 'react-native-lewin-qrcode';
readerQR(path).then((data)=>{
console.log('识别成功')
});
react-native-lewin-qrcode 1.1.0
System:
OS: macOS 13.1
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 46.73 MB / 8.00 GB
Shell:
version: 3.2.57
path: /bin/bash
Binaries:
Node:
version: 16.14.0
path: ~/.nvm/versions/node/v16.14.0/bin/node
Yarn:
version: 1.22.17
path: /usr/local/bin/yarn
npm:
version: 8.3.1
path: ~/.nvm/versions/node/v16.14.0/bin/npm
Watchman:
version: 2022.10.31.00
path: /usr/local/bin/watchman
Managers:
CocoaPods:
version: 1.11.2
path: /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 22.4
- iOS 16.4
- macOS 13.3
- tvOS 16.4
- watchOS 9.4
Android SDK:
API Levels:
- "21"
- "22"
- "23"
- "24"
- "25"
- "26"
- "27"
- "28"
- "29"
- "30"
- "31"
- "32"
- "33"
Build Tools:
- 23.0.1
- 23.0.2
- 23.0.3
- 25.0.0
- 25.0.1
- 25.0.2
- 25.0.3
- 26.0.0
- 26.0.1
- 26.0.3
- 27.0.3
- 28.0.2
- 28.0.3
- 29.0.0
- 29.0.2
- 30.0.2
- 30.0.3
- 31.0.0
- 33.0.0
- 33.0.0
System Images:
- android-24 | Google APIs Intel x86 Atom
- android-26 | Google APIs Intel x86 Atom
- android-26 | Google Play Intel x86 Atom
- android-27 | Google APIs Intel x86 Atom
- android-27 | Google Play Intel x86 Atom
- android-28 | Google APIs Intel x86 Atom
- android-28 | Google Play Intel x86 Atom
- android-29 | Google APIs Intel x86 Atom
- android-29 | Google Play Intel x86 Atom
- android-30 | Intel x86 Atom_64
- android-30 | Google APIs Intel x86 Atom
- android-30 | Google APIs Intel x86 Atom_64
- android-30 | Google Play Intel x86 Atom
- android-30 | Google APIs ATD Intel x86 Atom
- android-31 | Intel x86 Atom_64
- android-31 | Google APIs Intel x86 Atom_64
- android-32 | Google APIs Intel x86 Atom_64
- android-33 | Google APIs Intel x86 Atom_64
- android-34 | Intel x86_64 Atom
- android-34 | Google APIs Intel x86_64 Atom
- android-TiramisuPrivacySandbox | Google APIs Intel x86_64 Atom
Android NDK: 22.1.7171670
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10811636
Xcode:
version: 14.3.1/14E300c
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.8
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.6
wanted: 0.72.6
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.