heruijun / flutter_boss

flutter仿BOSS直聘(二),大前端技术实现

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

代码克隆下来无法运行

KitGavinx opened this issue · comments

commented

IDE :Android studio 4.1.1
启动时报如下错误:

event sent after app closed: {id: 0, progressId: null, message: Running "flutter pub get" in flutter_bottomnav...}
event sent after app closed: {id: 0, progressId: null, finished: true}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Warning
──────────────────────────────────────────────────────────────────────────────
Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2. Follow the
steps at

https://flutter.dev/go/android-project-migration

to migrate your project.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Launching lib/main.dart on Mi 10 Pro in debug mode...
[!] Your app isn't using AndroidX.
To avoid potential build failures, you can quickly migrate your app by following the steps on https://goo.gl/CP92wY .
Running Gradle task 'assembleDebug'...
/Users/zhuzhiqiang/gradle-4.5.1/.gradle/caches/transforms-1/files-1.1/core-1.1.0.aar/99875dad3578891d7a573f3ed4990bf2/res/values/values.xml:7:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.

/Users/zhuzhiqiang/gradle-4.5.1/.gradle/caches/transforms-1/files-1.1/core-1.1.0.aar/99875dad3578891d7a573f3ed4990bf2/res/values/values.xml:7:5-70: AAPT: error: resource android:attr/ttcIndex not found.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:processDebugResources'.

Failed to process resources, see aapt output above for 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.

  • Get more help at https://help.gradle.org

BUILD FAILED in 13s
Exception: Gradle task assembleDebug failed with exit code 1

跟着上面的提示修改了一下
在 pubspec.yaml 添加了
module:
androidX: true

并在android/gradle.properties里面添加了
android.useAndroidX=true
android.enableJetifier=true

然后执行flutter clean

还是无法启动

event sent after app closed: {id: 0, progressId: null, message: Running "flutter pub get" in flutter_bottomnav...}
event sent after app closed: {id: 0, progressId: null, finished: true}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Warning
──────────────────────────────────────────────────────────────────────────────
Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2. Follow the
steps at

https://flutter.dev/go/android-project-migration

to migrate your project.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Launching lib/main.dart on Mi 10 Pro in debug mode...
Running Gradle task 'assembleDebug'...

commented

发错地方了