[英]Issue after updating flutter and android studio
Hi I recently update flutter and my android studio and then I saw this error below:嗨,我最近更新了 flutter 和我的 android studio,然后我在下面看到了这个错误:
enter here to see the error进入这里查看错误
android/BuildGradlew:安卓/BuildGradlew:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
android/app/buildgradlew:安卓/应用程序/buildgradlew:
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new FileNotFoundException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = false
android {
compileSdkVersion 28
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "ASDADED"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.2.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'com.google.firebase:firebase-auth:16.0.5'
androidTestImplementation 'com.google.firebase:firebase-core:16.0.4'
androidTestImplementation 'com.mercadopago:sdk:3.8.1'
}
flutter doctor:扑医生:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.9.4, on Microsoft Windows [Versión 10.0.17134.345], locale es-AR)
[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[√] Android Studio (version 3.2)
[!] VS Code (version 1.28.2)
[√] Connected devices (1 available)
I search here and y found a lot of answers but I cant solve it.我在这里搜索,找到了很多答案,但我无法解决。
I try to put de maven repository or downgrade the plugins but I have the same error.我尝试放置 de maven 存储库或降级插件,但我遇到了同样的错误。
That's an issue that pops up quite often recently这是最近经常出现的问题
https://github.com/flutter/flutter/issues/23404 https://github.com/flutter/flutter/issues/23404
A possible fix is waiting for approval https://github.com/flutter/flutter/issues/23404#issuecomment-432205806一个可能的修复正在等待批准https://github.com/flutter/flutter/issues/23404#issuecomment-432205806
When you build an app bundle, it will increment version number and code automatically based on pubspec.yaml file.当您构建应用程序包时,它会根据 pubspec.yaml 文件自动增加版本号和代码。
try尝试
flutter build appbundle
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.