1
私はこのコードが私のプロジェクトで動作しないことがわかりました。私のアプリケーションのRecycleViewsはスクロールバーを持っていませんが、新しいプロジェクトで動作します
android:scrollbars="vertical"
が、私は新しいDEMOに設定した場合、それが動作します。 私はアプリケーションスタイルや何かについてはbuild.gradle
だと思いますが、私は多くの方法を試してみましたが、ちょうどうまくいきませんでした(私のプロジェクトから新しいプロジェクトにアプリケーションスタイルをコピーして適用する、それでも動作します)この問題?私は @androidそれを把握
android {
compileSdkVersion COMPILE_SDK_VERSION as int
buildToolsVersion BUILD_TOOLS_VERSION
defaultConfig {
applicationId "com.haixue.app.android.HaixueAcademy.h4"
minSdkVersion MIN_SDK_VERSION as int
targetSdkVersion TARGET_SDK_VERSION as int
versionCode
versionName "3.2.1beta"
multiDexEnabled true
resConfigs "zh"
resValue("string", "growingio_project_id", "8701f2e2e096a888")
resValue("string", "growingio_url_scheme", "growing.42190e827fb47099")
ndk {
abiFilters "armeabi", "armeabi-v7a"
}
useLibrary 'org.apache.http.legacy'
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/MANIFEST.MF'
exclude 'META-INF/maven/com.squareup.okio/okio/pom.properties'
exclude 'META-INF/maven/com.squareup.okio/okio/pom.xml'
}
lintOptions {
abortOnError false
xmlReport false
htmlReport true
htmlOutput file("$project.buildDir/reports/lint/lint-result.html")
xmlOutput file("$project.buildDir/reports/lint/lint-result.xml")
}
signingConfigs {
release {
storeFile file("../docs/haixue.keystore")
storePassword "123456"
keyAlias "highso"
keyPassword "123456"
}
debug {
storeFile file("../docs/haixue.keystore")
storePassword "123456"
keyAlias "highso"
keyPassword "123456"
}
}
walle {
apkOutputFolder = new File("${project.buildDir}/outputs/channels");
apkFileNameFormat = '${appName}-${channel}-${buildType}-v${versionName}.apk';
channelFile = new File("${project.getProjectDir()}/channel")
}
buildTypes {
debug {
debuggable true
minifyEnabled false
shrinkResources false
testCoverageEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled true
shrinkResources true
zipAlignEnabled true
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
applicationVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.apk')) {
def fileName = outputFile.name.replace(".apk", "-${defaultConfig.versionName}.apk")
output.outputFile = new File(outputFile.parent, fileName)
}
}
}
//JNI
sourceSets {
main {
jni.srcDirs = []
jniLibs.srcDir(['libs'])
}
}
dexOptions {
javaMaxHeapSize "4g"
}
repositories {
flatDir {
dirs 'libs'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':RtmpResourceLib')
compile project(':imagepicker')
compile project(':viewPagerlibrary')
compile project(':SlidingMenu')
compile project(':treeviewlist')
compile project(':NodeView')
compile files('libs/jcore-android-1.1.6.jar')
compile files('libs/jpush-android-3.0.8.jar')
compile files('libs/TalkFunSDK.jar')
compile files('libs/alipaySingle-20170510.jar')
compile(name: 'alicloud-android-feedback-3.1.1', ext: 'aar')
compile files('libs/alicloud-android-utils-1.0.3.jar')
compile files('libs/utdid4all-1.1.5.3_proguard.jar')
compile files('libs/alicloud-android-monitor-2.5.1.1_for_bc_proguard.jar')
//noinspection GradleCompatible
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.android.support:recyclerview-v7:26.0.2'
compile 'com.android.support:design:26.0.2'
compile 'com.android.support:support-annotations:26.0.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.code.gson:gson:2.8.1'
//compile 'com.tencent.bugly:crashreport:2.6.5' crashreport_upgrade
compile 'com.tencent.bugly:crashreport_upgrade:latest.release'
compile 'com.tencent.bugly:nativecrashreport:latest.release'
compile 'com.growingio.android:vds-android-agent:[email protected]'
compile 'com.umeng.analytics:analytics:latest.integration'
compile 'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:1.0.2'
compile 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
compile 'com.github.Aspsine:SwipeToLoadLayout:1.0.4'
compile 'com.github.PhilJay:MPAndroidChart:v3.0.0'
compile 'com.lzy.net:okgo:2.1.4'
compile 'com.github.hackware1993:MagicIndicator:1.5.0'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.zhy:autolayout:1.4.5'
compile 'io.reactivex.rxjava2:rxjava:2.1.3'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'com.j256.ormlite:ormlite-android:5.0'
compile 'com.j256.ormlite:ormlite-core:5.0'
compile 'com.meituan.android.walle:library:1.1.3'
compile 'com.zhy:flowlayout-lib:1.0.3'
compile 'com.scwang.smartrefresh:SmartRefreshLayout:1.0.3'
compile 'com.google.android.exoplayer:exoplayer-core:r2.5.2'
compile 'com.google.android.exoplayer:exoplayer-hls:r2.5.2'
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.3'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.3'
compile 'com.kyleduo.switchbutton:library:1.4.6'
}