Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

代码克隆下来无法运行 #8

Open
KitGavinx opened this issue Jan 7, 2021 · 0 comments
Open

代码克隆下来无法运行 #8

KitGavinx opened this issue Jan 7, 2021 · 0 comments

Comments

@KitGavinx
Copy link

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'...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant