简体   繁体   中英

Android Studio Render Errors

I started a project in android studio 3.1.3 and when I want to design something in the activity design palette, there is a problem! figure below: render errors

This is my gradle(Module: app) code:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.mohammad.myapplication"
        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-alpha3'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    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'
}

I thought maybe this could help: In my Sdk folder, in build-tools folder, there is two folders 28.0.1 & 27.0.3

Update:

I tried these and got nothing:

  • invalidate caches/restart
  • changing alpha3 to alpha1
  • running on an emulator (there were no errors, it's working well)

implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'更改为implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM