weixin_38295174 2018-10-15 14:11 采纳率: 0%
浏览 791
已采纳

Android 开发使用下拉刷新框架(github上的项目),一直闪退

本人刚开始学习Android的导入外部项目,想导入一个下拉刷新的框架项目QSRefreshLayout,按照说明配置好了导入,运行后也没什么报错,但就是一直闪退(我还试着导入过其他下拉刷新的框架都会闪退,很奇怪),之前包过一个错ResultReceiver重复,我删过一些重复的包(都是用双shift找到并且删除的),不知道对这个有没有影响,希望大佬们能指导一下,万分感谢,下面是一些环境的信息,最近项目用的急,希望大家能说的清楚一些,再次感谢!!!

使用的是API 23的华为机器
project的gradle:


buildscript {

    repositories {
        google()
        jcenter()
        maven {
            url "https://jitpack.io"
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.0-beta04'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven {
            url "https://jitpack.io"
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}


项目的gradle:

 apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.zhang.hp.ui_test5_swipedown"
        minSdkVersion 23
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.0.0-alpha1'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.0-alpha3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha3'
    implementation 'com.github.tohodog:QSRefreshLayout:1.1.1'
}

在xml布局文件里加入了最基本的布局:

<org.song.refreshlayout.QSRefreshLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/qs"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">


</org.song.refreshlayout.QSRefreshLayout>

其他代码部分都没有(只是新建了一个项目测试一下)

  • 写回答

3条回答 默认 最新

  • 野生杂学家阿博 2018-10-16 14:51
    关注
    1.你清除重复的jar不一定成功,建议点击Android Studio->Build->Clean Project 清除缓存;
    2.崩溃一定是有原因的,你看一下Android Studio 的Logcat打印的崩溃原因。
    3.建议更换刷新框架,大部分App使用的原生的刷新框架或者github上面的智能刷新框架。
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘