Android Extra has a function QtAndroid::androidSdkVersion() can get API Level, which introduced in Qt 5.3.
if (QtAndroid::androidSdkVersion() >= 23)
Recently I found there is another way in QOperatingSystemVersion introduced in Qt 5.9
if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::AndroidMarshmallow)
Which way is more recommended?
Related
Encountering below issue with Azure FunctionsV2 with .net core
"Detected package version outside of dependency constraint: Microsoft.NET.Sdk.Functions 1.0.29 requires Newtonsoft.Json (= 11.0.2) but version Newtonsoft.Json 12.0.3 was resolved"
Tried out below but no luck:
BindingRedirects not working with .net core
Upgrading Microsoft.NET.Sdk.Functions 1.0.29 to 1.0.30 leads to broken build in CI pipeline.
Why this hard dependency between Newtonsoft.Json & Azure FunctionsV2? Any workaround?
Nobody knows and Microsoft isn't saying: https://github.com/Azure/azure-functions-host/issues/4049
The solution is to update to the latest version of the v2 Microsoft.NET.Sdk.Functions SDK package which is 1.0.31 at the time of this writing. I don't know why you didn't just do this as part of troubleshooting.
Alternatively you can update to .NET Core 3 and Azure functions v3, i.e. any of the 3.x versions of Microsoft.NET.Sdk.Functions.
newtonsoft json version is = not >=. This problem has been around for a long time, MS tracking this work here: https://github.com/Azure/azure-functions-vs-build-sdk/issues/304
Create function v3 to avoid this error.
I'm trying to upgrade a Symfony instance from 2.8 to 3.0, and, while I was checking the deprecations in profiler, I found:
The Twig\Template class implements Twig_TemplateInterface that is deprecated since 1.12 (to be removed in 3.0) (2 times)
The Twig\Lexer class implements Twig_LexerInterface that is deprecated since 1.12 (to be removed in 3.0)
The Twig\Compiler class implements Twig_CompilerInterface that is deprecated since 1.12 (to be removed in 3.0)
The Twig\Node\Node class implements Twig_NodeInterface that is deprecated since 1.12 (to be removed in 3.0)
The Twig\Parser class implements Twig_ParserInterface that is deprecated since 1.12 (to be removed in 3.0)
My Twig version is 1.42.4
Just to confirm: we agree this is deprecation messages from twig itself, telling it will remove those functions in its own 3.0 version ? I mean: it's not Symfony telling it will not support this anymore in its 3.0.0 ?
I also suppose upgrading Twig will not help on this. It is the the responsible for those calls I guess ;)
After confirming the above basics, how can I locate the bundle which uses those deprecated functions, because I suppose THIS is the package I need to upgrade first (I'm pretty sure the problem is not in my own code...) ?
The message does not give so many details, and... the stack is just unclear to me...
DebugClassLoader::loadClass()
spl_autoload_call()
class_exists() (called from Template.php at line 5)
require() (called from DebugClassLoader.php at line 169)
DebugClassLoader::loadClass()
spl_autoload_call()
ReflectionClass::__construct() (called from ClassCollectionLoader.php at line 307)
ClassCollectionLoader::getOrderedClasses() (called from ClassCollectionLoader.php at line 120)
ClassCollectionLoader::load() (called from Kernel.php at line 405)
Kernel::doLoadClassCache() (called from Kernel.php at line 124)
Kernel::boot() (called from Kernel.php at line 180)
Kernel::handle() (called from app_dev.php at line 28)
Maybe that can help to answer: I noticed the deprecation warnings appear ONLY when I load a page for the first time, or when I just deleted the cache... So, it's something generating the Symfony cache, which is calling deprecated features...
At last, but not least, I tried to upgrade Twig from 1.x to 2.x, knowing Symfony composer tells "twig/twig": "^1.0||^2.0". I first though it would go to 2.x, but it just upgraded it to the lmatest 1.x (1.42.4), my current version... Composer message was not clear about what was reponsible of the fact it did not go higher...
IF I understood well, those deprecation warnings are not about Symfony upgrade itself, so I 'could eventually go for it. I have something in my instance, that uses old Twig functions, so I would like to get rid of it...
BONUS question: sometimes, I wonder... it's so complicated to fight with all those version constraints... Wouldn't it be more simple just to use generic composer.json, provided with the symfony version we are trying to reach, instead of editing the one we get for years, in our old version ? At least, I guess all libraries would be updated at versions tested by developpers ?
Thanks for helping, and happy new year ;)
In short, sometimes deprecations are reported for vendor code that you can't really change. This is the case. It's useless for you.
It will go away eventually, once you upgrade to higher Symfony/Twig.
I was using FirebaseDynamicLinks in my Xamarin forms project (everything works fine) and I decided to update my nuget packages.. but after I update Xamarin.Firebase.DynamicLinks (and all dependencies) I got null after calling FirebaseDynamicLinks.Instance.
There was some major changes? Do I need to modify my code somehow after this update? Thanks for any help!
I found this in logs, so my google-services.json should be right, right?
FirebaseInitProvider: FirebaseApp initialization successful
Xamarin.Android SDK Version: 9.3.0.23
Operating System & Version: Win 10, 1803
So if not necessary now, suggest downgrading to previous version of Xamarin.Firebase.DynamicLinks. Maybe there are something not incompatible or new methods not be used correctly.
Using the cosmos db sdk in a 1.0 function. UpsertDocumentAsync throws error "PartitionKey extracted from document doesn't match the one specified in the header". In my REST Api using the same cosmos db sdk v2.1.3 everything works fine. Only difference in packages is Newtonsoft.Json is version 10.0.2 in function and version 11.0.2 in REST Api. I'm wondering if it has something to do with Netwonsoft and the sdk usage of it may differ between versions. Anyone else having this issue that can shed some light?
It was indeed Json.net. I was upgrading to Azure Function 2.0 and it uses 11.0.2 version. So upgrading my other components to the newest version fixed the issue. Thank you for your quick reply.
In aspnet 5 I created a project which came with dotnet5.4 and net451. Since it's a class library I assume it does not need the runtime so uses net451 instead of dnx451 (my wild guess). But what about dotnet5.4 what exactly is that for ?
UPDATE: With this announcement, the monikers will probably change again. This answer is only scoped to the release of RC1. Any release further than RC2 won't apply here.
Basically, dnxcore50 became dotnet5.4 and dnx451 became net451.
Those were temporary to begin with and were bound to change prior to the final release.
Most of this information can be found here:
https://github.com/aspnet/Announcements/issues/98
But what about dotnet5.4 what exactly is that for ?
From Announcing ASP.NET 5 Release Candidate 1:
With this version of ASP.NET 5 templates, the “Class Library (package)” project template will target “dotnet5.4” which has binary compatibility with .NET 4.6, .NET Core 5, and Mono.