0

I'm trying to run my flutter application that used to run perfectly but it suddenly showed "unable to locate asset entry" for a font error,

screenshot of the error

and I've checked the indentations in the pubspec.yaml and they were correct, but I noticed the pubspec.lock file has been modified I don't know if that's relevant to the error I couldn't figure out where the problem is screenshot of .yaml screenshot of pubspec.lock

Filwah Ah
  • 13
  • 3
  • Welcome! Can you please provide a [mre]? See [ask] for further guidance. Can you please [read about why text is better than images of text](//meta.stackoverflow.com/a/285557/11107541) and then [edit] to convert your images of text into actual text? See [/editing-help#code](/editing-help#code) for how to format code blocks. – starball Jan 09 '23 at 23:24
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jan 10 '23 at 07:53

1 Answers1

1

I think it's a small issue as you forgot to add fonts in the path you typed so you need to have it like that:

assets/fonts/Tajawal/Tajawal-ExtraBold.ttf

if it is not the case please provide the structure of your assets folder.

  • i fixed it and this appeared: The plugin cloud_firestore requires a higher Android SDK version. Fix this issue by adding the following to the file \android\app\build.gradle: android {defaultConfig { minSdkVersion 19} } – Filwah Ah Jan 09 '23 at 22:48
  • it's another issue, my friend. To solve it you need to go to \android\app\build.gradle file and find using your editor the minSdkVersion and change it to what the error suggested By the way, I think that most packages now require minSdkVersion to be at least 21 – Abdelrahman Bonna Jan 09 '23 at 23:32
  • i did and then it raised another error, What went wrong: Execution failed for task ':app:mergeExtDexDebug'. A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingWorkAction App requires Multidex support – Filwah Ah Jan 10 '23 at 07:04
  • add multiDexEnabled true to your app/build.gradle you could find a solution here https://stackoverflow.com/questions/49886597/multidex-issue-with-flutter – Abdelrahman Bonna Apr 08 '23 at 22:50