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;
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:

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.
add a comment
|
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:

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.
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
add a comment
|
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:

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.
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:

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.
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
add a comment
|
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
add a comment
|
2 Answers
2
active
oldest
votes
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.
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
add a comment
|
Set Configure to the Android project SDK of flutter application
Step by Step
- Click on File -> Project settings then select appropriate API level as per your project will solve your issue

add a comment
|
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
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
add a comment
|
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.
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
add a comment
|
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.
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.
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
add a comment
|
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
add a comment
|
Set Configure to the Android project SDK of flutter application
Step by Step
- Click on File -> Project settings then select appropriate API level as per your project will solve your issue

add a comment
|
Set Configure to the Android project SDK of flutter application
Step by Step
- Click on File -> Project settings then select appropriate API level as per your project will solve your issue

add a comment
|
Set Configure to the Android project SDK of flutter application
Step by Step
- Click on File -> Project settings then select appropriate API level as per your project will solve your issue

Set Configure to the Android project SDK of flutter application
Step by Step
- Click on File -> Project settings then select appropriate API level as per your project will solve your issue

answered Aug 2 at 10:05
AtulAtul
2613 silver badges5 bronze badges
2613 silver badges5 bronze badges
add a comment
|
add a comment
|
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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