Closed pablanka closed 2 months ago
Post the following files:
name: sytex
description: Sytex mobile app.
publish_to: none
version: 2.4.7+432
environment: sdk: ">=2.7.0 <3.0.0"
dependencies: amplify_auth_cognito: ^1.0.0-next.7 amplify_flutter: ^1.0.0-next.7 app_settings: ^4.1.6 assorted_layout_widgets: ^7.0.0 built_collection: ^5.0.0 cached_network_image: git: url: https://github.com/davidmartos96/flutter_cached_network_image path: cached_network_image/ ref: closeChunksStream clickup_fading_scroll: git: url: https://github.com/clickup/clickup_fading_scroll cloud_firestore: ^4.3.1 coast: git: url: https://github.com/franpitri/flutter_coast collection: ^1.15.0 confetti: ^0.7.0 connectivity_plus: ^2.2.1 device_info: ^2.0.0 dio: ^4.0.6 dotted_border: ^2.0.0 easy_image_viewer: ^1.2.0 emoji_picker_flutter: ^1.3.0 equatable: ^2.0.0 file_picker: ^5.2.0 filesize: ^2.0.0 firebase_analytics: ^10.1.0 firebase_auth: ^4.2.5 firebase_core: ^2.4.1 firebase_messaging: ^14.2.1 firebase_remote_config: ^3.0.9 firebase_storage: ^11.0.10 fl_chart: ^0.55.0 flare_flutter: git: url: https://github.com/tsinis/Flare-Flutter path: flare_flutter/ flutter: sdk: flutter flutter_android_volume_keydown: ^1.0.0 flutter_background_geolocation: ^4.10.2 flutter_barcode_scanner: ^2.0.0 flutter_bloc: ^8.0.1 flutter_cache_manager: ^3.0.1 flutter_colorpicker: ^0.5.0 flutter_downloader: ^1.7.1 flutter_expanded_tile: ^0.2.1 flutter_keyboard_visibility: ^5.1.1 flutter_linkify: ^5.0.2 flutter_localizations: sdk: flutter flutter_markdown: ^0.6.1 flutter_nfc_kit: ^3.3.1 flutter_rating_bar: ^4.0.0 flutter_slidable: ^0.6.0 flutter_sound_lite: ^8.4.2 flutter_statusbarcolor_ns: ^0.4.0 flutter_svg: ^1.1.0 flutter_uploader: git: url: https://github.com/FranPitri/flutter_uploader ref: get_status flutter_web_browser: ^0.17.1 fluttertoast: ^8.0.8 font_awesome_flutter: any geolocator: ^9.0.2 get_it: ^7.2.0 google_maps_flutter: ^2.2.5 google_maps_flutter_android: ^2.4.10 google_maps_flutter_platform_interface: ^2.2.6 hydrated_bloc: ^8.0.0 image_crop: ^0.4.1 image_picker: ^0.8.4+4 image_size_getter: ^2.1.2 image_utilities: git: url: https://github.com/Sytex/image_utilities in_app_update: ^3.0.0 injectable: ^2.1.0 intercom_flutter: 7.3.0 intl: ^0.17.0 just_debounce_it: ^4.0.0+2 math_expressions: ^2.3.1 md2_tab_indicator: git: url: https://github.com/westdabestdb/md2_tab_indicator mime: ^1.0.0 modal_bottom_sheet: ^3.0.0-pre open_filex: ^4.1.1 orientation: ^1.3.0 package_info: ^2.0.2 path_provider: ^2.0.8 permission_handler: ^10.0.0 pinput: ^2.2.23 platform_device_id: ^1.0.1 posthog_flutter: ^2.0.3 provider: ^6.0.0 rainbow_color: ^2.0.1 readmore: ^2.0.0 rxdart: ^0.27.1 scrollable_positioned_list: ^0.1.10 sembast: ^3.1.2 sentry: ^6.3.0 share_extend: ^2.0.0 shared_preferences: ^2.0.12 sliding_up_panel: ^2.0.0+1 sqflite: ^2.0.2 sytex_camera: path: ../sytex_camera/ sytex_client_core: path: ../sytex_client_core/ sytex_ui: path: ../sytex_ui/ tasty_toast: ^0.1.2 timeago: ^3.0.2 uni_links: ^0.5.1 url_launcher: ^6.0.18 uuid: ^3.0.4 vibration: ^1.7.3 video_compress: ^3.1.0 video_player: ^2.2.11 video_thumbnail: ^0.5.3 wakelock: ^0.6.0+1 wave: git: url: https://github.com/searchy2/wave
dev_dependencies: bloc_test: ^9.0.2 build_runner: ^2.1.7 effective_dart: ^1.2.1 expect_emits_nothing: git: url: https://github.com/pitriq/expect_emits_nothing fake_cloud_firestore: ^2.3.0+3 injectable_generator: git: url: https://github.com/pitriq/injectable path: injectable_generator mockito: ^5.3.2 pedantic: ^1.11.0 test: ^1.20.2
dependency_overrides: font_awesome_flutter: path: ../font_awesome_flutter/ sqflite_common: 2.3.0
flutter: uses-material-design: true
fonts:
family: SytexIcons fonts:
assets:
* android/build.gradle
```gradle
buildscript {
ext.kotlin_version = '1.7.10'
ext {
compileSdkVersion = 33
targetSdkVersion = 33
appCompatVersion = "1.4.2"
playServicesLocationVersion = "21.0.0"
}
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.google.gms:google-services:4.3.15'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
classpath 'com.android.support:support-v4:28.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
maven { url "https://maven.google.com" }
jcenter()
maven {
url "${project(':flutter_background_geolocation').projectDir}/libs"
}
maven {
url "${project(':background_fetch').projectDir}/libs"
}
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
Project background_geolocation = project(':flutter_background_geolocation')
apply from: "${background_geolocation.projectDir}/background_geolocation.gradle"
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
throw new GradleException("versionCode not found. Define flutter.versionCode in the local.properties file.")
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
throw new GradleException("versionName not found. Define flutter.versionName in the local.properties file.")
}
android {
compileSdkVersion rootProject.ext.compileSdkVersion
lintOptions {
disable 'InvalidPackage'
checkReleaseBuilds false
}
defaultConfig {
applicationId "io.siteplan.sytex"
minSdkVersion 24
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storePassword keystoreProperties['storePassword']
storeFile file(keystoreProperties['storeFile'])
}
}
aaptOptions {
ignoreAssetsPattern "!x86:!*ffprobe"
}
buildTypes {
release {
signingConfig signingConfigs.release
shrinkResources false
proguardFiles "${background_geolocation.projectDir}/proguard-rules.pro"
}
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
configurations {
implementation.exclude module:'protobuf-lite'
}
}
flutter {
source '../..'
}
dependencies {
implementation 'com.google.android.gms:play-services-base:18.0.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.1.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.71"
debugImplementation 'com.amitshekhar.android:debug-db-encrypt:1.0.6'
implementation 'com.android.support:multidex:1.0.3'
configurations.all {
resolutionStrategy.force 'com.google.android.gms:play-services-base:18.0.1'
}
implementation 'com.google.android.gms:play-services-maps:18.0.2'
}
apply plugin: 'kotlin-android'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
Also post the results of
$ cd android
$ ./gradlew app:dependencies
https://drive.google.com/file/d/1BmUyATBgchePDpTMxFAn2P3MFnSUTH8j/view?usp=sharing
As I suspected, you have some other plugin which is importing the same "logger" SDK that the plugin uses org.slf4j
Your plugin project :amplify_auth_cognito_android
. That plugin ultimately imports org.slf4j:slf4j-api:2.0.1
while flutter_background_geolocation
imports 1.7.36
but gets bumped up to 2.0.1
due to the dependency above:
org.slf4j:slf4j-api:1.7.36 -> 2.0.1
, which flutter_background_geolocation
doesn't seem to like.
I will have to investigate what upgrading to org.slf4j:slf4j-api:2.0.1
will do to the plugin. There is no easy fix for this.
Ok, I'll try downgrading the other plugin version in the meantime. Thanks for your help
The plugin imports slf4j
from logback-android
from its build.gradle
with the following versions:
implementation 'org.slf4j:slf4j-api:1.7.36'
implementation 'com.github.tony19:logback-android:2.0.1'
I quickly did a test with the latest version of logback-android
and it seems to have no issues.
dependencies {
implementation 'org.slf4j:slf4j-api:2.0.7'
implementation 'com.github.tony19:logback-android:3.0.0'
}
I'll do a bit more testing with this and push a release with logback-android
and its corresponding slf4j
version as above. It should fix the problem.
I did a test making that change in your plugin locally (pub cache) and it worked!
Good work.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
Your Environment
Flutter info (
flutter doctor
): Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.7.11, on macOS 12.6.3 21G419 darwin-x64, locale en-AR) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 14.2) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.1) [✓] VS Code (version 1.77.3) [✓] Connected device (3 available) [✓] HTTP Host AvailabilityExpected Behavior
Application should run on the device
Actual Behavior
Application crashes giving the following error:
Launching lib/main.dart on SM A515F in debug mode... [flutter_background_geolocation] Purging debug resources in release build Running Gradle task 'assembleDebug'... 48.3s ✓ Built build/app/outputs/flutter-apk/app-debug.apk. D/FlutterGeolocator(27873): Attaching Geolocator to activity E/AndroidRuntime(27873): FATAL EXCEPTION: pool-17-thread-2 E/AndroidRuntime(27873): Process: io.siteplan.sytex, PID: 27873 E/AndroidRuntime(27873): java.lang.ClassCastException: org.slf4j.helpers.NOPLogger cannot be cast to ch.qos.logback.classic.Logger E/AndroidRuntime(27873): at com.transistorsoft.locationmanager.logger.TSLog.getRootLogger(Unknown Source:11) E/AndroidRuntime(27873): at com.transistorsoft.locationmanager.logger.TSLog.access$000(Unknown Source:0) E/AndroidRuntime(27873): at com.transistorsoft.locationmanager.logger.TSLog$a.run(Unknown Source:0) E/AndroidRuntime(27873): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) E/AndroidRuntime(27873): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) E/AndroidRuntime(27873): at java.lang.Thread.run(Thread.java:1012)