Flutter SDK and Android Version

2,632 views
Skip to first unread message

Davy Mitchell

unread,
Oct 11, 2015, 12:15:04 PM10/11/15
to Flutter Dev
Hi All,

I am working through the getting started page:
http://flutter.io/getting-started/

The error I am hitting is:
ERROR: Version "21" of the Android SDK is too old. Need Lollipop (22) or later.

I was a little confused as I have only SDK 22 installed on my development system. Is this message referring to the device OS rather than the SDK?
The page states Lollipop but it appears 5.1 is the real minimum unless I have misunderstood the above :-)

Thanks,
Davy

Adam Barth

unread,
Oct 11, 2015, 12:23:24 PM10/11/15
to Davy Mitchell, Flutter Dev
It looks like the tool uses the following command to determine the version number:

adb shell getprop ro.build.version.sdk

What does that command return in your setup?

That command appears to be reading the SDK version from your device rather than from your local machine.  I believe that's because we use the "adb reverse" command, which requires a binary on the device to work properly.  Does the "adb reverse" command work in your setup?

We're working on removing the dependency on "adb reverse", which will let us run the Flutter dev environment on older Android versions.  The steps involved are (1) finish the transition from our Python-based dev tools to our Dart-based dev tools and (2) switch from using a local web server on the host (which is what requires "adb reverse") to pushing FLX packages to the device.  We already use FLX packages in production and on iOS, so that change should follow quickly upon switch our dev tools from Python to Dart.

Adam


--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To post to this group, send email to flutt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/525720ef-4856-4626-ace5-5333dc68458f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Davy Mitchell

unread,
Oct 11, 2015, 3:11:51 PM10/11/15
to Flutter Dev
Thanks for the super quick reply Adam. :)


On Sunday, 11 October 2015 17:23:24 UTC+1, Adam Barth wrote:
It looks like the tool uses the following command to determine the version number:
adb shell getprop ro.build.version.sdk
What does that command return in your setup?
 
daftspaniel@gozd:~/flutter$ adb shell getprop ro.build.version.sdk
21
 
That command appears to be reading the SDK version from your device rather than from your local machine.  I believe that's because we use the "adb reverse" command, which requires a binary on the device to work properly.  Does the "adb reverse" command work in your setup?

daftspaniel@gozd:~/flutter$ adb reverse tcp:8080 tcp:8080
daftspaniel@gozd:~/flutter$ adb reverse --list
error: protocol fault (couldn't read status length): Success

I am not sure if that is success or not :-)
 
We're working on removing the dependency on "adb reverse", which will let us run the Flutter dev environment on older Android versions.  The steps involved are (1) finish the transition from our Python-based dev tools to our Dart-based dev tools and (2) switch from using a local web server on the host (which is what requires "adb reverse") to pushing FLX packages to the device.  We already use FLX packages in production and on iOS, so that change should follow quickly upon switch our dev tools from Python to Dart.

Interesting - supporting older Androids would be great.

Thanks,
Davy

Adam Barth

unread,
Oct 16, 2015, 3:08:16 AM10/16/15
to Davy Mitchell, Flutter Dev
To give you an update, the Dart-based tooling is now working.  We still have the Python-based tooling around, but I should be able to make progress on removing the "adb reverse" dependency in parallel with removing the Python-based tooling.

Adam

robert.nr1

unread,
Oct 29, 2015, 6:12:27 PM10/29/15
to Flutter Dev
Hi Adam,

I tried to get Flutter running tonight but got stuck at this issue as well, I have Android 5.0 and get this output from the commands:

robert@DV2:~/Workspace/flutter/my_app$ flutter start --checked 
Version "21" of the Android SDK is too old. Please install Lollipop (version 22) or later.
Unable to run application - no connected devices.
robert@DV2:~/Workspace/flutter/my_app$ adb shell getprop ro.build.version.sdk
21
robert@DV2:~/Workspace/flutter/my_app$ adb reverse tcp:8080 tcp:8080
robert@DV2:~/Workspace/flutter/my_app$ adb reverse --list
error: protocol fault (couldn't read status length): Success

I guess it's best to wait until those new Dart based tools are available, is there a github issue or such that one could track to see when this is completed?

Regards, Robert

seb mitchell

unread,
Oct 30, 2015, 6:13:49 AM10/30/15
to Flutter Dev
Looks like 5.0 is API Level: 21 and you need 5.1, 
"API Level: 22, Android 5.1 (LOLLIPOP_MR1) is an update to the Lollipop release."
https://developer.android.com/about/versions/android-5.1.html

I have it working with https://atom.io/packages/dartlang 
with my 2012 nexus 7, android version is 5.1.1

robert.nr1

unread,
Oct 30, 2015, 9:58:05 AM10/30/15
to Flutter Dev
Okay, yes I have to wait until either Flutter supports older versions or I get an update to my phone.

Was there not some way to run an app locally on a PC (Linux) without a phone? I think I have read about somewhere in the past but can't figure out how to do it, it's that possible?

Regards, Robert

Adam Barth

unread,
Oct 30, 2015, 11:13:43 AM10/30/15
to robert.nr1, Flutter Dev
On Fri, Oct 30, 2015 at 6:58 AM robert.nr1 <rober...@gmail.com> wrote:
Okay, yes I have to wait until either Flutter supports older versions or I get an update to my phone.

We have all the pieces in place to make this work with a Linux host.  We're still working making it work from a Mac host.

Was there not some way to run an app locally on a PC (Linux) without a phone? I think I have read about somewhere in the past but can't figure out how to do it, it's that possible?

It's possible but not recommended.  For example, on Linux we haven't wired up any graphics.

Adam

 
--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To post to this group, send email to flutt...@googlegroups.com.

Robert

unread,
Oct 30, 2015, 11:17:37 AM10/30/15
to Flutter Dev
Hi Adam, thanks for the reply.

I see, I'll just wait for a little while and get back to testing soon when the missing pieces are in place.

Regards, Robert
Reply all
Reply to author
Forward
0 new messages