Could not findproperty 'packageApplication'
2015-04-14 11:10
381 查看
由于gradle 升级导致兼容问题解决方法
Error:Could not findproperty 'packageApplication' oncom.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated@5fc07ff0.
Couldnot find property 'zipAlign' on com.android.build.gradle
(1)
def apk =
variant.packageApplication.outputFile;
def newName = "";
修改为:
def apk = variant.outputs[0].outputFile;
def newName = "";
(2)
variant.packageApplication.outputFile = new File(apk.parentFile, newName);
if (variant.zipAlign) {
newName = newName.replace("-unaligned", "")
log.info "$newName"
variant.zipAlign.outputFile = new File(apk.parentFile, newName);
}
修改为:
variant.outputs[0].outputFile= new File(apk.parentFile, newName);
if (variant.outputs[0].zipAlign) {
newName = newName.replace("-unaligned", "")
log.info "$newName"
variant.outputs[0].zipAlign.outputFile= new File(apk.parentFile, newName);
}
Error:Could not findproperty 'packageApplication' oncom.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated@5fc07ff0.
Couldnot find property 'zipAlign' on com.android.build.gradle
(1)
def apk =
variant.packageApplication.outputFile;
def newName = "";
修改为:
def apk = variant.outputs[0].outputFile;
def newName = "";
(2)
variant.packageApplication.outputFile = new File(apk.parentFile, newName);
if (variant.zipAlign) {
newName = newName.replace("-unaligned", "")
log.info "$newName"
variant.zipAlign.outputFile = new File(apk.parentFile, newName);
}
修改为:
variant.outputs[0].outputFile= new File(apk.parentFile, newName);
if (variant.outputs[0].zipAlign) {
newName = newName.replace("-unaligned", "")
log.info "$newName"
variant.outputs[0].zipAlign.outputFile= new File(apk.parentFile, newName);
}
相关文章推荐
- Could not find property 'zipAlignEnabled' on com.android.build.gradle.internal.api.ApplicationVarian
- Could not find property 'outputFile' on com.android.build.gradle.internal.api.ApplicationVariantImpl
- Could not find property 'outputFile
- INFO: solr home defaulted to 'solr/' (could not find system property or JNDI)
- 关于Could not find a storyboard named 'Me' in bundle NSBundle崩溃错误
- etting property 'source' to 'org.eclipse.jst.jee.server:*did not find a matching property
- 'Could not find first log file name in binary log index file'的解决办法
- (xcode5.0 DEV target:iOS5.0) Could not find a storyboard named 'Main_iPhone.storyboard' in bundle,解决
- Swift: could not find an overload for '+' that accepts the supplied arguments
- ORA-12516, TNS: listener could not find available handler with matching protocol stack'
- ibatis Could not find SQL statement to include with refid 'xxx' 问题
- Could not find file 'irsir.dll' on disk
- 使用第三方 'Could not find class 'net.htmlparser.jericho.Source' 错误修复 红色感叹号
- tomcat警告setting property 'debug' to '0' did not find a matching property
- This application failed to start because it could not find or load the Qt platform plugin "xcb".
- Could not find class 'org.ksoap2.serialization.SoapObject', referenced from method cn.edu.bzu.soap.S
- Could not find a storyboard named 'Main' in bundle NSBundle
- Setting property 'source' to 'org.eclipse.jst.jee.server:webProject' did not find a matching propert
- pod install报错:could not find a valid gem 'cocoapods'
- Setting property 'source' to 'org.eclipse.jst.jee.server:webProject' did not find a matching property