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

Error:(56, 0) 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.

这个问题困扰了很久,最终通过修改文件夹权限得以解决。

就是把项目所在的盘的用户所有权限都开起来,这样就可以了。

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