1

enter image description here

I am an absolute beginner in android studio. I have trying to create my first application with "Basic Layout" in studio and facing this above problem. The actual issue is that there is no floating button in the bottom right side and the the text in the center which should be "Hello World" is not there but instead showing a message "android...CoordinatorLayoutStyle".

I have literally tried every solution i have found on the internet plus reinstalling the studio multiple times. When nothing worked, i formatted the whole pc and installed fresh. But nothing worked. I tried installing studio on other PC with same config. it worked fine.

i am an absolute beginner with this, so anyone who's helping please explain everything

Here is my gradle file

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.anish.abc"
        minSdkVersion 15
        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.constraint:constraint-layout:1.1.1'
    implementation 'com.android.support:design: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'
}
  • Reinstalling windows won't fix Android Studio... You're having similar errors as these people https://stackoverflow.com/q/50786194/2308683 – OneCricketeer Jun 10 '18 at 17:40
  • 1
    When you "fail to instantiate classes", that means your Android SDK is faulty or missing, not your operating system . Please add your gradle files to your question – OneCricketeer Jun 10 '18 at 17:41

1 Answers1

3

Try using SDK 27 instead.

Change the compileSdkVersion and targetSdkVersion to 27, then change the appcompat library versions from 28.0.0-alpha3 to 27.1.1

implementation 'com.android.support:appcompat-v7:27.1.1'

implementation 'com.android.support:design:27.1.1'

Uninstalling SDK 28 in SDK Manager, and also the version 28 build tools from the SDK Tools tab, will prevent Android Studio from defaulting to SDK 28 for new projects.

Community
  • 1
  • 1
jproberts
  • 27
  • 4