• 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.

  • 相关阅读:
    debian源
    python查找字符串所有子串
    python格式化输出
    Nmap扫描常用参数
    生日攻击
    python 逻辑运算符问题
    python装饰器中的计时器thd.strat用法
    One-hot encoding 独热编码
    协同过滤算法 teamCF
    bootstrap boosting bagging辨析
  • 原文地址:https://www.cnblogs.com/seven1979/p/4372572.html
Copyright © 2020-2023  润新知