Android Studio相关问题

1.无法连接外网,下载gradle

通过添加阿里云maven地址即可下载

maven { url "http://maven.aliyun.com/nexus/content/groups/public"}

2.Android Studio升级到最新版3.6.1后,新建了个项目,发现无法执行Java类的main方法

在.idea/gradle.xml中添加此行<option name="delegatedBuild" value="false" />

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="GradleMigrationSettings" migrationVersion="1" />
  <component name="GradleSettings">
    <option name="linkedExternalProjectsSettings">
      <GradleProjectSettings>
        <option name="testRunner" value="PLATFORM" />
        <option name="distributionType" value="DEFAULT_WRAPPED" />
        <option name="externalProjectPath" value="$PROJECT_DIR$" />
        <option name="delegatedBuild" value="false" />    // 在.idea/gradle.xml中添加此行
        <option name="modules">
          <set>
            <option value="$PROJECT_DIR$" />
            <option value="$PROJECT_DIR$/app" />
          </set>
        </option>
        <option name="resolveModulePerSourceSet" value="false" />
      </GradleProjectSettings>
    </option>
  </component>
</project>            

 

posted @ 2020-03-29 14:57  ysyouaremyall  阅读(437)  评论(0编辑  收藏  举报