question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

QR Dependencies are not working

See original GitHub issue

I get this error and it seems to be pointing towards qr_reader, here are my logs:

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running 'gradlew assembleDebug'...
Configuration 'compile' in project ':qrcode_reader' is deprecated. Use 'implementation' instead.
C:\Users\[user]\development\flutter\.pub-cache\hosted\pub.dartlang.org\qrcode_reader-0.3.3\android\src\main\java\com\matheusvillela\flutter\plugins\qrcodereader\QRCodeReaderPlugin.java:42: error: cannot find symbol
public class QRCodeReaderPlugin implements MethodCallHandler, ActivityResultListener, PluginRegistry.RequestPermissionResultListener {
                                                                                                    ^
  symbol:   class RequestPermissionResultListener
  location: interface PluginRegistry
C:\Users\[user]\development\flutter\.pub-cache\hosted\pub.dartlang.org\qrcode_reader-0.3.3\android\src\main\java\com\matheusvillela\flutter\plugins\qrcodereader\QRCodeReaderPlugin.java:63: error: incompatible types: QRCodeReaderPlugin cannot be converted to RequestPermissionsResultListener
            registrar.addRequestPermissionsResultListener(instance);
                                                          ^
C:\Users\[user]\development\flutter\.pub-cache\hosted\pub.dartlang.org\qrcode_reader-0.3.3\android\src\main\java\com\matheusvillela\flutter\plugins\qrcodereader\QRCodeReaderPlugin.java:155: error: method does not override or implement a method from a supertype
    @Override
    ^
Note: C:\Users\[user]\development\flutter\.pub-cache\hosted\pub.dartlang.org\qrcode_reader-0.3.3\android\src\main\java\com\matheusvillela\flutter\plugins\qrcodereader\QRCodeReaderPlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
3 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':qrcode_reader: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 option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
Finished with error: Gradle build failed: 1

Any help is appreciated!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8

github_iconTop GitHub Comments

4reactions
DanCheshercommented, Jul 31, 2018

I’m also getting this same error using version 0.3.3. It looks like this problem was fixed here: #12. However, this change does not appear to have been published yet. I was able to work around this by changing my project’s pubspec.yaml file to reference the most recent unpublished changes in this github repo by following the instructions here: https://flutter.io/using-packages/#dependencies-on-unpublished-packages. The updated dependency looks like this:

dependencies:
  ...
  qrcode_reader:
    git:
      url: git://github.com/bcko/flutter_qrcode_reader.git

While this is an effective temporary workaround, it would be nice if these changes could be published to a new version for this package.

1reaction
DanCheshercommented, Aug 30, 2018

@Noyal The example is using an older version of Gradle. I submitted a new Issue for this: #24. I also submitted a pull request to fix this. While we wait for the changes to be pulled into the master branch, take a look at the changes in the pull request to see how to change the Gradle files in your local repo to get the example running.

Note that the example uses a local copy of the QR Code Reader plugin. This differs from the method that I mentioned previously here. With that method, you will always get the latest changes for this plugin from this repo. With the example method, you’ll have to manually pull changes into your local clone of this repo. Both methods have advantages and disadvantages. Ideally, changes in this repo should periodically be rolled into a new published version for this plugin so that we can use pubspec.yaml to manage the version of the plugin that our projects use.

Read more comments on GitHub >

github_iconTop Results From Across the Web

primefaces qr code not shown? - Stack Overflow
This question specifically resolves the issue around Maven dependencies. What you need to do is 1) Prove that your source code compiles while ......
Read more >
Why QR Codes Aren't Appearing in Emails - Knowledgebase
One reason that the QR may not be appearing is that there is a broken image source. To determine if this is the...
Read more >
Qr Code Scanner does not work (from new Quick settings tile ...
Qr Code Scanner does not work (from new Quick settings tile) ; Comments (5) ; Dependencies (0/1) ; Duplicates (11) ; Blocking (0)...
Read more >
How to import all the required dependencies of the most ...
I guess that's because I've been using the library of iReport 5.6.0 that does not support the QR Code. However, even downloading the...
Read more >
qr_code_scanner | Flutter Package - Pub.dev
QR code scanner that can be embedded inside flutter. ... is a bug in Flutter which is being tracked here: https://github.com/flutter/flutter/issues/72185.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found