Update Your flutter installation
Install Java 17
Set this as the new JAVA_HOME in.bash_profile
or .zshrc
Navigate to your flutter installation folder
Git checkout to version 3.24.5 Run flutter doctor to make sure everthing worksMigrate Existing Applications/Libraries
Update all the Sisitech flutter libs packages to branch update_flutter
Here are the update_flutter
branch commits for sisitech libraries
pubspec.yaml
---
flutter_utils:
git:
url: git@github.com:sisitech/flutter_utils.git
ref: "b68a85f"
flutter_auth:
git:
url: git@github.com:sisitech/flutter_auth.git
ref: "67872f9"
flutter_form:
git:
url: git@github.com:sisitech/flutter-forms.git
ref: "68aa594"
flutter_tables:
git:
url: git@github.com:sisitech/flutter-tables.git
ref: "a24c8cb"
flutter_login:
git:
url: git@github.com:sisitech/flutter_login.git
ref: "2870a15"
sistch_fl_onboarding:
git:
url: git@github.com:sisitech/flutter_onboarding.git
ref: "adeb6b7"
---
Rename Android folder to android_old
Recreate Android Folder
In your root project run
Note
If it's a library
switch into the example folder before recreating.
cd example_folder
Copy the andorid res
folder
This contains your app icons
Create a pro-guard rules file
Create a android/app/proguard-rules.pro
file
android/app/proguard-rules.pro
# Please add these rules to your existing keep rules in order to suppress warnings.
# This is generated automatically by the Android Gradle plugin.
-dontwarn com.google.errorprone.annotations.CanIgnoreReturnValue
-dontwarn com.google.errorprone.annotations.CheckReturnValue
-dontwarn com.google.errorprone.annotations.Immutable
-dontwarn com.google.errorprone.annotations.RestrictedApi
-dontwarn javax.annotation.Nullable
-dontwarn javax.annotation.concurrent.GuardedBy
Update the main android/build.gradle
file
Update the allprojects
section to this
android/build.gradle
---
allprojects {
repositories {
google()
mavenCentral()
}
subprojects {
afterEvaluate { project ->
if (project.hasProperty('android')) {
project.android {
if (namespace == null) {
namespace project.group
}
}
}
}
}
}
---
Move over any permission required to the new AndroidManifest.xml
permissions and other settings
This includes
- The permissions
- Any receivers for instance sms
- The application label
- The application Icon
Clean the project
Update any packages with error
terminal
Execution failed for task ':workmanager:compileReleaseKotlin'.
> 'compileReleaseJavaWithJavac' task (current target is 1.8) and 'compileReleaseKotlin' task (current target is 17) jvm target compatibility should be set to the same Java version.
Note
From the above error workmanager
manager app seems to be the problem.
Updating it to
workmanager: 0.5.2
fixes this issue