我是Android Studio中的新手,我在笔记本电脑中从笔式驱动器复制了一个Android Studio项目,并试图在我的笔记本电脑上运行它,我在Android Studio中收到此错误。以下是我的build.gradle文件:
YesFile
我不知道如何修复此错误。请帮帮我..
这是我的androidManifest文件:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply plugin: 'com.android.application'
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
dependencies {
// https://mvnrepository.com/artifact/com.android.tools/sdklib
compile group: 'com.android.tools', name: 'sdklib', version: '25.1.2'
compile 'com.android.support:support-annotations:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:support-v13:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile project(':app')
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:gridlayout-v7:23.1.1'
}
android {
compileSdkVersion 23
buildToolsVersion '23.0.1'
sourceSets {
main {
manifest.srcFile 'Calci-app/src/main/AndroidManifest.xml'
}
}
dexOptions {
incremental true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6
targetCompatibility JavaVersion.VERSION_1_6
}
}
repositories {
maven { url 'android.support.design.widget.AppBarLayout' }
}
答案 0 :(得分:0)
android {
sourceSets {
main {
manifest.srcFile 'Calci-app\src\main\AndroidManifest.xml'
}
}
}
将此代码添加到您的Gradle