小编Muh*_*lma的帖子

膨胀类android.support.v4.widget.SwipeRefreshLayout

我正在尝试在片段中实现SwipeRefreshLayout。它看起来创建正确,但是我继续出现错误:

Caused by: android.view.InflateException: Binary XML file line #2: 
Binary XML file line #2: Error inflating class 
android.support.v4.widget.SwipeRefreshLayout
Caused by: android.view.InflateException: Binary XML file line #2: 
Error inflating class android.support.v4.widget.SwipeRefreshLayout
Caused by: java.lang.ClassNotFoundException: Didn't find class 
"android.support.v4.widget.SwipeRefreshLayout" on path: 
DexPathList[[zip file "/data/app/com.weather.rainy- 
2/base.apk"],nativeLibraryDirectories=[/data/app/com.weather.rainy- 
2/lib/x86, /system/lib, /vendor/lib]]
Run Code Online (Sandbox Code Playgroud)

我真的不知道是什么原因造成的。

我用于实现SwipeRefreshLayout的片段布局:

    <android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/swipeToRefresh4Maps"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <RelativeLayout
        android:id="@+id/topRL4Maps"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/bg_gradient_purple"
        android:paddingLeft="@dimen/activity_horizontal_margin"
        android:paddingTop="64dp"
        android:paddingRight="@dimen/activity_horizontal_margin"
        android:paddingBottom="64dp"
        tools:context="com.weather.rainy.ui.MapsActivity">

        <TextView
            android:id="@+id/yourLocationLabelTextView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="15dp"
            android:text="@+string/your_location"
            android:textColor="@android:color/white"
            android:textSize="24sp" />

        <fragment
            android:id="@+id/map"
            android:name="com.google.android.gms.maps.SupportMapFragment"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" …
Run Code Online (Sandbox Code Playgroud)

android swiperefreshlayout

9
推荐指数
4
解决办法
6374
查看次数

为什么我们使用 SASS,甚至我们使用 SCSS?

我已经在我的项目中使用 SCSS,但我仍然感到困惑。

为什么我们有 SCSS 还要使用 SASS,我们可以在同一个项目中使用 SASS 和 SCSS,它会在同一个项目中工作吗?

css sass scss-mixins

3
推荐指数
1
解决办法
6997
查看次数

未找到 NativeScript tns doctor 命令

像这样安装 NativeScript 后:https ://docs.nativescript.org/start/ns-setup-os-x

当我运行该tns doctor命令时,才发现该命令未找到。

我该如何解决这个问题?

npm nativescript npm-install

2
推荐指数
1
解决办法
4266
查看次数