Skip to content

Commit ee727dc

Browse files
committed
fixed all
1 parent 2583375 commit ee727dc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+767
-482
lines changed

android/.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ gradle-wrapper.jar
44
/gradlew
55
/gradlew.bat
66
/local.properties
7-
GeneratedPluginRegistrant.java
7+
GeneratedPluginRegistrant.java
8+
9+
# Remember to never publicly share your keystore.
10+
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
key.properties

android/app/build.gradle

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,23 @@ if (flutterVersionName == null) {
2222
}
2323

2424
apply plugin: 'com.android.application'
25+
apply plugin: 'kotlin-android'
2526
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2627

2728
android {
28-
compileSdkVersion 29
29+
compileSdkVersion 30
2930

30-
lintOptions {
31-
disable 'InvalidPackage'
31+
sourceSets {
32+
main.java.srcDirs += 'src/main/kotlin'
3233
}
3334

3435
defaultConfig {
3536
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
3637
applicationId "com.hoc.sqlite_bloc_rxdart"
37-
minSdkVersion 21
38-
targetSdkVersion 29
38+
minSdkVersion 16
39+
targetSdkVersion 30
3940
versionCode flutterVersionCode.toInteger()
4041
versionName flutterVersionName
41-
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
4242
}
4343

4444
buildTypes {
@@ -55,7 +55,5 @@ flutter {
5555
}
5656

5757
dependencies {
58-
testImplementation 'junit:junit:4.12'
59-
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
60-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
58+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
6159
}
Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,41 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="com.hoc.sqlite_bloc_rxdart">
3-
4-
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
5-
calls FlutterMain.startInitialization(this); in its onCreate method.
6-
In most cases you can leave this as-is, but you if you want to provide
7-
additional functionality it is fine to subclass or reimplement
8-
FlutterApplication and put your custom class here. -->
9-
<application
10-
android:name="io.flutter.app.FlutterApplication"
3+
<application
114
android:label="sqlite_bloc_rxdart"
125
android:icon="@mipmap/ic_launcher">
136
<activity
147
android:name=".MainActivity"
158
android:launchMode="singleTop"
169
android:theme="@style/LaunchTheme"
17-
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
10+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1811
android:hardwareAccelerated="true"
1912
android:windowSoftInputMode="adjustResize">
20-
<!-- This keeps the window background of the activity showing
21-
until Flutter renders its first frame. It can be removed if
22-
there is no splash screen (such as the default splash screen
23-
defined in @style/LaunchTheme). -->
13+
<!-- Specifies an Android theme to apply to this Activity as soon as
14+
the Android process has started. This theme is visible to the user
15+
while the Flutter UI initializes. After that, this theme continues
16+
to determine the Window background behind the Flutter UI. -->
2417
<meta-data
25-
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
26-
android:value="true" />
18+
android:name="io.flutter.embedding.android.NormalTheme"
19+
android:resource="@style/NormalTheme"
20+
/>
21+
<!-- Displays an Android View that continues showing the launch screen
22+
Drawable until Flutter paints its first frame, then this splash
23+
screen fades out. A splash screen is useful to avoid any visual
24+
gap between the end of Android's launch screen and the painting of
25+
Flutter's first frame. -->
26+
<meta-data
27+
android:name="io.flutter.embedding.android.SplashScreenDrawable"
28+
android:resource="@drawable/launch_background"
29+
/>
2730
<intent-filter>
2831
<action android:name="android.intent.action.MAIN"/>
2932
<category android:name="android.intent.category.LAUNCHER"/>
3033
</intent-filter>
3134
</activity>
35+
<!-- Don't delete the meta-data below.
36+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
37+
<meta-data
38+
android:name="flutterEmbedding"
39+
android:value="2" />
3240
</application>
3341
</manifest>

android/app/src/main/java/com/hoc/sqlite_bloc_rxdart/MainActivity.java

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package com.hoc.sqlite_bloc_rxdart
2+
3+
import io.flutter.embedding.android.FlutterActivity
4+
5+
class MainActivity: FlutterActivity() {
6+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Modify this file to customize your launch splash screen -->
3+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4+
<item android:drawable="?android:colorBackground" />
5+
6+
<!-- You can insert your own image assets here -->
7+
<!-- <item>
8+
<bitmap
9+
android:gravity="center"
10+
android:src="@mipmap/launch_image" />
11+
</item> -->
12+
</layer-list>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
4+
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
5+
<!-- Show a splash screen on the activity. Automatically removed when
6+
Flutter draws its first frame -->
7+
<item name="android:windowBackground">@drawable/launch_background</item>
8+
</style>
9+
<!-- Theme applied to the Android Window as soon as the process has started.
10+
This theme determines the color of the Android Window while your
11+
Flutter UI initializes, as well as behind your Flutter UI while its
12+
running.
13+
14+
This Theme is only used starting with V2 of Flutter's Android embedding. -->
15+
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
16+
<item name="android:windowBackground">?android:colorBackground</item>
17+
</style>
18+
</resources>
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
3+
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
4+
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
45
<!-- Show a splash screen on the activity. Automatically removed when
56
Flutter draws its first frame -->
67
<item name="android:windowBackground">@drawable/launch_background</item>
78
</style>
9+
<!-- Theme applied to the Android Window as soon as the process has started.
10+
This theme determines the color of the Android Window while your
11+
Flutter UI initializes, as well as behind your Flutter UI while its
12+
running.
13+
14+
This Theme is only used starting with V2 of Flutter's Android embedding. -->
15+
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
16+
<item name="android:windowBackground">?android:colorBackground</item>
17+
</style>
818
</resources>

android/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
buildscript {
2+
ext.kotlin_version = '1.3.50'
23
repositories {
34
google()
45
jcenter()
56
}
67

78
dependencies {
8-
classpath 'com.android.tools.build:gradle:3.5.3'
9+
classpath 'com.android.tools.build:gradle:4.1.0'
10+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
911
}
1012
}
1113

android/gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
org.gradle.jvmargs=-Xmx1536M
2-
android.enableR8=true
32
android.useAndroidX=true
43
android.enableJetifier=true

0 commit comments

Comments
 (0)