Reputation: 890
I'm new to Flutter mixed development. Recently, I created a mixed project like Integrate a Flutter module into your Android project I use simplest method create a flutter_module by Android Studio. When look at Adding a Flutter screen to an Android app , I write code like below:
myButton.setOnClickListener {
startActivity(
FlutterActivity.createDefaultIntent(this)
)
}
Then Android Studio Warn me "Cannot access ‘android.arch.lifecycle.LifecycleOwner’ which is a supertype of ‘io.flutter.embedding.android.FlutterActivity’. Check your module classpath for missing or conflicting dependencies." on createDefaultIntent method. Any help is apprecated.
Android Studio 3.6.3
classpath 'com.android.tools.build:gradle:3.6.3'
distributionUrl=https://services.gradle.org/distributions/gradle-5.6.4-all.zip
compileSdkVersion 29
buildToolsVersion "29.0.2"
Flutter 1.12.13+hotfix.9 • channel
Upvotes: 4
Views: 1170
Reputation: 890
It's seems just a android studio bug. Today I rearch more, have no result to. But when I try to run it , I found it can run. amazing.
Upvotes: 3