Build. Gradle file:
Apply the plugin: '. Com. Android application '
Def releaseTime () {
The return of new Date (). The format (" yyyyMMdd ", TimeZone. GetTimeZone (" UTC "))
}
Android {
CompileSdkVersion 26
BuildToolsVersion '28.0.3'
DefaultConfig {
ApplicationId "jaydenxiao.com.androidfire
"MinSdkVersion 15
TargetSdkVersion 26
VersionCode 4
VersionName "1.0.3"
}
BuildTypes {
Release {
LOG_DEBUG buildConfigField "Boolean", ""," false "
//confusion
MinifyEnabled true
//the Zipalign optimization
ZipAlignEnabled true
//remove useless resource file
ShrinkResources true
ProguardFiles getDefaultProguardFile (' proguard - android. TXT), 'proguard - rules. Pro'
//apk named
Android. ApplicationVariants. All {variant - & gt;
The variant. Outputs. Each {output - & gt;
Def outputFile=output. The outputFile
If (outputFile!=null & amp; & OutputFile. Name. EndsWith (' apk ')) {
//modify the apk file name here
Def fileName="AndroidFire - ${defaultConfig. VersionCode} - ${defaultConfig. VersionName} - ${releaseTime ()}. The apk"
The output. The outputFile=new File (outputFile. Parent, fileName)
}
}
}
}
The debug {
LOG_DEBUG buildConfigField "Boolean", ""," true "
MinifyEnabled false
ZipAlignEnabled false
ShrinkResources false
}
}
//set the virtual machine heap memory size, avoid OOM during compilation
DexOptions {
Incremental true
JavaMaxHeapSize "4 g"
}
//packaging do not check
LintOptions {
CheckReleaseBuilds false
AbortOnError false
}
}
Dependencies {
The compile fileTree (dir: 'libs', include: [' *. Jar'])
Compile the project: (' library: photoPicker ')//picture select
Compile the project: (' library: irecyclerview ')//universal adapter and recyclerview
Compile the project: (' library: oneKeyShareSDK ')//share
Compile the project: (' library: jcvideoplayer ')//play
Compile the project: (' library: selectordialog ')//prompt box commonly used
}
Problems: is the video that one plate, hot spots, entertainment, funny and boutique four video tags, sometimes can be loaded, but most of the load, according to the network error, try again