Chyba: nelze přeložit Název Balíčku v Flutter

0

Otázka

Snažil jsem se běží flutter build apk --split-per-abi.

Mám spustit flutter pub get a to běžel bez chyby, jen některé závislosti varování. Když se snažím vytvořit soubor apk mám tuto chybu v mém terminálu protokoly.

Error: Couldn't resolve the package 'fuodz' in 'package:fuodz/services/auth.service.dart'.
Error: Couldn't resolve the package 'fuodz' in 'package:fuodz/services/cart.service.dart'.
Error: Couldn't resolve the package 'fuodz' in 'package:fuodz/services/general_app.service.dart'.
Error: Couldn't resolve the package 'fuodz' in 'package:fuodz/services/local_storage.service.dart'.
Error: Couldn't resolve the package 'fuodz' in 'package:fuodz/services/firebase.service.dart'.
Error: Couldn't resolve the package 'fuodz' in 'package:fuodz/services/notification.service.dart'.
lib/main.dart:6:8: Error: Not found: 'package:fuodz/my_app.dart'
import 'package:fuodz/my_app.dart';
       ^
lib/main.dart:7:8: Error: Not found: 'package:fuodz/services/auth.service.dart'
import 'package:fuodz/services/auth.service.dart';
       ^
lib/main.dart:8:8: Error: Not found: 'package:fuodz/services/cart.service.dart'
import 'package:fuodz/services/cart.service.dart';
       ^
lib/main.dart:9:8: Error: Not found: 'package:fuodz/services/general_app.service.dart'
import 'package:fuodz/services/general_app.service.dart';
       ^
lib/main.dart:10:8: Error: Not found: 'package:fuodz/services/local_storage.service.dart'
import 'package:fuodz/services/local_storage.service.dart';
       ^
lib/main.dart:11:8: Error: Not found: 'package:fuodz/services/firebase.service.dart'
import 'package:fuodz/services/firebase.service.dart';
       ^
lib/main.dart:12:8: Error: Not found: 'package:fuodz/services/notification.service.dart'
import 'package:fuodz/services/notification.service.dart';
       ^
lib/main.dart:29:9: Error: Getter not found: 'LocalStorageService'.
  await LocalStorageService.getPrefs();
        ^^^^^^^^^^^^^^^^^^^
lib/main.dart:30:9: Error: Getter not found: 'CartServices'.
  await CartServices.getCartItems();
        ^^^^^^^^^^^^
lib/main.dart:33:9: Error: Getter not found: 'NotificationService'.
  await NotificationService.clearIrrelevantNotificationChannels();
        ^^^^^^^^^^^^^^^^^^^
lib/main.dart:34:9: Error: Getter not found: 'NotificationService'.
  await NotificationService.initializeAwesomeNotification();
        ^^^^^^^^^^^^^^^^^^^
lib/main.dart:35:9: Error: Getter not found: 'NotificationService'.
  await NotificationService.listenToActions();
        ^^^^^^^^^^^^^^^^^^^
lib/main.dart:36:9: Error: Method not found: 'FirebaseService'.
  await FirebaseService().setUpFirebaseMessaging();
        ^^^^^^^^^^^^^^^
lib/main.dart:37:41: Error: Getter not found: 'GeneralAppService'.
  FirebaseMessaging.onBackgroundMessage(GeneralAppService.onBackgroundMessageHandler);
                                        ^^^^^^^^^^^^^^^^^
lib/main.dart:44:29: Error: Getter not found: 'AuthServices'.
      initialLocale: Locale(AuthServices.getLocale()),
                            ^^^^^^^^^^^^
lib/main.dart:45:14: Error: Method not found: 'MyApp'.
      child: MyApp(),
             ^^^^^
Unhandled exception:
FileSystemException(uri=org-dartlang-untranslatable-uri:package%3Afuodz%2Fmy_app.dart; message=Stand
ardFileSystem only supports file:* and data:* URIs)
#0      StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:36:7)
#1      asFileUri (package:vm/kernel_front_end.dart:599:37)
#2      writeDepfile (package:vm/kernel_front_end.dart:738:21)
<asynchronous suspension>
#3      FrontendCompiler.compile (package:fr
ontend_server/f
rontend_server.dart:562:9)
<asynchronous suspension>
#4      starter (package:flutter_frontend_server/server.dart:180:12)
<asynchronous suspension>
#5      main (file:///C:/b/s/w/ir/cache/builder/src/flutter/flutter_frontend_server/bin/starter.dart:13:24)
<asynchronous suspen
sion>



FAILURE: Build failed with an exception.

* Where:
Script 'C:\Users\treasure\Desktop\flutter_windows_2.2.2-stable\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1035

* What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
> Process 'command 'C:\Users\treasure\Desktop\flutter_windows_2.2.2-stable\flutter\bin\flutter.bat'' finished with non-zero exit value 1

* 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

BUILD FAILED in 1m 0s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done                      62.0s
Gradle task assembleRelease failed with exit code 1

Tento projekt je v současné době v C:// adresář, a já nevím, jestli je to může být jeden z důvodů, proč je to na mě chyby.

Prosím, jak mám jít o této chybě a co nechápu správně?. Díky

android dart flutter gradle
2021-11-22 21:14:13
2

Nejlepší odpověď

1

Pokud fuodz je vaše jméno projektu není závislost, pak budete muset změnit svůj název balíčku ke fuodz.

Jdi do svého pubspec.yaml pak změnit name souladu s něčím, jako je tento:

pubspec.yaml:

name: fuodz
description: My Project # Your project description
2021-11-22 21:46:24
0

Opravil jsem tento problém tím, že Odstraní Složky projektu z C://, jak to vyžaduje určité oprávnění. Přestěhovala jsem se na plochu a fungovalo to dobře...

2021-11-23 13:44:01

Vaše odpověď by mohla být zlepšena s další podpůrné informace. Prosím, upravit, přidat další podrobnosti, jako jsou citace nebo dokumentace, tak, že ostatní mohou potvrdit, že vaše odpověď je správná. Můžete si najít více informací o tom, jak psát dobré odpovědi v centru nápovědy.
Community

V jiných jazycích

Tato stránka je v jiných jazycích

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................