Every Developer have encountered this kind of errors, and especially with this specific file core-1.1.0.jar.
The problem is that google for some reason removed the file from it's servers I guess, because the whole error is saying that it didn't find the file anywhere online.
There are a lot of solutions online that unfortunately won't work, these solutions include:
And so on..., you get the idea.
Below I will share my experience of how I fixed this error.
you have to understand that the problem is not with your code or project, the problem is simply in a plugin your project is using, this is exactly why when I tried migrating my project to AndroidX I got a message that says:
No AndroidX usages found.
Now Below are the steps to solve this error.
First: you need to add this code to your app's
gradle.build file, it is found in this path
def core_version = "1.3.2"
// Java language implementation
// To use RoleManagerCompat
// To use the Animator APIs
// To test the Animator APIs
The code above is simply changing the core.jar version your going to use.
Second: You need to go to the plugin folder that is causing this error to you, you can easily know which plugin is causing the error by just reading the error, and here's an example:
Execution failed for task ':image_picker:compileDebugJavaWithJavac'. > Could not resolve all files for configuration ':file_picker:debugCompileClasspath'. > Could not find core-1.1.0.jar (androidx.core:core:1.1.0).
Now as you can see, the
image_picker plugin is causing the error. So we need to go to this plugin's folder.
All the plugins' folders can be found in this path:
%FLUTTER_SDK_PATH% with your flutter SDK actual path.
Now in this folder we find the
Third: After going to the plugin's folder, you need to change the version of the core.jar file this plugin is using, and this is how:
You navigate to the android folder inside the plugin's folder and open the
gradle.build file, in my case this is the path:
Now scroll al the way down, and you'll find this code:
implementation 'androidx.core:core:1.1.0' into
And you are done.
Please note that:
I first tried all the solutions mentioned above, and my last try was to edit the plugin's files.
The edits I made didn't affect the plugin in any way.
The core.jar file version that I used in the last step must be equal to the core.jar version specified in the first step.
Thanks, and I hope you all errorless coding.