gaucidaniel / native-audio

MIT License
16 stars 7 forks source link

Android dependency 'androidx.core:core' has different version for the compile (1.0.0)... #18

Closed Sun3 closed 4 years ago

Sun3 commented 4 years ago

Steps to recreate the error using Flutter 1.9.1+hotfix.6 • channel stable.

  1. Create a New Flutter project
  2. Add the native_audio: ^0.0.13 to the yaml file
  3. Run Project and you receive the error

Error:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Android dependency 'androidx.core:core' has different version for the compile (1.0.0) and runtime (1.1.0) classpath. You should manually set the same version via DependencyResolution

Some instructions on the main page need to be added to handle this.

YaarPatandarAA commented 4 years ago

Oh yeah. The library require the project to be android X. I made updates to the read me and made a pull request for it awhile ago.

gaucidaniel commented 4 years ago

Went ahead and merged all the missing pull requests, including the updated Readme. Apologies that it took me a while to do so however I've been busy with some other projects.

Sun3 commented 4 years ago

We still have issues with the Gradle version version from the library and a new Flutter project.

Steps to recreate the error using Flutter 1.9.1+hotfix.6 • channel stable.

  1. Create a New Flutter project and select AndroidX checkbox with include support for Kotlin and Swift.
  2. Add the native_audio: ^0.0.14 to the yaml file
  3. Follow all of the Getting Started Guide for library.
  4. Open the New Application Android Project and you receive the Gradle version errors
    Minimum supported Gradle version is 5.4.1. Current version is 4.10.2. Please fix the project's 

From what I can tell we need additional steps or explanations on what the library Gradle version is and what the Flutter Android Project Gradle version should be.

I have followed the above steps multiple times with the same result. I have manually changed the Gradle version to match the library version but when the Flutter project runs it does not compile and shows the following error.

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
Finished with error: Gradle task assembleDebug failed with exit code 1

Thank you and did you want me to create a new ticket or leave it here?

YaarPatandarAA commented 4 years ago

I do remember having to update my gradle version for my app to include this library. Didn't really think much of it at the time that it might be required for this library.

I know I have not updated the gradle for the project and I still get warnings from Android Studio to update gradle whenever I open the code for this project.

@Sun3 try to see if you can keep the project at whatever level it is and try to update your App to Android X and update all gradle. I use Android Studio and it helps me automatically update anything that needs to be updated.

Sun3 commented 4 years ago

@YaarPatandarAA @gaucidaniel The App is created with AndroidX from the start by choosing the AndroidX checkbox. But when I upgrade the Gradle then the app will not compile. Something is off...

Sun3 commented 4 years ago

Update: @gaucidaniel @YaarPatandarAA So far all of the different combination of trying to upgrade the Gradle fails.

If you guys follow the same steps I outlined do you also get the same errors and are you able to get the correct version of the Gradle upgraded?

At this point I can only download this library source code and compile with the example, but not create a new project and adding the library.

I was really hoping to use this library. Any thoughts?