android - 呈现问题注意 : This project contains Java compilation errors

标签 android rendering

我在 Android Studio 上遇到这个错误。

呈现问题注意:此项目包含 Java 编译错误,这可能会导致自定义 View 呈现失败。首先修复编译问题。 找不到以下类:

<com.makeuprewardz.app.ui.view.BottomBar (Fix Build Path, Edit XML, Create Class)

提示:尝试构建项目。

这是我的 XML 文件

 <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:fancy="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
android:orientation="vertical">

<FrameLayout
    android:id="@+id/fl_container"
    android:layout_marginBottom="@dimen/bottombar_height"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>

<ImageView
    android:layout_width="match_parent"
    android:background="@drawable/actionbar_shadow_up"
    android:layout_gravity="bottom"
    android:layout_marginBottom="@dimen/bottombar_height"
    android:layout_height="wrap_content"
    tools:ignore="ContentDescription" />

<com.makeuprewardz.app.ui.view.BottomBar
    android:id="@+id/bottomBar"
    android:layout_width="match_parent"
    android:layout_height="@dimen/bottombar_height"
    android:layout_gravity="bottom" />

最佳答案

确保您在项目的 gradle 文件中添加了自定义 View 的依赖项。

关于android - 呈现问题注意 : This project contains Java compilation errors,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45259025/

相关文章:

javascript - 我怎样才能减少expo build ios的大小,它大约是188 MB,

java - DrawerLayout 上的动画状态栏颜色 - Material Design

iphone - 在 iPhone 上绘制屏幕缓冲区的最快方法

android - 如何移动到下一个屏幕,同时保留当前屏幕的一部分 android ViewFlipper?

java - ImageView 上的 TranslateAnimation 不起作用

android - 如何检查系统更新是否可用

c# - 为什么需要将元素不断添加到已计算渲染发生的 GeometryModel3D 属性集合中?

html - 如何截取呈现的 HTML 页面的屏幕截图

react-native - React Native Flatlist numColumns 没有制作多列

unity3d - 是否可以在 Unity 的 HDRP 中创建 DepthMask 效果?