Skip to content

Commit

Permalink
feat:Android 升级了Java版本,解决了不能打包的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Tecode committed Apr 7, 2024
1 parent 05b3d3f commit c86736b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 14 deletions.
6 changes: 3 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 28
compileSdkVersion 31

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -39,8 +39,8 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "aming.com.dynamic_theme"
minSdkVersion 16
targetSdkVersion 28
minSdkVersion 23
targetSdkVersion 31
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
10 changes: 5 additions & 5 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:name="${applicationName}"
android:label="动态主题"
android:icon="@mipmap/ic_launcher">
<activity
Expand All @@ -15,7 +15,8 @@
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
android:windowSoftInputMode="adjustResize"
android:exported="true">
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
Expand All @@ -32,9 +33,8 @@
<category android:name="android.intent.category.BROWSABLE"/>
<data
android:scheme="dynamictheme"/>
<data
android:host="detail"
android:scheme="dynamictheme"/>
<data android:scheme="dynamictheme"/>
<data android:host="detail"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
Expand Down
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.7.10'
repositories {
google()
jcenter()
Expand All @@ -9,7 +9,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -32,6 +32,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ 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
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
2 changes: 1 addition & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ packages:
source: sdk
version: "0.0.0"
flutter_test:
dependency: transitive
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
Expand Down
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ dependencies:
dev_dependencies:
flutter_driver:
sdk: flutter
flutter_test:
sdk: flutter
flutter_lints: ^3.0.1
flutter_test: any
test: any
path: any

Expand Down

0 comments on commit c86736b

Please sign in to comment.