Comments (1)
把下面这段代码注释
applicationVariants.all { variant ->
variant.outputs.each { output ->
output.outputFileName = new File(
output.outputFile.getParent(),
"knowweather.apk".toLowerCase())
}
}
或者替换成下面
applicationVariants.all { variant ->
variant.outputs.all { output -> // each 改为 all
def fileName = "${variant.versionName}_release.apk"
def outFile = output.outputFile
if (outFile != null && outFile.name.endsWith('.apk')) {
outputFileName = fileName // output.outputFile 改为 outputFileName
}
//删除unaligned apk
if (output.zipAlign != null) {
output.zipAlign.doLast {
// output.zipAlign.inputFile.delete()
}
}
}
}
主要原因是gradle切换到3.0以上打包出现的问题
from knowweather.
Related Issues (20)
- 下载应用安装打开加载数据失败 HOT 3
- 赞
- 为什么安装不上,提示无法创建文件 HOT 4
- 定位失败问题 HOT 1
- 赞
- 还维护吗?天气接口数据变了,WeatherData类需要改 HOT 2
- 通知栏~
- 为啥我的AndriodManifest.xml一片红呀?unresolved和not allowed...大佬们求教呀
- 微信分享不能正常调用 HOT 1
- 华为nova 7.0系统直接闪退 HOT 1
- 华为平板闪退 HOT 1
- com.silencedut.expandablelayout.ExpandableLayout HOT 2
- ERROR: Could not find method leftShift() for arguments HOT 2
- Caused by: org.gradle.api.plugins.UnknownPluginException: Plugin with id 'com.antfortune.freeline' not found.
- 效果还不错 HOT 1
- 室内老是出现定位失败,可以看看嘛?谢谢了 HOT 1
- 关于toolbar消失的问题
- improperly called by android.support.v7.widget.AppCompatTextView HOT 1
- W/View: requestLayout() improperly called by android.support.v7.widget.AppCompatTextView HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from knowweather.