ponnamkarthik / FlutterWebView

Flutter Plugin that Renders Native Webview as a widget in flutter
Other
62 stars 26 forks source link

Compilation error PlatformViewFactory #12

Closed ricardobrg closed 5 years ago

ricardobrg commented 5 years ago
C:\flutter\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_native_web-1.0.2\android\src\main\java\io\github\ponnamkarthik\flutterwebview\FlutterwebviewFactory.java:15: error: constructor PlatformViewFactory in class PlatformViewFactory cannot be applied to given types;
        super();
        ^
  required: MessageCodec<Object>
  found: no arguments
  reason: actual and formal argument lists differ in length
Note: C:\flutter\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_native_web-1.0.2\android\src\main\java\io\github\ponnamkarthik\flutterwebview\FlutterWeb.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':flutter_native_web: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 4m 14s
Finished with error: Gradle task assembleDebug failed with exit code 1

flutter doctor output

C:\flutter\flutter\bin\flutter.bat doctor --verbose
[√] Flutter (Channel stable, v1.0.0, on Microsoft Windows [versão 10.0.17134.523], locale pt-BR)
    • Flutter version 1.0.0 at C:\flutter\flutter
    • Framework revision 5391447fae (2 months ago), 2018-11-29 19:41:26 -0800
    • Engine revision 7375a0f414
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at C:\Users\Casa\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[√] Android Studio (version 3.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 32.0.1
    • Dart plugin version 182.5124
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[√] Connected device (1 available)
    • MS45S A6 • 45235829013292 • android-arm • Android 6.0 (API 23)

• No issues found!
witheroux commented 5 years ago

The problem seems to have started after #2 was resolved. Comments in the issue after it was fixed point to the same problem happening. 5de122b1d8e33cf87a5802c30f8b3340639ed3d3 is when the problem started. Reverting the commit seems to fix the error as mentionned in the other issue.

I see that the version of Flutter used in #2 is 0.6.0. When the issue was submitted, the current version of Flutter was 0.8.X. This might have been the reason for the issue. Perhaps this should be fixed so that it works on the current stable channel instead of an old beta?

matheusperez commented 5 years ago

I'm having the same problem :(, so at the moment it has not been fixed?

ponnamkarthik commented 5 years ago

please check with latest version

StephenBrough commented 5 years ago

Still an issue with latest version.

atfa commented 5 years ago

same error.

zanecidan commented 5 years ago

Same error as well. Any workaround as of now?

ricardobrg commented 5 years ago

@PonnamKarthik, sorry for the late answer. I could not test with most recent version because I took a different approach in the project I was testing it and I am using Flutter Widgets instead of HTML code in this project. As soon as I finish it I will get back to test FlutterWebView again and update the issue.

panthe commented 5 years ago

I have this issue too.

xingyuyechen commented 5 years ago

I solved it , open given directory, and edit file FlutterwebviewFactory.java 15 , change super(); to super(StandardMessageCodec.INSTANCE);

ponnamkarthik commented 5 years ago

fixed in 1.0.3