Failed to transform file '45907c80e09917e1b776adf038505958' to match attributes {artifactType=jar} using transform AarTransform

前端 未结 4 542
粉色の甜心
粉色の甜心 2020-12-10 05:04

I am using Android 3.0 canary 4 and making an app. Everything was working fine until yesterday, but today when i opened the project, it gave me an error

 F:\         


        
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-10 05:36

    Received similar error:

    Failed to transform file 'uat-release.jar' to match attributes {artifactType=android-classes} Transform output file D:\R\project\uat-release.jar does not exist.

    In my case, Actual file was aar and bymistake I put .jar in build.gradle(of uat-release module)

      configurations.maybeCreate("default")
      artifacts.add("default", file('uat-release.jar'))
    

    Solved it by correcting file type:

      configurations.maybeCreate("default")
      artifacts.add("default", file('uat-release.aar'))
    

提交回复
热议问题