这是来自google/exoplayer的代码片段- 它是用 Groovy buildscript 编写的。
// settings.gradle
gradle.ext.exoplayerRoot = 'path/to/exoplayer'
gradle.ext.exoplayerModulePrefix = 'exoplayer-'
apply from: new File(gradle.ext.exoplayerRoot, 'core_settings.gradle')
Run Code Online (Sandbox Code Playgroud)
如何使用 Kotlin DSL 实现这一目标?
我找不到任何有用的资源或文档。任何帮助,将不胜感激。
我有一个应用程序,现在我要发布它。我创建了一个 apk 文件并安装了它,但是当我向服务器发送登录请求时,它返回 null ..
奇怪的是,当我使用调试版本启动应用程序时,它工作正常。该问题仅发生在发布模式下。所以读完这篇文章后我认为问题出在 proguard 上
这是我到目前为止所做的事情。
任何帮助,将不胜感激...
这是我的 build.gradle 文件。
defaultConfig {
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "com.android.support:appcompat-v7:$rootProject.supportLibraryVersion"
implementation "com.android.support:recyclerview-v7:$rootProject.supportLibraryVersion"
implementation "com.android.support:design:$rootProject.supportLibraryVersion"
implementation "com.android.support:cardview-v7:$rootProject.supportLibraryVersion"
implementation "com.android.support:gridlayout-v7:$rootProject.supportLibraryVersion"
implementation "com.android.support:animated-vector-drawable:$rootProject.supportLibraryVersion"
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.2'
implementation 'com.squareup:otto:1.3.8'
implementation 'com.github.nisrulz:recyclerviewhelper:26.0.0'
implementation …Run Code Online (Sandbox Code Playgroud)