Прежде всего я хочу показать вам ошибку. После этого я покажу вам результат Flutter Doctor и конкретные части кода моего проекта.
Ошибка после запуска проекта Android с помощью flutter run >
- Что пошло не так: возникла проблема при оценке проекта «:app».
Не удалось найти метод versionName() для аргументов [1.0.0, null] в DefaultConfig_Decorated{name=main, Dimension=null,
minSdkVersion=DefaultApiVersion {mApiLevel=18, mCodename='null'},
targetSdkVersion=DefaultApiVersion{mApiLevel=28, mCodename='null'},
renderscriptTargetApi=null, renderscriptSupportModeEnabled=null,
renderscriptSupportModeBlasEnabled=null ,
renderscriptNdkModeEnabled=null, versionCode=8, versionName=null,
applicationId=de.danielederosa.virtualguestbook,
testApplicationId=null, testInstrumentationRunner=null,
testInstrumentationRunnerArguments={}, testHandleProfiling=null,
testFunctionalTest=null, SigningConfig=null, resConfig=null,
mBuildConfigFields={}, mResValues={}, mProguardFiles=[],
mConsumerProguardFiles=[], mManifestPlaceholders= {},
mWearAppUnbundled=null} типа
com.android.build.gradle.internal.dsl.DefaultConfig. - Попробуйте: запустите с параметром --stacktrace, чтобы получить трассировку стека. Запустите с опцией --info или --debug, чтобы получить больше результатов журнала. Запустите --scan, чтобы получить полную информацию.
- Получите дополнительную помощь на https://help.gradle.org
кодом выхода 1 Выход (sigterm)
build.gradle
Код: Выделить всё
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.2'
classpath 'com.google.gms:google-services:4.3.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Код: Выделить всё
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
Код: Выделить всё
version: 1.0.0+8Код: Выделить всё
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "de.danielederosa.virtualguestbook"
minSdkVersion 18
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName '1.0.0',
multiDexEnabled true
}
Подробнее здесь: https://stackoverflow.com/questions/650 ... ersionname