1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] package contacts_service problem when I run the program with this package? sorry I...

Discussão em 'Mobile' iniciado por Stack, Outubro 7, 2024 às 09:12.

  1. Stack

    Stack Membro Participativo

    hello I hope you will be able to help me I am trying to use the contacts_service package: ^0.6.3 I just put this in the pubspec.yaml I did a pub get so far everything is going well but when I compile I get this error every time could you help me I am a beginner in flutter thank you very much for your help

    FAILURE: Build failed with an exception.

    • What went wrong: A problem occurred configuring project ':contacts_service'.

    Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl. Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

    If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.


    the source

    import 'package:flutter/material.dart';
    import 'package:contacts_service/contacts_service.dart';
    import 'package:permission_handler/permission_handler.dart';

    void main() => runApp(MyApp());

    class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
    return MaterialApp(
    home: ContactListPage(),
    );
    }
    }

    class ContactListPage extends StatefulWidget {
    @override
    _ContactListPageState createState() => _ContactListPageState();
    }

    class _ContactListPageState extends State<ContactListPage> {

    @override
    void initState() {
    super.initState();
    }

    @override
    Widget build(BuildContext context) {
    return Scaffold(
    appBar: AppBar(
    title: Text('Flutter Contact List'),
    ),

    );
    }
    }`

    Continue reading...

Compartilhe esta Página