Skip to content

Commit 4e04f1f

Browse files
committed
Update android project
1 parent 96d9a6f commit 4e04f1f

File tree

11 files changed

+26
-28
lines changed

11 files changed

+26
-28
lines changed

android/src/main/java/qiuxiang/android_window/.gitkeep

Whitespace-only changes.

example/android/app/build.gradle

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
29-
compileSdkVersion 31
29+
compileSdkVersion flutter.compileSdkVersion
30+
ndkVersion flutter.ndkVersion
3031

3132
compileOptions {
3233
sourceCompatibility JavaVersion.VERSION_1_8
@@ -43,9 +44,11 @@ android {
4344

4445
defaultConfig {
4546
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
46-
applicationId "qiuxiang.android_window_example"
47-
minSdkVersion 16
48-
targetSdkVersion 31
47+
applicationId "com.example.example"
48+
// You can update the following values to match your application needs.
49+
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
50+
minSdkVersion 19
51+
targetSdkVersion flutter.targetSdkVersion
4952
versionCode flutterVersionCode.toInteger()
5053
versionName flutterVersionName
5154
}

example/android/app/src/debug/AndroidManifest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="qiuxiang.android_window_example">
3-
<!-- Flutter needs it to communicate with the running application
2+
package="com.example.example">
3+
<!-- The INTERNET permission is required for development. Specifically,
4+
the Flutter tool needs it to communicate with the running application
45
to allow setting breakpoints, to provide hot reload, etc.
56
-->
67
<uses-permission android:name="android.permission.INTERNET"/>

example/android/app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="qiuxiang.android_window_example">
3-
<application
2+
package="com.example.example">
3+
<application
4+
android:label="example"
45
android:name=".MainApplication"
5-
android:label="android_window_example"
66
android:icon="@mipmap/ic_launcher">
77
<activity
88
android:name=".MainActivity"
@@ -20,15 +20,6 @@
2020
android:name="io.flutter.embedding.android.NormalTheme"
2121
android:resource="@style/NormalTheme"
2222
/>
23-
<!-- Displays an Android View that continues showing the launch screen
24-
Drawable until Flutter paints its first frame, then this splash
25-
screen fades out. A splash screen is useful to avoid any visual
26-
gap between the end of Android's launch screen and the painting of
27-
Flutter's first frame. -->
28-
<meta-data
29-
android:name="io.flutter.embedding.android.SplashScreenDrawable"
30-
android:resource="@drawable/launch_background"
31-
/>
3223
<intent-filter>
3324
<action android:name="android.intent.action.MAIN"/>
3425
<category android:name="android.intent.category.LAUNCHER"/>
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
package qiuxiang.android_window_example
1+
package com.example.example
22

33
class MainActivity : qiuxiang.android_window.AndroidWindowActivity()
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
package qiuxiang.android_window_example
1+
package com.example.example
22

33
class MainApplication : qiuxiang.android_window.AndroidWindowApplication()

example/android/app/src/main/res/values-night/styles.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
44
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
55
<!-- Show a splash screen on the activity. Automatically removed when
6-
Flutter draws its first frame -->
6+
the Flutter engine draws its first frame -->
77
<item name="android:windowBackground">@drawable/launch_background</item>
88
</style>
99
<!-- Theme applied to the Android Window as soon as the process has started.
1010
This theme determines the color of the Android Window while your
1111
Flutter UI initializes, as well as behind your Flutter UI while its
1212
running.
13-
13+
1414
This Theme is only used starting with V2 of Flutter's Android embedding. -->
1515
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
1616
<item name="android:windowBackground">?android:colorBackground</item>

example/android/app/src/main/res/values/styles.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
44
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
55
<!-- Show a splash screen on the activity. Automatically removed when
6-
Flutter draws its first frame -->
6+
the Flutter engine draws its first frame -->
77
<item name="android:windowBackground">@drawable/launch_background</item>
88
</style>
99
<!-- Theme applied to the Android Window as soon as the process has started.
1010
This theme determines the color of the Android Window while your
1111
Flutter UI initializes, as well as behind your Flutter UI while its
1212
running.
13-
13+
1414
This Theme is only used starting with V2 of Flutter's Android embedding. -->
1515
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
1616
<item name="android:windowBackground">?android:colorBackground</item>

example/android/app/src/profile/AndroidManifest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="qiuxiang.android_window_example">
3-
<!-- Flutter needs it to communicate with the running application
2+
package="com.example.example">
3+
<!-- The INTERNET permission is required for development. Specifically,
4+
the Flutter tool needs it to communicate with the running application
45
to allow setting breakpoints, to provide hot reload, etc.
56
-->
67
<uses-permission android:name="android.permission.INTERNET"/>

example/android/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:4.1.0'
9+
classpath 'com.android.tools.build:gradle:7.0.2'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}
@@ -21,6 +21,8 @@ allprojects {
2121
rootProject.buildDir = '../build'
2222
subprojects {
2323
project.buildDir = "${rootProject.buildDir}/${project.name}"
24+
}
25+
subprojects {
2426
project.evaluationDependsOn(':app')
2527
}
2628

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip

0 commit comments

Comments
 (0)