【问题标题】:groovy.lang.MissingPropertyException issue in Android Studio 4.1.1 , after creating new project创建新项目后,Android Studio 4.1.1 中的 groovy.lang.MissingPropertyException 问题
【发布时间】:2021-05-09 17:51:13
【问题描述】:

更新 android studio 4.1.1 后,创建新项目时出错

Could not get unknown property 'com' for root project 'MyApp' of type org.gradle.api.Project.` `* Exception is:
groovy.lang.MissingPropertyException: Could not get unknown property 'com' for root project 'MyApp' of type org.gradle.api.Project.
    at org.gradle.internal.metaobject.AbstractDynamicObject.getMissingProperty(AbstractDynamicObject.java:85)
    at org.gradle.internal.metaobject.ConfigureDelegate.getProperty(ConfigureDelegate.java:130)
    at sync_studio_tooling2_5pg2usyhi86d5n101u1apwwoh$_run_closure1.doCall

`

【问题讨论】:

  • 创建新项目时还是创建后?
  • 创建新项目后。

标签: android android-studio gradle intellij-idea groovy


【解决方案1】:

gradle-wrapper.properties 中添加较低版本(如 distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip 而不是 distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip)时,我已解决此问题

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-06-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-29
    • 1970-01-01
    相关资源
    最近更新 更多