最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

flutter and FlutterActivity are unresolved references after having just worked - Stack Overflow

programmeradmin3浏览0评论

I've been working on a Flutter app and it was working on Android and Web. I added support for Firebase and got that working on the web but now the Android build doesn't work. I get the following errors:

e: file:///<project_root>/android/app/src/main/kotlin/productions/moo/tarot_tutor/MainActivity.kt:3:11 Unresolved reference 'flutter'.
e: file:///<project_root>/android/app/src/main/kotlin/productions/moo/tarot_tutor/MainActivity.kt:5:21 Unresolved reference 'FlutterActivity'.

I added the gradle entries that I was told to in the Firebase Console and I updated Gradle from 8.9.0 to 8.9.1 but I wouldn't think that would cause this issue. I've tried going through various iterations of invalidating caches, flutter clean, gradle syncs, etc. but nothing is changing.

I've been working on a Flutter app and it was working on Android and Web. I added support for Firebase and got that working on the web but now the Android build doesn't work. I get the following errors:

e: file:///<project_root>/android/app/src/main/kotlin/productions/moo/tarot_tutor/MainActivity.kt:3:11 Unresolved reference 'flutter'.
e: file:///<project_root>/android/app/src/main/kotlin/productions/moo/tarot_tutor/MainActivity.kt:5:21 Unresolved reference 'FlutterActivity'.

I added the gradle entries that I was told to in the Firebase Console and I updated Gradle from 8.9.0 to 8.9.1 but I wouldn't think that would cause this issue. I've tried going through various iterations of invalidating caches, flutter clean, gradle syncs, etc. but nothing is changing.

Share Improve this question asked Apr 2 at 7:45 CaseyBCaseyB 25.1k16 gold badges81 silver badges115 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

It turns out this was caused by Firebase wanting a newer NDK version than what was in my Flutter SDK defaults.

发布评论

评论列表(0)

  1. 暂无评论