请帮忙:导入
android.support.design.widget.TabLayout时出错
它说“无法解决符号’设计’
它说“无法解决符号’设计’
我的build.gradle:
compileSdkVersion 26 buildToolsVersion "26.0.0" dependencies { compile fileTree(dir: 'libs',include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',{ exclude group: 'com.android.support',module: 'support-annotations' }) compile 'com.android.support:appcompat-v7:26' compile 'com.android.support.constraint:constraint-layout:1.0.2' compile 'com.android.support:support-v4:26' testCompile 'junit:junit:4.12' }
解决方法
你忘了添加设计支持库.只需在gradle app文件中添加此依赖项:
implementation 'com.android.support:design:26.0.+'
The Design package provides APIs to support adding material design components and patterns to your apps.
The Design Support library adds support for various material design components and patterns for app developers to build upon,such as
navigation drawers
,floating action buttons (FAB)
,snackbars
,andTabLayout
.
或者AndroidX依赖:
implementation "com.google.android.material:material:1.0.0"
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。