Error Android embedding v1
Error Android embedding v1
En el caso de recibir el aviso:
Warning
Your Flutter application is created using an older version of the Android embedding. It is being deprecated in favor of Android embedding v2. Follow the steps at
https://flutter.dev/go/android-project-migration
to migrate your project. You may also pass the --ignore-deprecation flag to ignore this check and continue with the deprecated v1 embedding. However, the v1 Android embedding will be removed in future versions of Flutter.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The detected reason was:
..\android\app\src\main\AndroidManifest.xml uses `android:name="io.flutter.app.FlutterApplication"`
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Build failed due to use of deprecated Android v1 embedding.
android:name="${applicationName}"
El enlace de los pasos no funcionaba ultimamente. En su lugar se puede revisar
https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects
Este error se produce también en dependencias y no quiere decir que la dependencia está mal o poco actualizada.
-
Hay que modificar android/app/src/main/AndroidManifest.xml cambiando
android:name . Debe quedar:
android:name="${applicationName}"
- Añadir etiqueta antes de <application>
- Además es muy posible que haya errores con plugins no actualizados. Se actualizan con el comando
flutter pub upgrade --major-versions
Comentarios
Publicar un comentario