当前位置:   article > 正文

android工程没有gradle文件,Android项目结构不正确;只有一个build.gradle

为什么我的。gradle里只有一个文件

我的项目结构不正确.我需要一个顶级的build-gradle,以及一个包含自己的build.gradle的模块.

请参阅现在的图片.您所看到的几乎是将两个不同的级别合并到on.e上.build.gradle是项目中唯一的一个.您看到的是该版本的顶级版本.

dc6350250e516478eb7785d53f25f511.png

解决这个问题的正确方法是什么?我需要重新导入还是可以重新组织它?

其他信息,我已经安装了Gradle 2.10.

编辑:更多信息

通常,我有一个顶级Gradle文件,其中包含以下内容:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

repositories {

jcenter()

}

dependencies {

classpath 'com.android.tools.build:gradle:2.1.2'

classpath 'com.google.gms:google-services:3.0.0'

}

}

allprojects {

repositories {

jcenter()

}

}

但是在上面的设置中,没有第二个Gradle文件,我应该在哪里放置其他信息…例如:

apply plugin: 'com.android.application'

repositories {

mavenCentral()

maven {

url "https://jitpack.io"

}

}

android {

defaultConfig {

// edited

}

dependencies {

// edited

}

buildTypes {

release {

minifyEnabled false

proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

}

}

}

apply plugin: 'com.google.gms.google-services'

运行程序时,出现以下错误:

Error:A problem was found with the configuration of task ':checkDebugManifest'.

> File 'C:\--\src\main\AndroidManifest.xml' specified for property 'manifest' does not exist.

有关系吗

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/293489
推荐阅读
相关标签
  

闽ICP备14008679号