使用bottomnavigationbar时巨多的坑
来源:互联网 发布:上网过滤软件 编辑:程序博客网 时间:2024/05/05 08:59
报错1:
Error:org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
注意这里的Android plugin version一定要是自己的版本,还有gradle version。当然也可以gradle配置文件里配置,当然可能没有可视化配置靠谱:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.example.wangchang.testbottomnavigationbar"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Error:org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
注意这里的Android plugin version一定要是自己的版本,还有gradle version。当然也可以gradle配置文件里配置,当然可能没有可视化配置靠谱:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
报错2:找不到资源V24 字符串varlue资源(对于在values-v24这类针对不同android target加载的values下找不到资源的问题,原因:找不到这个target下的资源。)
调整以下关键版本:
android {
compileSdkVersion 24buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.example.wangchang.testbottomnavigationbar"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir:'libs')
testCompile 'junit:junit:4.12'
compile'com.ashokvarma.android:bottom-navigation-bar:1.4.1'
compile'com.android.support:appcompat-v7:24.0.3'
compile'com.android.support:support-v4:24.0.3'
}
0 0
- 使用bottomnavigationbar时巨多的坑
- Android BottomNavigationBar的使用
- BottomNavigationBar的使用
- BottomNavigationBar的使用
- BottomNavigationBar的使用
- BottomNavigationBar的坑
- 底部菜单 BottomNavigationBar 的使用
- 底部导航BottomNavigationBar的使用
- 使用BottomNavigationBar遇到的问题
- BottomNavigationBar使用
- Android BottomNavigationBar底部导航控制器的使用
- Android BottomNavigationBar底部导航控制器的使用
- Android BottomNavigationBar底部导航控制器的使用
- 底部导航栏 BottomNavigationBar的使用
- Android之底部菜单 BottomNavigationBar的使用
- 底部导航栏:BottomNavigationBar的使用
- Android底部导航BottomNavigationBar的使用
- Android底部导航之-BottomNavigationBar的使用
- 4. Spring Boot入门
- 什么是Dao层?
- instancetype和id区别
- 计算机专外Week3_Exercises
- VB.NET中制作COM_DLL在VBA、VB中调用
- 使用bottomnavigationbar时巨多的坑
- iOS中图片自适应拉伸
- ubuntu下修改环境变量以及添加PYTHONPATH方法
- 【SSH网上商城项目实战26】完成订单支付后的短信发送功能
- radial-gradient
- C++头文件
- scrapy1.3.2文件结构
- Ceilometr: 2 、Cnocchi技术介绍
- KVC