Я попробовал использовать пакет flutter_tflite: ^1.0.1 для создания приложения для обнаружения объектов в реальном времени. Все работало нормально, когда я проверял это на эмуляторе. Однако когда я попытался встроить его в пакет APK и приложения, произошла следующая ошибка:
Execution failed for task ':flutter_tflite:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
> Android resource linking failed
ERROR: /Users/baka/Documents/Application/llenn/myappku/build/flutter_tflite/intermediates/merged_res/release/mergeReleaseResources/values/values.xml:194: AAPT: error: resource android:attr/lStar not found.
* 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.
Я попробовал использовать пакет flutter_tflite: ^1.0.1 для создания приложения для обнаружения объектов в реальном времени. Все работало нормально, когда я проверял это на эмуляторе. Однако когда я попытался встроить его в пакет APK и приложения, произошла следующая ошибка:
[code]Execution failed for task ':flutter_tflite:verifyReleaseResources'. > A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action > Android resource linking failed ERROR: /Users/baka/Documents/Application/llenn/myappku/build/flutter_tflite/intermediates/merged_res/release/mergeReleaseResources/values/values.xml:194: AAPT: error: resource android:attr/lStar not found.
* 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. [/code]
app/build.gradle
[code]plugins { id "com.android.application" id "kotlin-android" // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. id "dev.flutter.flutter-gradle-plugin" }
def keystoreProperties = new Properties() def keystorePropertiesFile = rootProject.file('key.properties') if (keystorePropertiesFile.exists()) { keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) }
defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId = "com.example.myappku" // You can update the following values to match your application needs. // For more information, see: https://flutter.dev/to/review-gradle-config. minSdk = flutter.minSdkVersion targetSdk = flutter.targetSdkVersion versionCode = flutter.versionCode versionName = flutter.versionName }
buildTypes { release { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile( 'proguard-android-optimize.txt'), 'proguard-rules.pro' // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. signingConfig = signingConfigs.release } } }
flutter { source = "../.." } [/code] Кто-нибудь, помогите мне! Крайний срок выполнения этого задания — следующая неделя 🥹