BoardiesITSolutions / Android-MySQL-Connector

Native MySQL Connector for Android
MIT License
51 stars 15 forks source link

Gradle sync error #8

Closed Asuki closed 5 years ago

Asuki commented 5 years ago

Hi!

I tried to add a dependencie and I got the next error: ERROR: Could not find method implementation() for arguments [com.github.BoardiesITSolutions:Android-MySQL-Connector:0.26] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

Could you help me? Thank you, Seng

boardy commented 5 years ago

Hi Seng,

It sounds like you are using an older version of the gradle build system. I'd recommend upgrading if possible as it has many improvements especially in terms of performance, but if this isn't possible, then if you change implementation to be compile it should work OK.

Thanks

Chris

Asuki commented 5 years ago

Hi!

I think my gradle version is up to date: 4.10.1. I put the dependecie at first in project gradle. Now I put in the module:app gradle.

I get the next error in module:appp gradle with compile

ERROR: Failed to resolve: com.github.BoardiesITSolutions:Android-MySQL-Connector:0.26 Show in Project Structure dialog Affected Modules: app

WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html Affected Modules: app

And I get this error in module:app gradle with implementation

ERROR: Failed to resolve: com.github.BoardiesITSolutions:Android-MySQL-Connector:0.26 Show in Project Structure dialog Affected Modules: app

I get this error after "Invalidate and resolve"

boardy commented 5 years ago

Hi,

If you are using Gradle 4. then you should be able to implementation instead of compile.

You shouldn't need to modify the project gradle, only the apps mobule gradle file.

Have you added the following:

repositories { maven { url 'https://jitpack.io' } }

Thanks

Chris

Asuki commented 5 years ago

Have you added the following:

repositories { maven { url 'https://jitpack.io' } }

I added it to buildscript instead of allprojects.

Thank you :)

boardy commented 5 years ago

No problem Glad you got it sorted :)