Предварительный просмотр макета Android не загружается в Android Studio 3.1.3

Проблема здесь в том, что инструмент предварительного просмотра из студии Android не загружает мое представление, другие представления, которые у меня есть, в порядке.

activity_maps_view.xml

<RelativeLayout xmlns:android = "http://schemas.android.com/apk/res/android"
    xmlns:app = "http://schemas.android.com/apk/res-auto"
    xmlns:tools = "http://schemas.android.com/tools"
    android:id = "@+id/relativeTop"
    android:layout_width = "match_parent"
    android:layout_height = "match_parent"
    tools:context = ".View.MapsView">

    <ScrollView
        android:layout_width = "match_parent"
        android:layout_height = "wrap_content">

        <LinearLayout
            android:layout_width = "match_parent"
            android:layout_height = "wrap_content"
            android:orientation = "vertical">

            <LinearLayout
                android:layout_width = "match_parent"
                android:layout_height = "wrap_content"
                android:orientation = "horizontal">
                <ImageView
                    android:id = "@+id/imageView4"
                    android:layout_width = "match_parent"
                    android:layout_height = "wrap_content"
                    android:adjustViewBounds = "true"
                    android:contentDescription = "@string/signin_logoBackground"
                    android:cropToPadding = "true"
                    android:scaleType = "centerInside"
                    app:srcCompat = "@drawable/login_logo_3x" />


            </LinearLayout>

            <android.support.design.widget.BottomNavigationView
                android:id = "@+id/top_navigation_view"
                android:layout_width = "match_parent"
                android:layout_height = "wrap_content"
                app:itemBackground = "@android:color/white"
                app:itemIconTint = "@drawable/nav_selector"
                app:itemTextColor = "@drawable/nav_selector"
                app:menu = "@menu/top_menu">

            </android.support.design.widget.BottomNavigationView>

        </LinearLayout>
    </ScrollView>

    <fragment
        android:id = "@+id/map"
        android:name = "com.google.android.gms.maps.SupportMapFragment"
        android:layout_width = "match_parent"
        android:layout_height = "match_parent"
        tools:layout = "@layout/activity_maps_view" />

    <android.support.design.widget.BottomNavigationView
        android:id = "@+id/bottom_navigation_view"
        android:layout_width = "match_parent"
        android:layout_height = "wrap_content"
        android:layout_alignParentBottom = "true"
        app:itemBackground = "@android:color/white"
        app:itemIconTint = "@drawable/nav_selector"
        app:itemTextColor = "@drawable/nav_selector"
        app:menu = "@menu/bottom_menu">

    </android.support.design.widget.BottomNavigationView>
</RelativeLayout>

build.grade

apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "de.bho_dive.app.android"
        minSdkVersion 21
        targetSdkVersion 27
        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 "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    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'
    implementation 'com.android.volley:volley:1.1.0'
    implementation 'com.android.support:design:27.1.1'

    implementation 'com.google.android.gms:play-services-maps:15.0.1'
    implementation 'com.google.android.gms:play-services-location:15.0.1'
}

Предварительный просмотр макета Android не загружается в Android Studio 3.1.3

Как видите, инструмент предварительного просмотра ничего не показывает, я уже пытался изменить тему, изменить версию Android, перезапустить студию Android, снова импортировать проект, и, похоже, ничего не работает. Любые идеи?

Вы пробовали оформить заявку? Создать код? Добиться успеха?

DennyDog 11.07.2018 13:42

@DennyDog Приложение нормально строится и запускается. И в приложении я вижу полностью построенный вид

Tek 11.07.2018 13:46

Отображается ли какое-либо предупреждение или сообщение об ошибке?

Hossein Seifi 11.07.2018 14:01

@HosseinSeifi Нет, ничего.

Tek 11.07.2018 15:27
1
4
1 001
1
Перейти к ответу Данный вопрос помечен как решенный

Ответы 1

Ответ принят как подходящий

Вы пытались сделать недействительным кеш / перезапуск из меню файла

Android studio -> File -> invalidate cache/restart

Я сделал это и создал другой вид, и теперь он, кажется, работает! Спасибо @prashant!

Tek 11.07.2018 15:26

Другие вопросы по теме