zoukankan      html  css  js  c++  java
  • Cant migrate project to Gradle in Android Studio

    The project thinks it's still a non-Gradle based project; it's not the presence of the build.gradle file that makes it Gradle-based, but it's how the project was set up in the first place. You'll need to re-import your project to finish the conversion to Gradle.

    First, though, it looks like you don't have a settings.gradle file; it looks like you need one. Since you've set up your project as a single-module project, then you can put the file in your project's root directory, next to build.gradle. It should contain this:

    import':'

    In the future if you add more modules to your project you may want to convert it to a multi-module directory structure, but you don't need to worry about that now. In any event, now you need to do the re-import in Android Studio:

    1. Close your project
    2. Back up your project
    3. Delete the .idea folder in the root directory of the project
    4. Delete all the .iml files in your project
    5. Import your project in Android Studio, and in the dialog that prompts you for a file, choose thebuild.gradle file.

    After this you should be good to go.

  • 相关阅读:
    Jmeter与LoadRunner 测试Java项目的坑
    关于<forEach>的<if>混合使用显示数据
    无题。省
    无题。思
    767A Snacktower
    喵哈哈村的括号序列

    队列
    优先队列
    768A Oath of the Night's Watch
  • 原文地址:https://www.cnblogs.com/seven1979/p/4372572.html
Copyright © 2011-2022 走看看