- 要使用组件需修改 Android 启动页面继承
FlutterFragmentActivity
- Java 版:
example/android/app/src/main/java/com/zero/flutter_adcontent_example/MainActivity.java
1import io.flutter.embedding.android.FlutterActivity;
2import io.flutter.embedding.android.FlutterFragmentActivity;
3
4public class MainActivity extends FlutterFragmentActivity {
5}
example/android/app/src/main/kotlin/com/zero/flutter_adcontent_example/MainActivity.kotlin
1import io.flutter.embedding.android.FlutterActivity
2import io.flutter.embedding.android.FlutterFragmentActivity;
3
4class MainActivity: FlutterFragmentActivity () {
5}