Android 打包获取打包时间(为了方便测试打包) //在app的bulid.gradle里面写 debug { signingConfig signingConfigs.config buildConfigField "boolean", "IS_DEBUG", "true" ..... buildConfigField("String", "debugTime", "\""+ne
//在app的bulid.gradle里面写 debug { signingConfig signingConfigs.config buildConfigField "boolean", "IS_DEBUG", "true" ..... buildConfigField("String", "debugTime", "\""+new Date().format("yyyy-MM-dd HH:mm:ss")+"\"") } //然后再在需要的地方set时间进去 tv_version_time.setText(BuildConfig.debugTime);