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.

  • 相关阅读:
    内部类
    多重继承关系初始化顺序及初始化
    String
    Error
    算法:插入排序
    算法:冒泡排序
    算法:选择排序
    注册Activity
    java变量的作用域和基本数据类型转换
    java数据类型
  • 原文地址:https://www.cnblogs.com/seven1979/p/4372572.html
Copyright © 2011-2022 走看看