Amits
Amits

Reputation: 19

Android studio Navigation drawer showing dark screen on design View

I installed Android studio 3.1.3 and it's only showing a dark screen

design View image

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'
}

It gives this error in gradle:

"Unable to resolve dependency" error in support-v4:28.0.0-alpha

Please help, I'm still new to Android.

Upvotes: 0

Views: 217

Answers (1)

olajide
olajide

Reputation: 967

Make sure you are connected to a good network

Check this checkbox

Goto >file -> other settings -> Under build, execution, and deployment -> you will see Gradle. uncheck the checkbox offline work

Try adding Google maven repository into app's build.gradle file:

repositories {
    maven { url "https://maven.google.com" }
}

rebuild your project.

If step 1 won't work, remove gradle from your project root folder and rebuild your project again.

Upvotes: 1

Related Questions