website icon indicating copy to clipboard operation
website copied to clipboard

Resolve issue with Android code provided on 'Writing custom platform-specific code' page

Open 0xcodezero opened this issue 6 years ago • 7 comments

Page URL: https://docs.flutter.dev/platform-integration/platform-channels Page source: https://github.com/flutter/website/tree/master/src/docs/development/platform-integration/platform-channels.md

Description of issue:

Currently, this code is not working anymore for Android (Java or Kotlin) as mostly there is no more method onCreate is there, and the MainActivity type has been changed to use

import io.flutter.embedding.android.FlutterActivity;
import io.flutter.embedding.engine.FlutterEngine;

instead of import io.flutter.app.FlutterActivity;

And I got an error for getFlutterView() is not defined Any Suggestion?

0xcodezero avatar Nov 26 '19 17:11 0xcodezero