本人刚开始学习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>
其他代码部分都没有(只是新建了一个项目测试一下)