Android side of a Flutter project showing error`Unresolved reference: android` on new Flutter projectIs there a way to run Python on Android?How to save an Android Activity state using save instance state?Close/hide the Android Soft KeyboardWhy is the Android emulator so slow? How can we speed up the Android emulator?'Must Override a Superclass Method' Errors after importing a project into Eclipse“Debug certificate expired” error in Eclipse Android pluginsIs there a unique Android device ID?Download a file with Android, and showing the progress in a ProgressDialogWhat is 'Context' on Android?Proper use cases for Android UserManager.isUserAGoat()?

Some Prime Peerage

How does a simple logistic regression model achieve a 92% classification accuracy on MNIST?

What are uses of the byte after BRK instruction on 6502?

Speedometer as a symbol into awesomebox

Is the Dodge action perceptible to other characters?

How do EVA suits manage water excretion?

What makes a smart phone "kosher"?

Permutations in Disguise

Why are some files not movable on Windows 10?

simjacker: which SIMs are vulnerable?

Should I leave the first authorship of our paper to the student who did the project whereas I solved it?

Is there any way to land a rover on the Moon without using any thrusters?

Is a suit against a University Dorm for changing policies on a whim likely to succeed (USA)?

How would you control supersoldiers in a late iron-age society?

Is "you will become a subject matter expert" code for "you'll be working on your own 100% of the time"?

Which is the current decimal separator?

How do certain apps show new notifications when internet access is restricted to them?

I was promised a work PC but still awaiting approval 3 months later so using my own laptop - Is it fair to ask employer for laptop insurance?

Does a succubus' charm end when it dies?

How do I create indestructible terrain?

Real mode flat model

Would it be unbalanced to increase Wild Shape uses based on level?

Ambiguity in notation resolved by +

Interaction between Teferi Time Raveler and Enduring Ideal



Android side of a Flutter project showing error


`Unresolved reference: android` on new Flutter projectIs there a way to run Python on Android?How to save an Android Activity state using save instance state?Close/hide the Android Soft KeyboardWhy is the Android emulator so slow? How can we speed up the Android emulator?'Must Override a Superclass Method' Errors after importing a project into Eclipse“Debug certificate expired” error in Eclipse Android pluginsIs there a unique Android device ID?Download a file with Android, and showing the progress in a ProgressDialogWhat is 'Context' on Android?Proper use cases for Android UserManager.isUserAGoat()?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I have a Flutter project where, all of a sudden, without me doing anything special as far as I can remember..the Android side has started to show an error, and I am totally lost, I have no idea at all of what is wrong or why that happened.



That is what I see when I open the android folder, the MainActivity on the flutter project on android studio:



enter image description here



I have tried calling flutter clean, restart/invalidate cache, gradle clean...and so far nothing works.



The weird thing is that the project actually runs in the emulator without any problem. And also, if I open the Android part independently on Android Studio i don't see any error.



Anyone had that before?



Android Studio version 3.3.1



Solutions of this answer do not work.



** ----- NOTE ----- **



The problem here can be (not sure at all maybe someone else can help here) that I am using a flutter package called ImagePicker, which after some code investigation, it turns out that it is using some AndrodX imports....and...as far as I am aware of...Flutter is not yet compatible with AndroidX.



But i need someone else to confirm that in order to post a solution.










share|improve this question


























  • Did you try to run the application, Sometimes AS shows falsy errors!

    – Omar HossamEldin
    Mar 28 at 9:12











  • @OmarHossamEldin what do you mean?, of course I ran it many times in emulator and it runs ok, it is mentioned in the question.

    – codeKiller
    Mar 28 at 9:14











  • then this just a bug in AS, Sometimes can be solved by clean project, or invalidate cache

    – Omar HossamEldin
    Mar 28 at 9:53

















0















I have a Flutter project where, all of a sudden, without me doing anything special as far as I can remember..the Android side has started to show an error, and I am totally lost, I have no idea at all of what is wrong or why that happened.



That is what I see when I open the android folder, the MainActivity on the flutter project on android studio:



enter image description here



I have tried calling flutter clean, restart/invalidate cache, gradle clean...and so far nothing works.



The weird thing is that the project actually runs in the emulator without any problem. And also, if I open the Android part independently on Android Studio i don't see any error.



Anyone had that before?



Android Studio version 3.3.1



Solutions of this answer do not work.



** ----- NOTE ----- **



The problem here can be (not sure at all maybe someone else can help here) that I am using a flutter package called ImagePicker, which after some code investigation, it turns out that it is using some AndrodX imports....and...as far as I am aware of...Flutter is not yet compatible with AndroidX.



But i need someone else to confirm that in order to post a solution.










share|improve this question


























  • Did you try to run the application, Sometimes AS shows falsy errors!

    – Omar HossamEldin
    Mar 28 at 9:12











  • @OmarHossamEldin what do you mean?, of course I ran it many times in emulator and it runs ok, it is mentioned in the question.

    – codeKiller
    Mar 28 at 9:14











  • then this just a bug in AS, Sometimes can be solved by clean project, or invalidate cache

    – Omar HossamEldin
    Mar 28 at 9:53













0












0








0








I have a Flutter project where, all of a sudden, without me doing anything special as far as I can remember..the Android side has started to show an error, and I am totally lost, I have no idea at all of what is wrong or why that happened.



That is what I see when I open the android folder, the MainActivity on the flutter project on android studio:



enter image description here



I have tried calling flutter clean, restart/invalidate cache, gradle clean...and so far nothing works.



The weird thing is that the project actually runs in the emulator without any problem. And also, if I open the Android part independently on Android Studio i don't see any error.



Anyone had that before?



Android Studio version 3.3.1



Solutions of this answer do not work.



** ----- NOTE ----- **



The problem here can be (not sure at all maybe someone else can help here) that I am using a flutter package called ImagePicker, which after some code investigation, it turns out that it is using some AndrodX imports....and...as far as I am aware of...Flutter is not yet compatible with AndroidX.



But i need someone else to confirm that in order to post a solution.










share|improve this question
















I have a Flutter project where, all of a sudden, without me doing anything special as far as I can remember..the Android side has started to show an error, and I am totally lost, I have no idea at all of what is wrong or why that happened.



That is what I see when I open the android folder, the MainActivity on the flutter project on android studio:



enter image description here



I have tried calling flutter clean, restart/invalidate cache, gradle clean...and so far nothing works.



The weird thing is that the project actually runs in the emulator without any problem. And also, if I open the Android part independently on Android Studio i don't see any error.



Anyone had that before?



Android Studio version 3.3.1



Solutions of this answer do not work.



** ----- NOTE ----- **



The problem here can be (not sure at all maybe someone else can help here) that I am using a flutter package called ImagePicker, which after some code investigation, it turns out that it is using some AndrodX imports....and...as far as I am aware of...Flutter is not yet compatible with AndroidX.



But i need someone else to confirm that in order to post a solution.







android flutter






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 10:55









Boken

1,5801 gold badge12 silver badges19 bronze badges




1,5801 gold badge12 silver badges19 bronze badges










asked Mar 28 at 7:27









codeKillercodeKiller

1,4153 gold badges25 silver badges59 bronze badges




1,4153 gold badges25 silver badges59 bronze badges















  • Did you try to run the application, Sometimes AS shows falsy errors!

    – Omar HossamEldin
    Mar 28 at 9:12











  • @OmarHossamEldin what do you mean?, of course I ran it many times in emulator and it runs ok, it is mentioned in the question.

    – codeKiller
    Mar 28 at 9:14











  • then this just a bug in AS, Sometimes can be solved by clean project, or invalidate cache

    – Omar HossamEldin
    Mar 28 at 9:53

















  • Did you try to run the application, Sometimes AS shows falsy errors!

    – Omar HossamEldin
    Mar 28 at 9:12











  • @OmarHossamEldin what do you mean?, of course I ran it many times in emulator and it runs ok, it is mentioned in the question.

    – codeKiller
    Mar 28 at 9:14











  • then this just a bug in AS, Sometimes can be solved by clean project, or invalidate cache

    – Omar HossamEldin
    Mar 28 at 9:53
















Did you try to run the application, Sometimes AS shows falsy errors!

– Omar HossamEldin
Mar 28 at 9:12





Did you try to run the application, Sometimes AS shows falsy errors!

– Omar HossamEldin
Mar 28 at 9:12













@OmarHossamEldin what do you mean?, of course I ran it many times in emulator and it runs ok, it is mentioned in the question.

– codeKiller
Mar 28 at 9:14





@OmarHossamEldin what do you mean?, of course I ran it many times in emulator and it runs ok, it is mentioned in the question.

– codeKiller
Mar 28 at 9:14













then this just a bug in AS, Sometimes can be solved by clean project, or invalidate cache

– Omar HossamEldin
Mar 28 at 9:53





then this just a bug in AS, Sometimes can be solved by clean project, or invalidate cache

– Omar HossamEldin
Mar 28 at 9:53












2 Answers
2






active

oldest

votes


















1
















This error is not really an error. This happens because android studio is set to read and edit dart not java. In order to edit the android side of a flutter project, you need to click on the android folder -> go to the flutter option -> click 'open in Android Studio'.



This will then allow you to edit the android side of your project.






share|improve this answer

























  • hi, thanks, please see my question when i mention: And also, if I open the Android part independently on Android Studio i don't see any error....I am trying to get rid of the "error red mark" on the whole flutter project

    – codeKiller
    Mar 28 at 8:31











  • The red error mark, would not reflect an error on the respective Android or iOS sides. This means there is an error somewhere else.

    – DevTard
    Mar 28 at 12:53


















0
















Set Configure to the Android project SDK of flutter application



Step by Step



  1. Click on File -> Project settings then select appropriate API level as per your project will solve your issue

enter image description here






share|improve this answer



























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );














    draft saved

    draft discarded
















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55392191%2fandroid-side-of-a-flutter-project-showing-error%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1
















    This error is not really an error. This happens because android studio is set to read and edit dart not java. In order to edit the android side of a flutter project, you need to click on the android folder -> go to the flutter option -> click 'open in Android Studio'.



    This will then allow you to edit the android side of your project.






    share|improve this answer

























    • hi, thanks, please see my question when i mention: And also, if I open the Android part independently on Android Studio i don't see any error....I am trying to get rid of the "error red mark" on the whole flutter project

      – codeKiller
      Mar 28 at 8:31











    • The red error mark, would not reflect an error on the respective Android or iOS sides. This means there is an error somewhere else.

      – DevTard
      Mar 28 at 12:53















    1
















    This error is not really an error. This happens because android studio is set to read and edit dart not java. In order to edit the android side of a flutter project, you need to click on the android folder -> go to the flutter option -> click 'open in Android Studio'.



    This will then allow you to edit the android side of your project.






    share|improve this answer

























    • hi, thanks, please see my question when i mention: And also, if I open the Android part independently on Android Studio i don't see any error....I am trying to get rid of the "error red mark" on the whole flutter project

      – codeKiller
      Mar 28 at 8:31











    • The red error mark, would not reflect an error on the respective Android or iOS sides. This means there is an error somewhere else.

      – DevTard
      Mar 28 at 12:53













    1














    1










    1









    This error is not really an error. This happens because android studio is set to read and edit dart not java. In order to edit the android side of a flutter project, you need to click on the android folder -> go to the flutter option -> click 'open in Android Studio'.



    This will then allow you to edit the android side of your project.






    share|improve this answer













    This error is not really an error. This happens because android studio is set to read and edit dart not java. In order to edit the android side of a flutter project, you need to click on the android folder -> go to the flutter option -> click 'open in Android Studio'.



    This will then allow you to edit the android side of your project.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Mar 28 at 8:27









    DevTardDevTard

    2401 silver badge9 bronze badges




    2401 silver badge9 bronze badges















    • hi, thanks, please see my question when i mention: And also, if I open the Android part independently on Android Studio i don't see any error....I am trying to get rid of the "error red mark" on the whole flutter project

      – codeKiller
      Mar 28 at 8:31











    • The red error mark, would not reflect an error on the respective Android or iOS sides. This means there is an error somewhere else.

      – DevTard
      Mar 28 at 12:53

















    • hi, thanks, please see my question when i mention: And also, if I open the Android part independently on Android Studio i don't see any error....I am trying to get rid of the "error red mark" on the whole flutter project

      – codeKiller
      Mar 28 at 8:31











    • The red error mark, would not reflect an error on the respective Android or iOS sides. This means there is an error somewhere else.

      – DevTard
      Mar 28 at 12:53
















    hi, thanks, please see my question when i mention: And also, if I open the Android part independently on Android Studio i don't see any error....I am trying to get rid of the "error red mark" on the whole flutter project

    – codeKiller
    Mar 28 at 8:31





    hi, thanks, please see my question when i mention: And also, if I open the Android part independently on Android Studio i don't see any error....I am trying to get rid of the "error red mark" on the whole flutter project

    – codeKiller
    Mar 28 at 8:31













    The red error mark, would not reflect an error on the respective Android or iOS sides. This means there is an error somewhere else.

    – DevTard
    Mar 28 at 12:53





    The red error mark, would not reflect an error on the respective Android or iOS sides. This means there is an error somewhere else.

    – DevTard
    Mar 28 at 12:53













    0
















    Set Configure to the Android project SDK of flutter application



    Step by Step



    1. Click on File -> Project settings then select appropriate API level as per your project will solve your issue

    enter image description here






    share|improve this answer





























      0
















      Set Configure to the Android project SDK of flutter application



      Step by Step



      1. Click on File -> Project settings then select appropriate API level as per your project will solve your issue

      enter image description here






      share|improve this answer



























        0














        0










        0









        Set Configure to the Android project SDK of flutter application



        Step by Step



        1. Click on File -> Project settings then select appropriate API level as per your project will solve your issue

        enter image description here






        share|improve this answer













        Set Configure to the Android project SDK of flutter application



        Step by Step



        1. Click on File -> Project settings then select appropriate API level as per your project will solve your issue

        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 2 at 10:05









        AtulAtul

        2613 silver badges5 bronze badges




        2613 silver badges5 bronze badges































            draft saved

            draft discarded















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55392191%2fandroid-side-of-a-flutter-project-showing-error%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

            155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해