我開發了一個 flutter 專案,這個專案在我的 ios 刺激器上運行良好,但不能在我的 android 手機(物理手機)上運行。嘗試運行專案時出現例外。
這是什么原因?
Exception:
What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin 'com.android.internal.version-check'.
> Cannot parse project property android.enableJetifier='true ' of type 'class java.lang.String' as boolean. Expected 'true' or 'false'.
* 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 968ms
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
uj5u.com熱心網友回復:
在 gradle.properties 中檢查您是否有 android.enableJetifier=true 后面沒有空格。只需從中洗掉最后一個空格'true '
android.enableJetifier='true '
把它像這樣
android.enableJetifier=true
android.useAndroidX=true
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/393793.html
