Closed ricardobrg closed 1 year ago
An issue has been identified with the tiki-sdk-flutter version 2.1.2 in the tiki-sdk-android build.gradle file where the flutter_secure_storage library cannot be found. Attempts to import the secure_storage library from the local Flutter SDK using the flutter build aar command were unsuccessful due to the inability to locate the separate libraries.
As a workaround, tiki-sdk-android was reset to version 1.0.0, which allowed it to find all necessary dependencies. The build.gradle file from tiki-sdk-android 1.0.0 was then copied, and the dependencies required for the new features in Android were added.
Upgrading to tiki-sdk-flutter version 1.1.3 resolved the issue with all dependencies being found. However, upgrading to version 2.0.2 resulted in all dependencies except for flutter_secure_storage being found. Further upgrading to version 2.1.2 resulted in neither flutter_secure_storage nor sqlite_libs being found, despite being present on the GitHub packages page.
Attempts to regenerate the libraries by re-running the action encountered a conflict as the libraries were already present. The issue was then reproduced using a local build. The version has been bumped to 2.1.3 and the correct libraries were generated.
Aftwerwards the github packages were cleaned up to keep just the necessary libraries.
The flutter_secure_storage dependency can't be resolved by Android, using either the GitHub package manager or the local dependency. The issue appeared after version 1.1.3, which was the latest working version. It is necessary to debug what changed after version 1.1.3 and fix the creation of the AAR packages both locally and in GitHub packages.
Since this error happens both in the Github package and in local dependency, we need to first fix the local resolution to debug the GitHub package after.
Steps to reproduce:
Add Flutter Secure Storage as a grade dependency in the module
build.gradle
Possible solution:
<?xml version="1.0" encoding="UTF-8"?>
2023-04-03T10:20:32.821-0300 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Resolve com.it_nomads.fluttersecurestorage.flutter_secure_storage_debug:1.0:' started 2023-04-03T10:20:32.827-0300 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Completing Build operation 'Resolve com.it_nomads.fluttersecurestorage.flutter_secure_storage_debug:1.0:' 2023-04-03T10:20:32.827-0300 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Resolve com.it_nomads.fluttersecurestorage.flutter_secure_storage_debug:1.0:' completed 2023-04-03T10:20:32.821-0300 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainComponentMetaDataResolver] Attempting to resolve component for com.it_nomads.fluttersecurestorage.flutter_secure_storage_debug:1.0: using repositories [TIKI SDK Flutter local, GoogleApis, Google, MavenRepo] 2023-04-03T10:20:32.821-0300 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] No meta-data file or artifact found for module 'com.it_nomads.fluttersecurestorage.flutter_secure_storage_debug:1.0:' in repository 'TIKI SDK Flutter local'. 2023-04-03T10:20:32.822-0300 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.modulecache.PersistentModuleMetadataCache] Recording absence of module descriptor in cache: com.it_nomads.fluttersecurestorage.flutter_secure_storage_debug:1.0: [changing = false] 2023-04-03T10:20:32.823-0300 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository] Cached meta-data for missing module is expired: will perform fresh resolve of 'com.it_nomads.fluttersecurestorage.flutter_secure_storage_debug:1.0:' in 'GoogleApis' 2023-04-03T10:20:32.823-0300 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] No meta-data file or artifact found for module 'com.it_nomads.fluttersecurestorage.flutter_secure_storage_debug:1.0:' in repository 'GoogleApis'. 2023-04-03T10:20:32.825-0300 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.modulecache.PersistentModuleMetadataCache] Recording absence of module descriptor in cache: com.it_nomads.fluttersecurestorage.flutter_secure_storage_debug:1.0: [changing = false] 2023-04-03T10:20:32.825-0300 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository] Cached meta-data for missing module is expired: will perform fresh resolve of 'com.it_nomads.fluttersecurestorage.flutter_secure_storage_debug:1.0:' in 'Google' 2023-04-03T10:20:32.825-0300 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] No meta-data file or artifact found for module 'com.it_nomads.fluttersecurestorage.flutter_secure_storage_debug:1.0:' in repository 'Google'. 2023-04-03T10:20:32.825-0300 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.modulecache.PersistentModuleMetadataCache] Recording absence of module descriptor in cache: com.it_nomads.fluttersecurestorage.flutter_secure_storage_debug:1.0: [changing = false] 2023-04-03T10:20:32.826-0300 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository] Cached meta-data for missing module is expired: will perform fresh resolve of 'com.it_nomads.fluttersecurestorage.flutter_secure_storage_debug:1.0:' in 'MavenRepo' 2023-04-03T10:20:32.826-0300 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] No meta-data file or artifact found for module 'com.it_nomads.fluttersecurestorage.flutter_secure_storage_debug:1.0:' in repository 'MavenRepo'. 2023-04-03T10:20:32.827-0300 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.modulecache.PersistentModuleMetadataCache] Recording absence of module descriptor in cache: com.it_nomads.fluttersecurestorage.flutter_secure_storage_debug:1.0: [changing = false] 2023-04-03T10:20:33.913-0300 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 2023-04-03T10:20:33.913-0300 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception. 2023-04-03T10:20:33.913-0300 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 2023-04-03T10:20:33.913-0300 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] What went wrong: 2023-04-03T10:20:33.913-0300 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] A problem occurred configuring project ':app'. 2023-04-03T10:20:33.913-0300 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not resolve all dependencies for configuration ':app:debugEmbed'. 2023-04-03T10:20:33.913-0300 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not find com.it_nomads.fluttersecurestorage.flutter_secure_storage_debug:1.0:. 2023-04-03T10:20:33.913-0300 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Required by: 2023-04-03T10:20:33.913-0300 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] project :app 2023-04-03T10:20:33.913-0300 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 2023-04-03T10:20:33.913-0300 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Try: 2023-04-03T10:20:33.913-0300 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Run with --stacktrace option to get the stack trace. 2023-04-03T10:20:33.913-0300 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Run with --scan to get full insights. 2023-04-03T10:20:33.913-0300 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 2023-04-03T10:20:33.913-0300 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org 2023-04-03T10:20:33.913-0300 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] 2023-04-03T10:20:33.914-0300 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 46s