Code Monkey home page Code Monkey logo

Comments (4)

sebastianhaberey avatar sebastianhaberey commented on June 19, 2024

Hi @repentsinner,

are you attempting to compile the plugin / example with an Android SDK below 32?

If that's the case, just update your SDK to 32 and you should be fine. It is strongly recommended that you always compile with the latest SDK - see this Article by Ian Lake (Google).

P.S.: that reminds me, I should add the minimum requirements for the plugin to the README.

from nsd.

repentsinner avatar repentsinner commented on June 19, 2024

Thanks for the quick reply @sebastianhaberey. I'm using boilerplate build.gradle which pulls compileSdkVersion from flutter:

android {
  compileSdkVersion flutter.compileSdkVersion
  ...
}

Over in the flutter source for stable (as of today, 2.10.5), flutter.compileSdkVersion is (still) defined as 31:

https://github.com/flutter/flutter/blob/5464c5bac742001448fe4fc0597be939379f88ea/packages/flutter_tools/gradle/flutter.gradle#L32-L33

I had a quick look through flutter's issues and other tags/branches and I don't see much discussion/attempt to move it to 32 (even in the newly released flutter 3.0.0) which to your point and Google best practices does seem odd.

If nsd requires a feature of 32 and the main flutter distribution is still using 31, it might be worth making a note in the docs that this should be overridden (but you updated to note that it only requires min 21). If not, does it make sense to just track flutter.compileSdkVersion in nsd's build.gradle so that it'll work with whatever's current, and puts the onus on flutter to correctly manage SdkVersions?

from nsd.

sebastianhaberey avatar sebastianhaberey commented on June 19, 2024

First off, you're right - I didn't consider that a freshly generated app would have a compileSdkVersion assigned by Flutter, and that most users would just have that version pulled automatically.

Also, I agree that it would be nice to have something like flutter.compileSdkVersion in the plugin to avoid having to update the Gradle configuration manually once Flutter changes their version. Unfortunately, that property doesn't seem to be available for plugins - the Gradle configuration for plugins is different from the one generated for applications.

It seems that the Flutter team is maintaining the compileSdkVersion of their plugin favorites manually to match the Flutter version. So until I learn of a better way, I guess I'll be doing the same.

Please give the new version (1.5.3) a try and see if it works for you!

from nsd.

repentsinner avatar repentsinner commented on June 19, 2024

Looks good to me, thanks!

FWIW I opened an issue on the main flutter project to ask why they're still using SDK 31, curious what they say about that.

flutter/flutter#103713

from nsd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.