i added external library "floatingactionbutton-master" downloaded https://github.com/makovkastar/floatingactionbutton when sync gradle error: enter image description here
(i don't have enough reputation poste image) tried many differents answers forum nothing helpful case. don't know problem.
settings.gradle:
include ':app' include ':librerias:floatingactionbutton-master'
app/build.gradle:
apply plugin: 'com.android.application' android { compilesdkversion 22 buildtoolsversion "24.0.1" defaultconfig { applicationid "com.example.ezequiel.memories" minsdkversion 22 targetsdkversion 22 versioncode 1 versionname "1.31.08" } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile filetree(include: ['*.jar'], dir: 'libs') compile project(':librerias:floatingactionbutton-master') }
to include library don't need clone/download repository nor add source manually, should add dependency follows:
dependencies { ... compile 'com.melnykov:floatingactionbutton:1.3.0' }
however, according library, should not use anymore because deprecated android supporting library comes fab (floatingactionbutton) button.
to use button supporting library, should instead add following:
dependencies { ... compile 'com.android.support:design:24.2.0' }
and use in layout:
<android.support.design.widget.floatingactionbutton android:layout_width="wrap_content" android:layout_height="wrap_content" ... />
you can see following code lab more details.
Comments
Post a Comment