Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated

今天把android studio升级到了3.0.1,编译各种异常,其中,

Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated{apkData=Main{type=MAIN, fullName=debug, filters=[]}} of type com.android.build.gradle.internal.api.ApkVariantOutputImpl.如下图,红色框地方报错,这个错的原因是outputFile放的地方换了

Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated

上图是修改前,修改后如下图:

Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated