Untitled

 avatar
unknown
plain_text
10 months ago
1.7 kB
22
Indexable
### Changes needed to be made

1. Upgraded Flutter version to latest stable one.
2. Changed ndkVersion to 28.2.13676358. The ndkVersion is found under app level build.gradle
    
    ```kotlin
     android {
         namespace "com.fonepay.international"
         compileSdkVersion localProperties.getProperty("flutter.compileSdkVersion").toInteger()
    ->   ndkVersion "27.0.12077973"
    
    ```
    

   3. Changed JVM version to 17.

```kotlin
     kotlinOptions {
->        jvmTarget = "17"
     }
```

    4. Upgraded gradle version and distribution url. (Already was upgraded so skipped it).

    5. Upgraded Kotlin version to 2.1.0. Do note that the old way of specifying Kotlin Version didnt work so had to specify it in new way.

Originally it was in project level build.gradle . Removed kotlin_version and kotlin-gradle-plugin line.

```kotlin
 buildscript {
->    ext.kotlin_version = '2.1.21'
     repositories {
         google()
         mavenCentral()
     }
 
     dependencies {
         classpath 'com.android.tools.build:gradle:8.7.2'
         classpath 'com.google.gms:google-services:4.3.14'
->        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
     }
 }
```

Added the kotlin version in settings.gradle 

```kotlin
 plugins {
     id "dev.flutter.flutter-plugin-loader" version "1.0.0"
     id "com.android.application" version "8.7.2" apply false
->    id "org.jetbrains.kotlin.android" version "2.1.0" apply false

 }
 
```

1. Specified Java path in gradle.properties

```kotlin
-> org.gradle.java.home=C:\\Program Files\\Java\\jdk-17
```

sda
Editor is loading...
Leave a Comment