An issue occurred configuring root project 'android' - android

I've read all posts having same issue, none resolved this. I am totally new to Ionic (I have some knowledge about Crodova and intelXdk but not Ionic).
I followed some tutorials to get my first app running. Firstly, it was running fine (of course, it had only texts :D ) then I started trying to make facebook login in the App.
I wasn't able to test this in Chrome as the facebook and storage are both Native dependencies, and could be not tested in a computer. Thus , I started trying to build the android app in order to test this in my phone and everytime I launch "ionic run android" I get this :
ionic run android --stacktrace
> ionic-app-base#0.0.0 ionic:build /home/chaibi/Bureau/foody
> ionic-app-scripts build "--stacktrace"
[16:14:53] ionic-app-scripts 1.3.7
[16:14:53] build dev started ...
[16:14:53] clean started ...
[16:14:53] clean finished in 4 ms
[16:14:53] copy started ...
[16:14:53] transpile started ...
[16:14:55] transpile finished in 2.34 s
[16:14:55] preprocess started ...
[16:14:55] deeplinks started ...
[16:14:55] deeplinks finished in 19 ms
[16:14:55] preprocess finished in 21 ms
[16:14:55] webpack started ...
[16:14:55] copy finished in 2.64 s
[16:15:04] webpack finished in 8.52 s
[16:15:04] sass started ...
[16:15:05] sass finished in 1.10 s
[16:15:05] postprocess started ...
[16:15:05] postprocess finished in 6 ms
[16:15:05] lint started ...
[16:15:05] build dev finished in 12.07 s
[16:15:07] lint finished in 2.37 s
ANDROID_HOME=/home/chaibi/Android/Sdk
JAVA_HOME=/usr/lib/jvm/java-8-oracle
Subproject Path: CordovaLib
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_2h23ogq2gf6aqvti7pywfv5r2.run(/home/chaibi/Bureau/foody/platforms/android/build.gradle:137)
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> java.lang.NullPointerException (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 1.822 secs
Error: /home/chaibi/Bureau/foody/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> java.lang.NullPointerException (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
I am using Ionic 2.2, openjdk-8 and developping using WebStorm

Related

ionic build cordova android gives error " UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 "

I am trying to build and ionic project as an apk. When I do ionic cordova build android it gives the following error
Running app-scripts build: --platform android --target cordova
[23:35:31] build dev started ...
[23:35:31] clean started ...
[23:35:31] clean finished in 20 ms
[23:35:31] copy started ...
[23:35:31] deeplinks started ...
[23:35:31] deeplinks finished in 75 ms
[23:35:31] transpile started ...
[23:35:35] transpile finished in 3.87 s
[23:35:35] preprocess started ...
[23:35:35] preprocess finished in 33 ms
[23:35:35] webpack started ...
[23:35:35] copy finished in 4.25 s
[23:35:40] webpack finished in 4.78 s
[23:35:40] sass started ...
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
[23:35:41] sass finished in 1.02 s
[23:35:41] postprocess started ...
[23:35:41] postprocess finished in 77 ms
[23:35:41] lint started ...
[23:35:41] build dev finished in 10.20 s
> cordova build android --debug
You have been opted out of telemetry. To change this, run: cordova telemetry on.
Android Studio project detected
ANDROID_HOME=C:\Users\makarov\AppData\Local\Android\Sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_144
studio
Subproject Path: CordovaLib
Subproject Path: app
[23:35:44] lint finished in 3.65 s
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\My_Files\Projects\MyNoteApp\platforms\android\CordovaLib\build.gradle' line: 84
* What went wrong:
A problem occurred evaluating project ':CordovaLib'.
> build_ihrdqe7fln9qjqpg3xt8ghgr$_run_closure3$_closure11$_closure12$_closure13$_closure14
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
(node:11172) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\My_Files\Projects\MyNoteApp\platforms\android\CordovaLib\build.gradle' line: 84
* What went wrong:
A problem occurred evaluating project ':CordovaLib'.
> build_ihrdqe7fln9qjqpg3xt8ghgr$_run_closure3$_closure11$_closure12$_closure13$_closure14
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
at ChildProcess.whenDone (C:\My_Files\Projects\MyNoteApp\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
at ChildProcess.emit (events.js:159:13)
at maybeClose (internal/child_process.js:943:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
(node:11172) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:11172) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
When I do cordova platform ls I get this output
Installed platforms:
android 7.0.0
Available platforms:
browser ~5.0.1
ios ~4.5.4
osx ~4.0.1
windows ~5.0.0
www ^3.12.0
My Ionic version is 3 and I have Android SDK Platform-Tools 27 installed.
I also tried to build this app using PhoneGap too. When testing by hosting the app using PhoneGap desktop and using PhoneGap app on my phone, the app works fine including any native API that I am using (i.e. Toasts). When I go to PhoneGap build website and build my app into APK and run it on my phone I only get a white screen and nothing comes up.

Unable to build ionic project

I'm trying to build my ionic project, but getting following error (compilation fails in gradle configuration):
PS C:\Workspace\mobileapp> ionic cordova build android
--debug
Running app-scripts build: --platform android --target cordova
[13:05:08] build dev started ...
[13:05:08] clean started ...
[13:05:08] clean finished in 7 ms
[13:05:08] copy started ...
[13:05:08] transpile started ...
[13:05:19] transpile finished in 11.49 s
[13:05:19] preprocess started ...
[13:05:19] deeplinks started ...
[13:05:20] deeplinks finished in 255 ms
[13:05:20] preprocess finished in 256 ms
[13:05:20] webpack started ...
[13:05:20] copy finished in 12.27 s
[13:05:37] webpack finished in 17.47 s
[13:05:37] sass started ...
[13:05:41] sass finished in 3.91 s
[13:05:41] postprocess started ...
[13:05:41] removed unused font files
[13:05:41] postprocess finished in 80 ms
[13:05:41] lint started ...
[13:05:41] build dev finished in 33.78 s
cordova build android --debug ANDROID_HOME=C:\Users\user\AppData\Local\Android\Sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_151 Starting a Gradle Daemon
(subsequent builds will be faster)
[13:06:05] lint finished in 23.73 s
:wrapper
BUILD SUCCESSFUL in 17s 1 actionable task: 1 executed Subproject Path:
CordovaLib The Task.leftShift(Closure) method has been deprecated and
is scheduled to be removed in Gradle 5.0. Please use
Task.doLast(Action) instead.
at build_bbib3h28v2rns6xj5u95qezuw.run(C:\Workspace\mobileapp\platforms\android\build.gradle:137)
The JavaCompile.setDependencyCacheDir() method has been deprecated and
is scheduled to be removed in Gradle 4.0.
Incremental java compilation is an incubating feature. The
TaskInputs.source(Object) method has been deprecated and is scheduled
to be removed in Gradle 4.0. Please use
TaskInputs.file(Object).skipWhenEmpty() instead.
File C:\Users\user.android\repositories.cfg could not be loaded.
BUILD FAILED
Total time: 20.704 secs FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring root project 'android'.
Could not resolve all dependencies for configuration ':_debugApkCopy'.
Could not find com.google.android.gms:play-services-auth:11.8.0.
Searched in the following locations:
file:/C:/Users/user/AppData/Local/Android/Sdk/extras/google/m2repository/com/google/android/gms/play-services-auth/11.8.0/play-services-auth-11.8.0.pom
file:/C:/Users/user/AppData/Local/Android/Sdk/extras/google/m2repository/com/google/android/gms/play-services-auth/11.8.0/play-services-auth-11.8.0.jar
file:/C:/Workspace/mobileapp/platforms/android/sdk-manager/com/google/android/gms/play-services-auth/11.8.0/play-services-auth-11.8.0.jar
file:/C:/Users/user/AppData/Local/Android/Sdk/extras/android/m2repository/com/google/android/gms/play-services-auth/11.8.0/play-services-auth-11.8.0.pom
file:/C:/Users/user/AppData/Local/Android/Sdk/extras/android/m2repository/com/google/android/gms/play-services-auth/11.8.0/play-services-auth-11.8.0.jar
file:/C:/Workspace/mobileapp/platforms/android/sdk-manager/com/google/android/gms/play-services-auth/11.8.0/play-services-auth-11.8.0.jar
Required by:
project :
Could not find com.google.android.gms:play-services-identity:11.8.0.
Searched in the following locations:
file:/C:/Users/user/AppData/Local/Android/Sdk/extras/google/m2repository/com/google/android/gms/play-services-identity/11.8.0/play-services-identity-11.8.0.pom
file:/C:/Users/user/AppData/Local/Android/Sdk/extras/google/m2repository/com/google/android/gms/play-services-identity/11.8.0/play-services-identity-11.8.0.jar
file:/C:/Workspace/mobileapp/platforms/android/sdk-manager/com/google/android/gms/play-services-identity/11.8.0/play-services-identity-11.8.0.jar
file:/C:/Users/user/AppData/Local/Android/Sdk/extras/android/m2repository/com/google/android/gms/play-services-identity/11.8.0/play-services-identity-11.8.0.pom
file:/C:/Users/user/AppData/Local/Android/Sdk/extras/android/m2repository/com/google/android/gms/play-services-identity/11.8.0/play-services-identity-11.8.0.jar
file:/C:/Workspace/mobileapp/platforms/android/sdk-manager/com/google/android/gms/play-services-identity/11.8.0/play-services-identity-11.8.0.jar
Required by:
project :
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. (node:15112) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit
code 1 Error output: FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring root project 'android'.
Could not resolve all dependencies for configuration ':_debugApkCopy'.
Could not find com.google.android.gms:play-services-auth:11.8.0.
Searched in the following locations:
file:/C:/Users/user/AppData/Local/Android/Sdk/extras/google/m2repository/com/google/android/gms/play-services-auth/11.8.0/play-services-auth-11.8.0.pom
file:/C:/Users/user/AppData/Local/Android/Sdk/extras/google/m2repository/com/google/android/gms/play-services-auth/11.8.0/play-services-auth-11.8.0.jar
file:/C:/Workspace/mobileapp/platforms/android/sdk-manager/com/google/android/gms/play-services-auth/11.8.0/play-services-auth-11.8.0.jar
file:/C:/Users/user/AppData/Local/Android/Sdk/extras/android/m2repository/com/google/android/gms/play-services-auth/11.8.0/play-services-auth-11.8.0.pom
file:/C:/Users/user/AppData/Local/Android/Sdk/extras/android/m2repository/com/google/android/gms/play-services-auth/11.8.0/play-services-auth-11.8.0.jar
file:/C:/Workspace/mobileapp/platforms/android/sdk-manager/com/google/android/gms/play-services-auth/11.8.0/play-services-auth-11.8.0.jar
Required by:
project :
Could not find com.google.android.gms:play-services-identity:11.8.0.
Searched in the following locations:
file:/C:/Users/user/AppData/Local/Android/Sdk/extras/google/m2repository/com/google/android/gms/play-services-identity/11.8.0/play-services-identity-11.8.0.pom
file:/C:/Users/user/AppData/Local/Android/Sdk/extras/google/m2repository/com/google/android/gms/play-services-identity/11.8.0/play-services-identity-11.8.0.jar
file:/C:/Workspace/mobileapp/platforms/android/sdk-manager/com/google/android/gms/play-services-identity/11.8.0/play-services-identity-11.8.0.jar
file:/C:/Users/user/AppData/Local/Android/Sdk/extras/android/m2repository/com/google/android/gms/play-services-identity/11.8.0/play-services-identity-11.8.0.pom
file:/C:/Users/user/AppData/Local/Android/Sdk/extras/android/m2repository/com/google/android/gms/play-services-identity/11.8.0/play-services-identity-11.8.0.jar
file:/C:/Workspace/mobileapp/platforms/android/sdk-manager/com/google/android/gms/play-services-identity/11.8.0/play-services-identity-11.8.0.jar
Required by:
project :
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
at ChildProcess.whenDone (C:\Workspace\mobileapp\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
at ChildProcess.emit (events.js:159:13)
at maybeClose (internal/child_process.js:943:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5) (node:15112)
UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function
without a catch block, or by rejecting a promise which was not handled
with .catch(). (rejection id: 1) (node:15112) [DEP0018]
DeprecationWarning: Unhandled promise rejections are deprecated. In
the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.
I'm having following version of tools:
Ionic: 3.20.0
Cordova: 8.0.0
Cordova-Android: 6.2.3
Any help would be very grateful.

IONIC 3 compile error. Cannot build or run android emulator after adding file encryption plugin

How to resolve this error. Is this ionic or android error. This error comes after install cordova file encryption plugin. before it run smoothly. Please any one know this error.
Running app-scripts build: --platform android --target cordova
[12:24:54] build dev started ...
[12:24:55] clean started ...
[12:24:55] clean finished in 21 ms
[12:24:55] copy started ...
[12:24:55] deeplinks started ...
[12:24:55] deeplinks finished in 208 ms
[12:24:55] transpile started ...
[12:25:08] transpile finished in 13.18 s
[12:25:08] preprocess started ...
[12:25:08] preprocess finished in 2 ms
[12:25:08] webpack started ...
[12:25:14] copy finished in 19.01 s
[12:25:26] webpack finished in 17.95 s
[12:25:26] sass started ...
[12:25:28] sass finished in 1.99 s
[12:25:28] postprocess started ...
[12:25:28] postprocess finished in 25 ms
[12:25:28] lint started ...
[12:25:28] build dev finished in 34.05 s
> cordova build android
^
G:\Android\****\platforms\android\src\com\disusered\Safe.java:120: error: cann
CRYPTO = new Crypto(new SharedPrefsBackedKeyChain(CONTEXT), new SystemNati
^
symbol: class SharedPrefsBackedKeyChain
location: class Safe
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: G:\Android\***\platforms\android\src\org\apache\cordova\file\AssetFiles
Note: Recompile with -Xlint:unchecked for details.
2 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
[ERROR] An error occurred while running cordova run android (exit code 1).
Remove below plugin with
ionic cordova plugin rm cordova-plugin-compat
and after that reinstall below plugin by
ionic cordova plugin add cordova-plugin-compat

Tns run android not working with demo project on genymotion

I created a demo project and tried to run it against a genymotion android emulator in my company network.
When i run "tns run android" i get this error as below:
tns run android
Searching for devices...
Executing before-liveSync hook from C:\projects\apps\tnsDemo\hooks\before-liveSync\nativescript-angular-sync.js
Skipping prepare.
Building project...
Gradle build...
:config phase: createDefaultIncludeFiles
+found plugins: tns-core-modules-widgets
:config phase: createPluginsConfigFile
Creating product flavors include.gradle file in C:\projects\apps\tnsDemo\platforms\android/configurations folder...
:config phase: pluginExtend
+applying configuration from: C:\projects\apps\tnsDemo\platforms\android\configurations\include.gradle
+applying configuration from: C:\projects\apps\tnsDemo\platforms\android\configurations\tns-core-modules-widgets\include.gradle
:config phase: addAarDependencies
+adding dependency: C:\projects\apps\tnsDemo\platforms\android\libs\aar\widgets-release.aar
Exception in thread "main" java.lang.IllegalArgumentException: There are no parameters passed!
at com.ig.GetInterfaceNames.main(GetInterfaceNames.java:27)
FAILURE: Build failed with an exception.
Where:
Build file 'C:\projects\apps\tnsDemo\platforms\android\build-tools\android-static-binding-generator\build.gradle' line: 69
What went wrong:
Execution failed for task ':asbg:generateInterfaceNamesList'.
Process 'command 'C:\Program Files\Java\jdk1.8.0_144\bin\java.exe'' finished with non-zero exit value 1
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Unable to apply changes on device: 192.168.92.101:5555. Error is: Command gradlew.bat failed with exit code 1.
Executing after-watch hook from C:\projects\apps\tnsDemo\hooks\after-watch\nativescript-dev-typescript.js
Platform: Android
Java version: 1.8.0_144"
tns version: 3.2.1
tns-core-modules.d.ts: version: 3.1.1
tns-android: version: 3.2.0
Seems like something blocks the connection to the emulator but I don't know how to workaround it.
Seems like i found the origin of the problem.
The exception is thrown when the "org.gradle.parallel" property in the gradle.properties file is set to true.
When I set it to false everything works fine.

can´t create an apk with an ionic project

Hi im new in ionic and im trying to create an apk to in order to test my qr scanner project, but when I run the command ionic cordova build android --release
i got the following error output:
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
:processReleaseManifest FAILED
BUILD FAILED
Total time: 13.446 secs
C:\Users\delacrga\Ionic projects\myApp\platforms\android\AndroidManifest.xml:19:5-65 Error:
Element uses-permission#android.permission.CAMERA at AndroidManifest.xml:19:5-65 duplicated with element
declared at AndroidManifest.xml:16:5-90
C:\Users\delacrga\Ionic projects\myApp\platforms\android\AndroidManifest.xml:21:5-84 Error:
Element uses-feature#android.hardware.camera at AndroidManifest.xml:21:5-84 duplicated with element declared at
AndroidManifest.xml:17:5-85
C:\Users\delacrga\Ionic projects\myApp\platforms\android\AndroidManifest.xml Error:
Validation failed, exiting
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processReleaseManifest'.
> Manifest merger failed with multiple errors, see logs
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Error: cmd: Command failed with exit code 1 Error output:
C:\Users\delacrga\Ionic projects\myApp\platforms\android\AndroidManifest.xml:19:5-65 Error:
Element uses-permission#android.permission.CAMERA at AndroidManifest.xml:19:5-65 duplicated with element
declared at AndroidManifest.xml:16:5-90
C:\Users\delacrga\Ionic projects\myApp\platforms\android\AndroidManifest.xml:21:5-84 Error:
Element uses-feature#android.hardware.camera at AndroidManifest.xml:21:5-84 duplicated with element declared at
AndroidManifest.xml:17:5-85
C:\Users\delacrga\Ionic projects\myApp\platforms\android\AndroidManifest.xml Error:
Validation failed, exiting
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processReleaseManifest'.
> Manifest merger failed with multiple errors, see logs
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Could someone helpme with this?
output:
C:\Users\delacrga\Ionic projects\myApp>ionic cordova build android --prod --release -- -- --keystore=filename.keystore --alias=myalias
Running app-scripts build: --prod --iscordovaserve --externalIpRequired --nobrowser
[08:52:04] build prod started ...
[08:52:04] clean started ...
[08:52:04] clean finished in 10 ms
[08:52:04] copy started ...
[08:52:04] ngc started ...
[08:52:15] ngc finished in 11.48 s
[08:52:15] preprocess started ...
[08:52:16] deeplinks started ...
[08:52:16] deeplinks finished in 63 ms
[08:52:16] optimization started ...
[08:52:16] copy finished in 11.85 s
[08:52:26] optimization finished in 10.47 s
[08:52:26] preprocess finished in 10.54 s
[08:52:26] webpack started ...
[08:52:32] webpack finished in 5.46 s
[08:52:32] sass started ...
[08:52:32] uglifyjs started ...
[08:52:33] sass finished in 1.22 s
[08:52:33] cleancss started ...
[08:52:35] cleancss finished in 1.93 s
[08:52:42] uglifyjs finished in 10.23 s
[08:52:42] postprocess started ...
[08:52:42] postprocess finished in 15 ms
[08:52:42] lint started ...
[08:52:42] build prod finished in 37.83 s
> cordova build android --release -- --keystore=filename.keystore --alias=myalias
× Running command - failed!
[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.
[ERROR] An error occurred while running cordova build android --release -- --keystore=filename.keystore --alias=myalias
(exit code 1):
ANDROID_HOME=C:\Users\delacrga\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_131
Subproject Path: CordovaLib
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use
Task.doLast(Action) instead.
at build_amlj4yw9chmdse17z8bfqqws2.run(C:\Users\delacrga\Ionic
projects\myApp\platforms\android\build.gradle:139)
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\delacrga\Ionic projects\myApp\platforms\android\build.gradle' line: 289
* What went wrong:
A problem occurred evaluating root project 'android'.
> Keystore file does not exist: C:\Users\delacrga\Ionic projects\myApp\platforms\android\..\..\filename.keystore
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 4.175 secs
Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\delacrga\Ionic projects\myApp\platforms\android\build.gradle' line: 289
* What went wrong:
A problem occurred evaluating root project 'android'.
> Keystore file does not exist: C:\Users\delacrga\Ionic projects\myApp\platforms\android\..\..\filename.keystore
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
By any chance if you have two different plugins installed which asks permission for the camera i.e. cordova-plugin-qrscanner and phonegap-plugin-barcodescanner together, it will cause this issue.
Remove either of the plugin by
ionic cordova plugin remove phonegap-plugin-barcodescanner
or
ionic cordova plugin remove cordova-plugin-qrscanner
Yes.#Jay is right. Because my ionic project have two different plugins installed which asks permission for the camera. cordova-plugin-qrscanner and cordova-plugin-cszbar,Remove either of the plugin then working.

Categories

Resources