EricBatlle / UnityAndroidSpeechRecognizer

🗣️ Speech recognition on Unity and Android without the annoying google popup!
MIT License
60 stars 12 forks source link

Could not resolve all files for configuration unity #8

Closed WinnerSlahen closed 3 years ago

WinnerSlahen commented 3 years ago

Hi bro. I hope you can help me. I am using your oldest speech recognizer. And so far it was working. But today I imported Facebook and GameAnalytics SDK and unity start to give me "Could not resolve all files for configuration unity" while build the game. When I removed your plugins, The error disappear. So, What can I do to overcome this problem ?

EricBatlle commented 3 years ago

Hi @WinnerSlahen , and thanks for using my plugin.

Could you provide the full error message? Also, which version of the plugin are you using and why are you using an old plugin version?

WinnerSlahen commented 3 years ago

Becuase of Minimum API level , I use your oldest (v1.0) plugin. Here is the pdf of error

Error.pdf

EricBatlle commented 3 years ago

Which is your minimum API level?

WinnerSlahen commented 3 years ago

API Level 24

EricBatlle commented 3 years ago

Thanks for the info @WinnerSlahen.

I'll give it a look when I have time and let you know if I find a solution.

Anyway as a "temporary solution", if your API requeriment can be 28 or higher, the problem should be gone.

WinnerSlahen commented 3 years ago

Okay. I am going to try it. And let you know. Thanks for the help. Also, roughly, when would you find the exact solution and let me know?

WinnerSlahen commented 3 years ago

For your information, it still doesn't work with API 28.

EricBatlle commented 3 years ago

For your information, it still doesn't work with API 28.

But did you update the plugin to newer version? Which one?

WinnerSlahen commented 3 years ago

Oh. No I just upgraded the API level of project to 28. I am going to try it too.

EricBatlle commented 3 years ago

Oh. No I just upgraded the API level of project to 28. I am going to try it too.

Has it solved your problem?

EricBatlle commented 3 years ago

@WinnerSlahen I've been digging the whole day and achieve to reproduce the same error, and the conclusions are:

  1. GameAnalytics do not provoque any error
  2. Facebook SDK is the problematic one

The problem with FB SDK is that is using AndroidX libraries dependencies (which requires API 28, like this plugin newer version). But the current plugin version you're trying to use is v1.0 with API 24. Due to that, the plugin is using instead of AndroidX dependencies, Support-v4 ones. When Forcing the Resolve on the Play Services Resolver it does not solve the problem, that is a known bug which should be solved with this: https://github.com/googlesamples/unity-jar-resolver/issues/241#issuecomment-514534629

Let me know if you figure it out something else!

WinnerSlahen commented 3 years ago

As I understand it, just because of Facebook SDK the old dependencies can't be resolved. So, do I have to upgrade the plugin or is there a solution to resolve both new and old dependencies ? You sent a link but honestly, I don't understand what to do.

EricBatlle commented 3 years ago

The easy-choice is to upgrade the plugin, if your project-requeriments can afford the new API level.

The link technically provides the only approach that I've found in internet but it doesn't really work, so for the moment I suggest you to update plugin version.

If Unity solves the Play Resolver errors I'll come back again to this ^^

EricBatlle commented 3 years ago

Oh. No I just upgraded the API level of project to 28. I am going to try it too.

Well @WinnerSlahen I've tried myself, it's possible to use my plugin version 1.3 with FB SDK without problems. Only needs to remove the core-1.3.1.aar library inside UnitySpeechRecognizer/Assets/Plugins/SpeechRecognizer/Android/libs/ to avoid duplicate class error message.

I've also checked FaceBook SDK and if you use some SDK below 7.3 I'm pretty sure it will work, other way they use AndroidX, so it is only compatible with API 28+, the same as this 1.3 plugin version.

Hope all of this research helps you and don't forget to star the repo and consider to donate if the plugin have been useful for you!

I'll leave the issue open for a few days in case do you find something else, if there is no response then I'll close it.

WinnerSlahen commented 3 years ago

Thanks bro. It solved my problem.