0

I wanted to create simple mobile app with using tabs, but I had this problem.

after creating and building gradle activiy_main can't load and shows nothing gradle version :: com.android.tools.build:gradle:3.1.4

apply plugin: 'com.android.application'

android {  
    compileSdkVersion 28  
    defaultConfig {  
        applicationId "kz.starbuzzapplication"  
        minSdkVersion 14  
        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'  
    implementation 'com.android.support:design: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'  
}  

enter image description here

here is screen I tried:

1) Clean and Rebuild project

2)Change values/style

3) Restart Android Studio

4) Delete Project, then Create new one, but same result.

How to fix it????????????????

niz_sh
  • 475
  • 2
  • 5
  • 16

1 Answers1

2

This is a bug of android studio in version 28

Change

compileSdkVersion 28

To

compileSdkVersion 27

And Change

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

To

implementation 'com.android.support:appcompat-v7:27.1.1'
Radesh
  • 13,084
  • 4
  • 51
  • 64
  • 1
    @ShuhratjanNizamov Have you tried changing the theme from the preview themes? This was a bug in Release candidate versions and not the 28 stable version. – ʍѳђઽ૯ท Oct 14 '18 at 11:39