How can I write an access control list statement to satisfy a condition like this? [duplicate] - networking

This question already has answers here:
Gradle project sync failed after Electric Eel | 2022.1.1 update
(5 answers)
Closed 24 days ago.
This post was edited and submitted for review 2 days ago and failed to reopen the post:
Original close reason(s) were not resolved
I am receiving the following error when trying to sync gradle files in Android Studio:
A problem occurred configuring root project 'Test'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:7.4.0.
Required by:
project : > com.android.application:com.android.application.gradle.plugin:7.4.0
project : > com.android.library:com.android.library.gradle.plugin:7.4.0
> No matching variant of com.android.tools.build:gradle:7.4.0 was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.6' but:
- Variant 'apiElements' capability com.android.tools.build:gradle:7.4.0 declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares an API of a component compatible with Java 11 and the consumer needed a runtime of a component compatible with Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.6')
- Variant 'javadocElements' capability com.android.tools.build:gradle:7.4.0 declares a runtime of a component, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 8)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.gradle.plugin.api-version (required '7.6')
- Variant 'runtimeElements' capability com.android.tools.build:gradle:7.4.0 declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.6')
- Variant 'sourcesElements' capability com.android.tools.build:gradle:7.4.0 declares a runtime of a component, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 8)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.gradle.plugin.api-version (required '7.6')
Which seems to point out that I am using a Java runtime of version 8, and require it to be set to version 11.
How do I stop this error and change my Java runtime version?
Is version 11 also an outdated version of Java runtime?
What are the downfalls of using an outdated version?

You must change Gradle JDK version to 11.

Related

Why does a force downgrade causes an assembly load exception in .Net Core?

I have a sample solution with a console and library project. Both reference the same nuget but a different version. The console project also has a reference to the library project. So the structure is like this:
- Solution
- ConsoleApp
- Project Reference: Library
- Nuget: NServiceBus.RabbitMQ (5.2.0)
- Library
- Nuget: NServiceBus.RabbitMQ (6.0.0)
You can find the solution here.
Since Nuget uses the nearest wins rule, the nuget package that gets resolved is version 5.2.0. This is what I want, so far so good. But when I run the application and run a method of the Library I get the following exception:
Could not load file or assembly 'NServiceBus.Transport.RabbitMQ, Version=6.0.0.0, Culture=neutral, PublicKeyToken=9fc386479f8a226c'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)
In .NET Framework I would solve this with an assembly redirect. But that isn't available in .Net Core. I always thought that .Net Core solves this automatically by using the deps.json file. There I see the following statement:
"Library/1.0.0": {
"dependencies": {
"NServiceBus.RabbitMQ": "5.2.0"
},
"runtime": {
"Library.dll": {}
}
}
But still at runtime he tries to resolve the 6.0.0 version. I'm using the latest .Dot Net 3.1.X SDK.
I'm I doing something wrong or does this seem like a bug?
For the record, this is a simple sample project. The actual situation where I need this is much more complex. I also do understand that doing this can cause runtime exceptions while running the application.
It appears to be by design.
A little bit of searching, I found this: https://github.com/dotnet/fsharp/issues/3408#issuecomment-319466999
The coreclr will load an assembly of the version or higher than the reference. If the assembly discovered is lower than the reference then it fails.
Also this: https://github.com/dotnet/sdk/issues/384#issuecomment-260457776
downgrading the assembly version isn't supported on .NET Core
So, to confirm, I spent much more time than I intended looking/searching through https://github.com/dotnet/runtime. Eventually I found the assembly version compatibility method: https://github.com/dotnet/runtime/blob/172059af6623d04fa0468ec286ab2c240409abe3/src/coreclr/binder/assemblybindercommon.cpp#L49-L53
It checks all the components of the version separately, but if we look at just one, we can see what it's doing:
if (!pFoundVersion->HasMajor() || pRequestedVersion->GetMajor() > pFoundVersion->GetMajor())
{
// - A specific requested version component does not match an unspecified value for the same component in
// the found version, regardless of lesser-order version components
// - Or, the requested version is greater than the found version
return false;
}
As the comment says, the loader will reject the assembly if the assembly's version is lower than the requested version. In your case, assuming that the assembly version matches the package version (which it doesn't have to), your library is requesting version 6.0.0, but the assembly loader/binder, found version 5.2.0 on disk, which is lower. Hence, it rejects that dll, keeps looking, but then can't find a suitable version of the assembly on the probing path and eventually throws the FileLoadException.
What's not clear to me is if this assembly compatibility is checked only on the default assembly loader, or even if you add your own event handler to AssemblyLoadContext.Default.Resolving. You could try adding your own handler and when it requests the assembly of the higher version, you return the lower version assembly anyway. It might be a way to work around the issue.

All gms/firebase libraries must use the exact same version specification (mixing versions can lead to runtime crashes)

I have upgraded gms:play-services-analytics from 11.0.4 to 16.0.4
and firebase-messaging from 11.0.4 to 17.1.0 but lint is giving this error
All gms/firebase libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 17.1.0, 16.2.0, 16.0.4, 16.0.3, 16.0.1, 16.0.0. Examples include `com.google.firebase:firebase-messaging:17.1.0` and `com.google.firebase:firebase-iid:16.2.0`
I gave a look into the External libraries i can see different versions of gms is being used here.
com.google.android.gms:play-services-ads-identifier-16.0.0
com.google.android.gms:play-services-analytics-16.0.4
com.google.android.gms:play-services-analytics-impl-16.0.4
com.google.android.gms:play-services-base-16.0.1
com.google.android.gms:play-services-basement-16.0.1
com.google.android.gms:play-services-measurement-base-16.0.3
Similary
com.google.firebase:firebase-common-16.0.0
com.google.firebase:firebase-iid-16.2.0
com.google.firebase:firebase-iid-interop-16.0.0
com.google.firebase:firebase-messaging-17.1.0
i have only added the following two dependencies
implementation 'com.google.android.gms:play-services-analytics:16.0.4'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
root level build.gradle contains
classpath 'com.google.gms:google-services:4.0.1'
As mentioned in the blog
https://android-developers.googleblog.com/2018/05/announcing-new-sdk-versioning.html
All firebase/gms libraries can now have a different versioning and the libraries mentioned above are imported by android itself.
Why i am getting this error ?
For me, it was using a rather old build tools version. Updating to build tools 28.0.3 fixed the problem.

Namespace 3.6 in the application descriptor file should be equal or higher than the minimum version 13.0 required by the Flex SDK

I am new to Flash Builder and setup the 4.7 environment according to these instructions: http://www.adobe.com/devnet/air/articles/ane-android-devices.html
The end of the tutorial involves "Export Release Build" of ANESampleTest (a Flex project) and I am getting this error:
"Namespace 3.6 in the application descriptor file should be equal or higher than the minimum version 13.0 required by the Flex SDK"
I do not have a good understanding of Flash/Flex/Air/etc, but following the tutorial to the letter to install Flash Builder, updating the SDK to 3.6, and the partial 'overlay' steps. How do I resolve this error message?
The fix: Change the namespace on the second line of /src/ANESampleTest-app.xml
FROM: <application xmlns="http://ns.adobe.com/air/application/3.6">
TO: <application xmlns="http://ns.adobe.com/air/application/13.0">
A brief and incomplete background:
The file /src/ANESampleTest-app.xml is the ‘application descriptor file’. When using the project files downloaded with the tutorial (that contained the 3.6 reference), the builder did not find this compatible with the configuration on my computer (a trial version I installed today - 5/3/2014 - and patched according to the tutorial). I never did figure out how to lookup valid namespaces and am still confused about how all the sdk’s relate to each other. I stumbled upon this solution by creating a fresh new project and found that the namespace specified by the new project wizard was “13.0” on this line of this file.

Flex4.6 : works in debug but not in Release build

My flex4.6 works normally in debug.
But when I create a release version, I got:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.adobe.serializers.utility::TypeUtility$/getArrayType()
at com.adobe.serializers.json::JSONDecoder/parseObject()
at com.adobe.serializers.json::JSONDecoder/parseValue()
at com.adobe.serializers.json::JSONDecoder/decode()
at com.bravolucy.football.utilities::Utilities$/getAsObj()
looks like:
http://forums.adobe.com/message/4250338
Original project was done in flex4.0 and it uses some swc libraries.
The answer of your question is in your question itself
"Original project was done in flex4.0 and it uses some swc libraries"
before this para it was said
flex4.6 works normally in debug
It should be working fine with 4.6 because with this version playerglobal.version 11.1 being used normally which has JSON lib included with it but prior version to playerglobal - 11 you need to include "as3corelib.swc" in your project libs.
More details you can find at - http://blog.infrared5.com/2011/07/working-with-native-json-in-flash-player-11/
Thanks,
Varun
You need to add and tick as3corelib.swc in project properties.
But even better would be to switch to native JSON.parse

Gradlefx compilation fails with dependency as3commons-logging

I created a gradle build file for a Flex swc project, which compiles successfully in intellij IDEA.
My project contains dependency
internal group: 'org.as3commons', name: 'as3commons-logging', version: '2.7', ext: 'swc'
Compilation fails, with errors like
....\lib\as3commons-logging-2.7.swc(org.as3commons.logging.integration:SLF4ASIntegration)
Error: Type was not found or was not a compile-time constant: [com.furusystems.logging.slf4as.bindings]::ILogBinding.
I see that logging library indeed contains references to interfaces from other libraries, but in the IDE somehow it passes compilation and even works.
Which gradlefx option should I set?
Solved!I changed dependency configuration from 'internal' to "merged"!
cool :)
Also, we have a support forum for GradleFx which you can find here: http://support.gradlefx.org/home

Resources