Android Studio导航抽屉在设计视图上显示黑屏
我安装了Android Studio 3.1.3,但只显示黑屏
I installed Android studio 3.1.3 and it's only showing a dark screen
build.gradle:
build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.herson.freed"
minSdkVersion 23
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
implementation 'com.android.support:design:28.0.0-alpha3'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:support-v4:28.0.0-alpha3'
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'
}
它在gradle中给出了此错误:
It gives this error in gradle:
support-v4:28.0.0-alpha中的无法解决依赖性"错误
"Unable to resolve dependency" error in support-v4:28.0.0-alpha
请帮助,我还是Android的新手.
Please help, I'm still new to Android.
确保您已连接到良好的网络
Make sure you are connected to a good network
选中此复选框
转到>文件->其他设置->在构建,执行和部署下->您将看到Gradle.取消选中复选框离线工作
Goto >file -> other settings -> Under build, execution, and deployment -> you will see Gradle. uncheck the checkbox offline work
尝试将Google maven存储库添加到应用程序的build.gradle文件中:
Try adding Google maven repository into app's build.gradle file:
repositories {
maven { url "https://maven.google.com" }
}
重建您的项目.
如果第1步不起作用,请从项目根文件夹中删除gradle,然后重新构建项目.
If step 1 won't work, remove gradle from your project root folder and rebuild your project again.