SildingMenu在androidstudio上面的安装

来源:互联网 发布:杭州连邦软件 编辑:程序博客网 时间:2024/06/05 07:00
G:\开源包 & 源码包\SlidingMenu-master
下载的 SlidingMenu 开源框架包解压缩之后的到的文件夹
复制library文件夹
直接粘贴到项目中 和APP文件夹平级

然后选择settings.gradle中添加如下

include ':app', ':library'

然后在APP 的bulid.gradle中添加依赖如下
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.2.1'
    compile project(':library')
}

选择sync now 同步之后出现很多问题 
然后根据APP bulid.gradle 修改library中的build.gradle如下

dependencies {
    compile 'com.android.support:support-v4:13.0.0'
}

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        minSdkVersion 20
        targetSdkVersion 23
    }


修改后try again 然后会提示一个错误改成Math就可以了

修改完成之后 build project 就可以正常使用了
0 0
原创粉丝点击