Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hey i am facing gradle failure after adding your plugin and following the steps of installastion please help #4

Open
anilpandey071999 opened this issue Sep 9, 2020 · 1 comment

Comments

@anilpandey071999
Copy link

Launching lib\main.dart on sdk google atv x86 in debug mode...
Running Gradle task 'assembleDebug'...
e: D:\video\flutter_app\android\app\src\main\kotlin\com\shadow\flutter_app\MainActivity.kt: (9, 48): Type mismatch: inferred type is MainActivity but FlutterEngine was expected

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:compileDebugKotlin'.

Compilation error. See log for more 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 4s
Exception: Gradle task assembleDebug failed with exit code 1

D:\video\flutter_app>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.17.4, on Microsoft Windows [Version 10.0.18363.1016], locale en-US)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[√] Android Studio (version 4.0)
[√] VS Code (version 1.48.2)
[√] Connected device (1 available)

• No issues found!

@doitdistributed
Copy link

Hey,

you have to migrate your code to the new FlutterActivity....

import io.flutter.embedding.android.FlutterActivity
import com.pycampers.keyboard.KeyboardPluginActivity

class MainActivity : KeyboardPluginActivity() {
    // You do not need to override onCreate() in order to invoke
    // GeneratedPluginRegistrant. Flutter now does that on your behalf.
    // ...retain whatever custom code you had from before (if any).
}

See also and follow these instructions... https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants