Skip to content

Commit 61b00ba

Browse files
chore: 🚨 Make example app runnable on Android
1 parent 2cf17b3 commit 61b00ba

File tree

7 files changed

+23
-12
lines changed

7 files changed

+23
-12
lines changed

example/android/app/build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ if (flutterVersionName == null) {
2424
android {
2525
compileSdkVersion 34
2626

27+
compileOptions {
28+
sourceCompatibility JavaVersion.VERSION_17
29+
targetCompatibility JavaVersion.VERSION_17
30+
}
31+
32+
kotlinOptions {
33+
jvmTarget = '17'
34+
}
35+
2736
sourceSets {
2837
main.java.srcDirs += 'src/main/kotlin'
2938
}
@@ -47,6 +56,7 @@ android {
4756
signingConfig signingConfigs.debug
4857
}
4958
}
59+
namespace 'com.simform.example'
5060
}
5161

5262
flutter {

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.simform.example">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32
<!-- Flutter needs it to communicate with the running application
43
to allow setting breakpoints, to provide hot reload, etc.
54
-->

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.simform.example">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32

43
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
54
calls FlutterMain.startInitialization(this); in its onCreate method.

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.simform.example">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32
<!-- Flutter needs it to communicate with the running application
43
to allow setting breakpoints, to provide hot reload, etc.
54
-->

example/android/gradle.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,7 @@
2626

2727
org.gradle.jvmargs=-Xmx1536M
2828
android.enableR8=true
29-
android.useAndroidX=true
29+
android.useAndroidX=true
30+
android.defaults.buildfeatures.buildconfig=true
31+
android.nonTransitiveRClass=false
32+
android.nonFinalResIds=false

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
#Sat Apr 17 13:35:27 IST 2021
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip

example/android/settings.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ pluginManagement {
1818

1919
plugins {
2020
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21-
id "com.android.application" version "7.3.0" apply false
22-
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
21+
id "com.android.application" version '8.10.0' apply false
22+
id "org.jetbrains.kotlin.android" version "1.9.10" apply false
2323
}
2424

25-
include ":app"
25+
include ":app"

0 commit comments

Comments
 (0)