edufolly / flutter_mobile_vision

Flutter implementation of Google Mobile Vision.
MIT License
455 stars 168 forks source link

Incompatible with androidX #39

Closed ggqshr closed 4 years ago

ggqshr commented 5 years ago

Incompatible with androidX,

Thegrep01 commented 5 years ago

got this issue too

juliocbcotta commented 5 years ago

Hey @edufolly how about to publish the androidX update to pub.dev?

3lVv0w commented 4 years ago

Any updates?

LeandroMoura3 commented 4 years ago

Please, someone have any ideia of how to solve this?

aliahmadmaster commented 4 years ago

got the same issue and i am tired of this plugin

pravingaikwad07 commented 4 years ago

Not compatible with androidx. Gradle build fails.

ngendlio commented 4 years ago

I am experiencing the same issue.

Launching lib/main.dart on SM G950F in debug mode...
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mobile_vision-0.1.3/android/src/main/java/io/github/edufolly/fluttermobilevision/FlutterMobileVisionPlugin.java:8: error: cannot find symbol
import android.support.v4.app.ActivityCompat;
                             ^
  symbol:   class ActivityCompat
  location: package android.support.v4.app
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mobile_vision-0.1.3/android/src/main/java/io/github/edufolly/fluttermobilevision/FlutterMobileVisionPlugin.java:9: error: package android.support.v4.content does not exist
import android.support.v4.content.ContextCompat;
                                 ^
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mobile_vision-0.1.3/android/src/main/java/io/github/edufolly/fluttermobilevision/ui/CameraSource.java:28: error: package android.support.annotation does not exist
import android.support.annotation.Nullable;
                                 ^
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mobile_vision-0.1.3/android/src/main/java/io/github/edufolly/fluttermobilevision/ui/CameraSource.java:29: error: package android.support.annotation does not exist
import android.support.annotation.RequiresPermission;
                                 ^
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mobile_vision-0.1.3/android/src/main/java/io/github/edufolly/fluttermobilevision/ui/CameraSource.java:30: error: package android.support.annotation does not exist
import android.support.annotation.StringDef;
                                 ^
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mobile_vision-0.1.3/android/src/main/java/io/github/edufolly/fluttermobilevision/ui/CameraSource.java:147: error: cannot find symbol
    @StringDef({
     ^
  symbol:   class StringDef
  location: class CameraSource
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mobile_vision-0.1.3/android/src/main/java/io/github/edufolly/fluttermobilevision/ui/CameraSource.java:160: error: cannot find symbol
    @StringDef({
     ^
  symbol:   class StringDef
  location: class CameraSource
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mobile_vision-0.1.3/android/src/main/java/io/github/edufolly/fluttermobilevision/ui/CameraSourcePreview.java:22: error: package android.support.annotation does not exist
import android.support.annotation.RequiresPermission;
                                 ^
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mobile_vision-0.1.3/android/src/main/java/io/github/edufolly/fluttermobilevision/util/AbstractCaptureActivity.java:9: error: cannot find symbol
import android.support.v4.app.ActivityCompat;
                             ^
  symbol:   class ActivityCompat
  location: package android.support.v4.app
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mobile_vision-0.1.3/android/src/main/java/io/github/edufolly/fluttermobilevision/barcode/BarcodeUpdateListener.java:3: error: package android.support.annotation does not exist
import android.support.annotation.UiThread;
                                 ^
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mobile_vision-0.1.3/android/src/main/java/io/github/edufolly/fluttermobilevision/ui/CameraSource.java:344: error: cannot find symbol
    @RequiresPermission(Manifest.permission.CAMERA)
     ^
  symbol:   class RequiresPermission
  location: class CameraSource
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mobile_vision-0.1.3/android/src/main/java/io/github/edufolly/fluttermobilevision/ui/CameraSource.java:379: error: cannot find symbol
    @RequiresPermission(Manifest.permission.CAMERA)
     ^
  symbol:   class RequiresPermission
  location: class CameraSource
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mobile_vision-0.1.3/android/src/main/java/io/github/edufolly/fluttermobilevision/ui/CameraSource.java:534: error: cannot find symbol
    @Nullable
     ^
  symbol:   class Nullable
  location: class CameraSource
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mobile_vision-0.1.3/android/src/main/java/io/github/edufolly/fluttermobilevision/ui/CameraSource.java:574: error: cannot find symbol
    @Nullable
     ^
  symbol:   class Nullable
  location: class CameraSource
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mobile_vision-0.1.3/android/src/main/java/io/github/edufolly/fluttermobilevision/ui/CameraSource.java:622: error: cannot find symbol
    public void autoFocus(@Nullable AutoFocusCallback cb) {
                           ^
  symbol:   class Nullable
  location: class CameraSource
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mobile_vision-0.1.3/android/src/main/java/io/github/edufolly/fluttermobilevision/ui/CameraSource.java:659: error: cannot find symbol
    public boolean setAutoFocusMoveCallback(@Nullable AutoFocusMoveCallback cb) {
                                             ^
  symbol:   class Nullable
  location: class CameraSource
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mobile_vision-0.1.3/android/src/main/java/io/github/edufolly/fluttermobilevision/ui/CameraSourcePreview.java:57: error: cannot find symbol
    @RequiresPermission(Manifest.permission.CAMERA)
     ^
  symbol:   class RequiresPermission
  location: class CameraSourcePreview
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mobile_vision-0.1.3/android/src/main/java/io/github/edufolly/fluttermobilevision/ui/CameraSourcePreview.java:73: error: cannot find symbol
    @RequiresPermission(Manifest.permission.CAMERA)
     ^
  symbol:   class RequiresPermission
  location: class CameraSourcePreview
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mobile_vision-0.1.3/android/src/main/java/io/github/edufolly/fluttermobilevision/ui/CameraSourcePreview.java:94: error: cannot find symbol
    @RequiresPermission(Manifest.permission.CAMERA)
     ^
  symbol:   class RequiresPermission
  location: class CameraSourcePreview
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mobile_vision-0.1.3/android/src/main/java/io/github/edufolly/fluttermobilevision/barcode/BarcodeUpdateListener.java:9: error: cannot find symbol
    @UiThread
     ^
  symbol:   class UiThread
  location: interface BarcodeUpdateListener
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mobile_vision-0.1.3/android/src/main/java/io/github/edufolly/fluttermobilevision/FlutterMobileVisionPlugin.java:149: error: cannot find symbol
                if (ContextCompat.checkSelfPermission(registrar.activity(),
                    ^
  symbol:   variable ContextCompat
  location: class FlutterMobileVisionPlugin
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mobile_vision-0.1.3/android/src/main/java/io/github/edufolly/fluttermobilevision/FlutterMobileVisionPlugin.java:153: error: cannot find symbol
                    ActivityCompat.requestPermissions(registrar.activity(),
                    ^
  symbol:   variable ActivityCompat
  location: class FlutterMobileVisionPlugin
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mobile_vision-0.1.3/android/src/main/java/io/github/edufolly/fluttermobilevision/util/AbstractCaptureActivity.java:83: error: cannot find symbol
            int rc = ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA);
                     ^
  symbol:   variable ActivityCompat
  location: class AbstractCaptureActivity<T>
  where T is a type-variable:
    T extends Graphic declared in class AbstractCaptureActivity
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
23 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':flutter_mobile_vision: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. Run with --scan to get full insights.
* Get more help at https://help.gradle.org

BUILD FAILED in 1m 45s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin barcode_scan...
✓ Built build/app/outputs/repo.
Building plugin flutter_mobile_vision...

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'flutter_mobile_vision'.
> Failed to notify project evaluation listener.
   > org.gradle.api.tasks.compile.CompileOptions.setBootClasspath(Ljava/lang/String;)V

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

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

BUILD FAILED in 4s
Exception: The plugin flutter_mobile_vision could not be built due to the issue above.
Exited (sigterm)
edufolly commented 4 years ago

Working to update de project. Maybe I release a new version with the same features but in new flutter plugin design. After this, I'll release a new version using streams.

edufolly commented 4 years ago

Hi, Mates. Look at the dev branch. I refactored all the permission system and now we've AndroidX. Sorry about the delay.

edufolly commented 4 years ago

Look at the new version. If you have further questions, please open a new issue.