aseemnishad / react-native-android-scanner Goto Github PK
View Code? Open in Web Editor NEWReact native implementation of AndroidScannerDemo https://github.com/jhansireddy/AndroidScannerDemo
License: MIT License
React native implementation of AndroidScannerDemo https://github.com/jhansireddy/AndroidScannerDemo
License: MIT License
Execution failed for task ':scanlibrary:transformNativeLibsWithStripDebugSymbolForRelease'.
> A problem occurred starting process '{project_path}/Library/Android/sdk/ndk-bundle/toolchains/mips64el-linux-android-4.9/prebuilt/darwin-x86_64/bin/mips64el-linux-android-strip''
Any idea? ๐
npm install git+https://[email protected]/aseemnishad/react-native-android-scanner.git --save
above command gives error rollbackFailedOptional: verb npm-session 2b9984db88cd1278
http://crashes.to/s/3e0cab94c22
any idea?
$ npm install git+https://[email protected]/aseemnishad/react-native-android-scanner.git --save
android/setting.gradle
...
include ':react-native-android-scanner'
project(':react-native-android-scanner').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-android-scanner/android')
include ':scanlibrary'
project(':scanlibrary').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-android-scanner/android/scanlibrary')
...
dependencies {
...
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation project(':react-native-android-scanner')
implementation project(':scanlibrary')
}
Add the required permissions in AndroidManifest.xml
:
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
...
<application
android:allowBackup="true"
Change the required in MainActivity.java`:
from
import com.scanlibrary.RNReactNativeAndroidScannerPackage;
to
import com.reactlibrary.RNReactNativeAndroidScannerPackage;
Open your activity, usually located in android/app/src/main/java/[your package]/MainApplication.java
.
Add import com.reactlibrary.RNReactNativeAndroidScannerPackage;
to the imports at the top of the file.
Add new RNReactNativeAndroidScannerPackage()
to the list returned by the getPackages()
method.
After having removed the android:allowBackup="false"
line from my AndroidManifest.xml
file, which prevented me to compile this project, I'm now facing the following compilation issue :
> Task :react-native-android-scanner:compileDebugJavaWithJavac FAILED
/Users/zedtux/Developments/companion/node_modules/react-native-android-scanner/android/src/main/java/com/reactlibrary/RNReactNativeAndroidScannerModule.java:11: error: cannot find symbol
import android.support.v7.app.ActionBarActivity;
^
symbol: class ActionBarActivity
location: package android.support.v7.app
1 error
Hi, I installed the module by following your instructions and got the above error while pressing "Start Scan". it also says
"Exception calling object as function: Maximum call stack size exceeded. (unknow file >: 2274)"
Help me to resolve this.
I'm giving a try to your project and I have the following error when running react-native run-android
:
> Task :app:processDebugManifest FAILED
/Users/guillaumehain/Developments/companion/android/app/src/main/AndroidManifest.xml:12:7-34 Error:
Attribute application@allowBackup value=(false) from AndroidManifest.xml:12:7-34
is also present at [:scanlibrary] AndroidManifest.xml:20:9-35 value=(true).
Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:8:5-25:19 to override.
Here is my AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.domain.myapp">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.CAMERA" />
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:allowBackup="false"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
</manifest>
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.