fix(android): move MainActivity to the package the manifest looks for
The app crashed on launch with ClassNotFoundException for
es.freetimelab.farolero.game.MainActivity: 374c6ae added the .game suffix to
namespace and applicationId but left the Kotlin source in
es.freetimelab.farolero, so the manifest asked for a class that was never
compiled under that name. Every release built since then died on startup,
including the one already published to internal testing.
Also requests edge-to-edge explicitly now that the app targets 35, rather
than relying on the Flutter default.
Verified on a physical device running Android 16: installs, launches and
stays alive with no crash, and the bottom action buttons sit clear of the
navigation bar.
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
package es.freetimelab.farolero
|
||||
package es.freetimelab.farolero.game
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
@@ -15,6 +15,12 @@ import 'pantallas/pantalla_principal.dart';
|
||||
void main() {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
// Desde targetSdk 35 el dibujado de borde a borde es obligatorio. Se pide
|
||||
// explícitamente en vez de confiar en el valor por defecto de Flutter; son
|
||||
// las pantallas, vía SafeArea, las que apartan su contenido de las barras.
|
||||
// Con navegación de 3 botones el sistema pinta igualmente un velo tras ellos
|
||||
// y eso no lo controla la app.
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
|
||||
SystemChrome.setSystemUIOverlayStyle(
|
||||
const SystemUiOverlayStyle(
|
||||
statusBarColor: Colors.transparent,
|
||||
|
||||
Reference in New Issue
Block a user