【发布时间】:2019-03-04 07:56:07
【问题描述】:
请帮助我!
新建project后,遇到following error:
新问题:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.sqlitedb"
minSdkVersion 25
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android- optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso- core:3.0.2'
}
发现错误:
错误:无法解决:com.android.support:appcompat-v7:28.0.0 在项目结构对话框中显示 受影响的模块:app
错误:无法解决:com.android.support.constraint:constraint-layout:1.1.3 在项目结构对话框中显示 受影响的模块:app
【问题讨论】:
-
用gradle配置你的sdk
-
如何让sdk配置gradle?
-
从文件 -> 将项目与 Gradle 文件同步
-
请将代码、错误和数据添加为文本 (using code formatting),而不是图像。图片:A)不允许我们复制粘贴代码/错误/数据进行测试; B) 不允许根据代码/错误/数据内容进行搜索;和many more reasons。一般来说,文本格式的代码/错误/数据>>>>作为图像的代码/错误/数据>>没有。只有在除了代码格式的文本之外,如果图像添加了一些重要的东西,而不仅仅是文本代码/错误/数据传达的内容,则应该使用图像。
标签: android android-studio android-gradle-plugin