【发布时间】:2021-06-17 13:46:26
【问题描述】:
我的 Flutter 应用程序一直运行良好,直到我停止构建成功
android/app/src/main/kotlin/com/apps/myapp/MainActivity.kt文件
package com.apps.myapp
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
}
控制台
Built build/app/outputs/repo.
Building plugin workmanager...
✓ Built build/app/outputs/repo.
e: /home/apps/myapp/android/app/src/main/kotlin/com/apps/myapp/MainActivity.kt: (3, 19): Unresolved reference: embedding
e: /home/apps/myapp/android/app/src/main/kotlin/com/apps/myapp/MainActivity.kt: (5, 21): Unresolved reference: FlutterActivity
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
> Compilation error. See log for more details
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
请帮助解决此问题!谢谢。
【问题讨论】:
-
在重新构建之前,您是否尝试在您的 android 项目中运行“gradlew clean”?
-
是的.. 多次