Open xiaohucode opened 2 months ago
Occurs in v4 version after upgrade flutter to 3.24.
Roll flutter back to 3.22 may solve it.
With latest flutter 3.24, update the compileSdkVersion
in isar_flutter_libs
to 31
like the commit here will fix this, too:
Additionally, change it's dependency and your app's dependency.
Also the built android libs should be saved in
android/src/main/jniLibs
.
Or use my fork:
diff --git a/pubspec.yaml b/pubspec.yaml
index be9c6c1..45979f8 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -47,7 +47,11 @@ dependencies:
url: https://github.com/realth000/infinite-carousel-flutter
ref: 11742d44ddec450b324b49b22e2196438b4ebfe1
isar: ^4.0.0-dev.14
- isar_flutter_libs: ^4.0.0-dev.14
+ isar_flutter_libs:
+ git:
+ url: https://github.com/realth000/isar/
+ ref: 98a6cc1236498ce79a9096f772da754df838da0c
+ path: packages/isar_flutter_libs
json_annotation: ^4.9.0
material_design_icons_flutter: ^7.0.7296
path: any
need immediate fix 🚧
Occurs in v4 version after upgrade flutter to 3.24.
Roll flutter back to 3.22 may solve it.
With latest flutter 3.24, update the
compileSdkVersion
inisar_flutter_libs
to31
like the commit here will fix this, too:Additionally, change it's dependency and your app's dependency.
Also the built android libs should be saved in
android/src/main/jniLibs
.Or use my fork:
diff --git a/pubspec.yaml b/pubspec.yaml index be9c6c1..45979f8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -47,7 +47,11 @@ dependencies: url: https://github.com/realth000/infinite-carousel-flutter ref: 11742d44ddec450b324b49b22e2196438b4ebfe1 isar: ^4.0.0-dev.14 - isar_flutter_libs: ^4.0.0-dev.14 + isar_flutter_libs: + git: + url: https://github.com/realth000/isar/ + ref: 98a6cc1236498ce79a9096f772da754df838da0c + path: packages/isar_flutter_libs json_annotation: ^4.9.0 material_design_icons_flutter: ^7.0.7296 path: any
This solution worked for me on Flutter: 3.24, Gradle:7.6.3 and Isar: 3.1.0+1. Thank you very much.
There is a fix i found in isar's Telegram chat by @Zchandev add to android/builld.gradele:
subprojects {
// fix for verifyReleaseResources
// ============
afterEvaluate { project ->
if (project.plugins.hasPlugin("com.android.application") ||
project.plugins.hasPlugin("com.android.library")) {
project.android {
compileSdkVersion 34
buildToolsVersion "34.0.0"
}
}
}
// ============
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
cc @simc
Thanks @7ANV1R
There is a fix i found in isar's Telegram chat by @Zchandev add to android/builld.gradele:
subprojects { // fix for verifyReleaseResources // ============ afterEvaluate { project -> if (project.plugins.hasPlugin("com.android.application") || project.plugins.hasPlugin("com.android.library")) { project.android { compileSdkVersion 34 buildToolsVersion "34.0.0" } } } // ============ project.buildDir = "${rootProject.buildDir}/${project.name}" }
After applying your provided solution, I am getting this:
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/mubasharhussain/Documents/.../android/build.gradle' line: 23
* What went wrong:
A problem occurred evaluating root project 'android'.
> Cannot run Project.afterEvaluate(Closure) when the project is already evaluated.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Occurs in v4 version after upgrade flutter to 3.24.
Roll flutter back to 3.22 may solve it.
With latest flutter 3.24, update the
compileSdkVersion
inisar_flutter_libs
to31
like the commit here will fix this, too:Additionally, change it's dependency and your app's dependency.
Also the built android libs should be saved in
android/src/main/jniLibs
.Or use my fork:
diff --git a/pubspec.yaml b/pubspec.yaml index be9c6c1..45979f8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -47,7 +47,11 @@ dependencies: url: https://github.com/realth000/infinite-carousel-flutter ref: 11742d44ddec450b324b49b22e2196438b4ebfe1 isar: ^4.0.0-dev.14 - isar_flutter_libs: ^4.0.0-dev.14 + isar_flutter_libs: + git: + url: https://github.com/realth000/isar/ + ref: 98a6cc1236498ce79a9096f772da754df838da0c + path: packages/isar_flutter_libs json_annotation: ^4.9.0 material_design_icons_flutter: ^7.0.7296 path: any
This worked for me for Android but failed for iOS This works better for me: https://github.com/isar/isar/issues/1647#issuecomment-2287751997
master channel ,Android cannot build isar v3
error :