我阅读了所有这些问题的解决方案,但是我的项目没有任何改变
使缓存无效/重新启动
build.gradle:
compileSdkVersion 29
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "xx.xxx.XXXXXXXXXX"
minSdkVersion 16
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
gradle.properties:
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
gradle.wrapper.properties:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
渐变版本:
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
}
pubspec.yaml:
module:
androidX:true
项目结构:
使缓存无效/重新启动
我的 pubspec.yaml 依赖项:
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.2
states_rebuilder: ^1.7.0
cached_network_image: ^2.0.0-rc
flutter_sms: ^1.1.0
uuid: ^2.0.4
avatar_glow: ^1.1.0
url_launcher: ^5.2.7
font_awesome_flutter: ^8.5.0
json_annotation: ^3.0.0
http: ^0.12.0+2
fluro: ^1.5.1
path_provider: ^1.4.5
provider: ^3.1.0+1
sqflite: any
intl: ^0.16.0
circular_reveal_animation: ^1.1.3
expandable: ^3.0.1
streaming_shared_preferences: ^1.0.1
flutter_statusbarcolor: any
carousel_slider: ^1.3.1
moor_flutter: ^2.0.0
moor: ^2.1.0
flare_flutter: ^1.7.3
chopper: ^3.0.1
logging: ^0.11.3+2
connectivity: ^0.4.5+6
built_value: ^7.0.0
flutter_spinkit: ^4.0.0
oktoast: ^2.2.0
sms: ^0.2.4
flutter_html: ^0.11.0
animator: ^1.0.0+2
#flutter_downloader: ^1.3.3
audioplayer: ^0.5.2
mobx: ^0.3.9+3
flutter_mobx: ^0.3.3+3
permission_handler: ^4.0.0
flutter_wordpress: ^0.1.4
device_info: ^0.4.1+2
#device_info: ^0.2.1 #https://github.com/flutter/plugins
flutter_launcher_icons: ^0.7.4
dev_dependencies:
build_runner: ^1.7.2
moor_generator: ^2.1.1
chopper_generator: ^3.0.2
built_value_generator: ^7.0.0
json_serializable: ^3.2.3
hermes: ^3.0.0
mobx_codegen: ^0.3.10+1
flutter_test:
sdk: flutter
答案 0 :(得分:0)
将您的编译sdk版本29 更改为编译sdk版本28