Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Cannot build android app on current stable flutter build #3

Open
Mithrandir2k18 opened this issue Jan 31, 2020 · 2 comments
Open

Cannot build android app on current stable flutter build #3

Mithrandir2k18 opened this issue Jan 31, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@Mithrandir2k18
Copy link

On current stable flutter commit I cannot build an android app using flutter_gamepad.

When building and running using VSCode I actually install an app without any warnings, but the app keeps crashing on a Samsung Galaxy10+ saying "App keeps stopping" on the device.

When attempting to build with Android Studio(latest), I get this error output:

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.acu_remote_control, PID: 15345
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.acu_remote_control/com.example.acu_remote_control.MainActivity}: java.lang.UnsupportedOperationException: The new embedding does not support the old FlutterView.
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
     Caused by: java.lang.UnsupportedOperationException: The new embedding does not support the old FlutterView.
        at io.flutter.embedding.engine.plugins.shim.ShimRegistrar.view(ShimRegistrar.java:82)
        at com.example.flutter_gamepad.FlutterGamepadPlugin$Companion.registerWith(FlutterGamepadPlugin.kt:61)
        at com.example.flutter_gamepad.FlutterGamepadPlugin.registerWith(Unknown Source:2)
        at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:18)
        at com.example.acu_remote_control.MainActivity.configureFlutterEngine(MainActivity.kt:10)
        at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(FlutterActivityAndFragmentDelegate.java:185)
        at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:418)
        at android.app.Activity.performCreate(Activity.java:7802)
        at android.app.Activity.performCreate(Activity.java:7791)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) 
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) 
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) 
        at android.os.Handler.dispatchMessage(Handler.java:107) 
        at android.os.Looper.loop(Looper.java:214) 
        at android.app.ActivityThread.main(ActivityThread.java:7356) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) 
I/Process: Sending signal. PID: 15345 SIG: 9
Process 15345 terminated.
@Mithrandir2k18
Copy link
Author

@lynn do you have a fix for Upgrading the AndroidKeyprocessor after Flutter 1.12?
Class Definition
Deprecated Call to FlutterView to be able to exchange the key processors.

@PercyJW-2
Copy link

I just found flutter/flutter#10769 (comment).
Maybe it could be used to implement gamepad support without the registrar from registerWith method.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants