milosmns / actual-number-picker

Android: A horizontal number picker
GNU General Public License v3.0
222 stars 36 forks source link

Can't compile #13

Closed AerWyn81 closed 6 years ago

AerWyn81 commented 7 years ago

Hi,

When I tried to sync compile 'me.angrybyte.picker:picker:1.3.1' on my project, I got these errors :

screenshot 11-02-2017 13-57-41

Linked here : screenshot 11-02-2017 14-04-20

This is my configuration : screenshot 11-02-2017 13-58-40

If you need further information, please ask me, Sorry for my broken english,

AerWyn81.

milosmns commented 7 years ago

Can you check the demo project and compare? I don't think your error is related to the picker code. Here is the demo project: https://github.com/milosmns/actual-number-picker/tree/master/demo Demo compiles for me without any issues.

AerWyn81 commented 7 years ago

Thank you for your quick reply :)

I tried to change this thing I saw different: minSdkVersion 22 by minSdkVersion 11 but I still have the same problem. Or the compileSdkVersion 25 and targetSdkVersion 25 required API 25 to work? I'm on 23 here.

My code without compile 'me.angrybyte.picker:picker:1.3.1', works. Any other idea ? I agree, I'm not an expert in android development, so.. that's maybe my fault, but I don't see where I did a mistake. I assume the problem is maybe in the build.gradle ? But where..

milosmns commented 7 years ago

Wait, how come you don't have the 'dependencies' block in your app gradle file?

AerWyn81 commented 7 years ago

Yes I have ! I have take only a part of my build.gradle before, sorry!

screenshot 11-02-2017 15-27-42

milosmns commented 7 years ago

Ah. Ok can you try to change the appcompat version to compile 'com.android.support:appcompat-v7:25.1.0'? Maybe that's the issue. I don't think we actually use anything from appcompat, not sure why I imported that in the first place. But lets try that first - change the appcompat version and let me know how it goes.

You might be forced to change your build tools version to the same number (25), Studio will notify you if that is needed.

AerWyn81 commented 7 years ago

Ah !!! That was the problem !! This now compiles and displays the number picker well. Thank you very much and sorry for the stupid mistake !

milosmns commented 7 years ago

Not your mistake :) I probably don't need that dependency anyway. Glad this helped.