使用SmartTabSmartTabLayout

    • 在昨天的一篇文章中,我翻译了一篇material和Tabs联合使用的教程
    • 今天准备使用TabLayout来创建项目
    • 在Github上找到一个开源的封装好的SmartTabLayout:SmartTabLayout
    • 按照教程添加依赖:我将如下代码复制进build.gradle文件:
      dependencies {
      compile 'com.ogaclejapan.smarttablayout:library:1.6.0@aar'

      //Optional: see how to use the utility.
      compile 'com.ogaclejapan.smarttablayout:utils-v4:1.6.0@aar'

      //Optional: see how to use the utility.
      compile 'com.ogaclejapan.smarttablayout:utils-v13:1.6.0@aar'
      }
      然后编译报错。

    • 解决办法,将utils-v4:1.6.0@aar'和utils-v13:1.6.0@aar'注释掉,分析原因可能是因为这里使用了某个库,而我缺乏相应的配置。将其注释掉后,在main.xml使用smartTabLayout可以正确使用。
posted @ 2017-04-26 11:28  天涯海角路  阅读(1134)  评论(0)    收藏  举报