无法解决com.android.support:support-v4:23.2.1

时间:2016-03-30 23:51:56

标签: android gradle

我将此库添加到我的gradle文件中:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
android:layout_height="wrap_content" >

    <ScrollView
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" >

        <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
            xmlns:tools="http://schemas.android.com/tools"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
        android:paddingBottom="@dimen/activity_vertical_margin"
            android:paddingLeft="@dimen/activity_horizontal_margin"
            android:paddingRight="@dimen/activity_horizontal_margin"
            android:paddingTop="@dimen/activity_vertical_margin"
            tools:context="com.aksu.ozgur.learnerlog.SupervisorActivity" >

            <android.support.design.widget.TextInputLayout
                android:id="@+id/Name"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content">
                <EditText
                android:id="@+id/editTextName"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:hint="@string/name" />
            </android.support.design.widget.TextInputLayout>

        <android.support.design.widget.TextInputLayout
                android:id="@+id/Email"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/Name">

                <EditText
                    android:id="@+id/editTextEmail"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:hint="@string/email"
                android:inputType="textWebEmailAddress"/>
            </android.support.design.widget.TextInputLayout>
            <android.support.design.widget.TextInputLayout
                android:id="@+id/Phone"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/Email">

                <EditText
                    android:id="@+id/editTextPhone"
                android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:hint="@string/phone"
                    android:inputType="number"/>
            </android.support.design.widget.TextInputLayout>
            <android.support.design.widget.TextInputLayout
                android:id="@+id/LicenceNo"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/Phone">

            <EditText
                    android:id="@+id/editTextLicenceNo"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:hint="@string/licence_no"
                    android:inputType="time"/>
        </android.support.design.widget.TextInputLayout>
            <Button
                android:id="@+id/SaveSupervisorButton"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentBottom="true"
                android:layout_marginBottom="28dp"
                android:onClick="SaveSupervisor"
                android:text="@string/save_supervisor"
                android:layout_below="@+id/LicenceNo"/>

    </RelativeLayout>
    </ScrollView>

</RelativeLayout>

但每次编译PhotoView库时,都会收到此错误:

compile 'com.commit451:PhotoView:1.2.5' 

我从android SDK管理器下载了新的“Android Support Library 23.2.1” 但我仍然得到错误。这真烦人我需要帮助。 我的依赖:

Error:Could not find com.android.support:support-v4:23.2.1. 

}

1 个答案:

答案 0 :(得分:3)

此处的相同问题 - 通过将“支持库的本地Maven存储库”更新为rev来解决。 28(我通过独立SDK管理器更新) 并且如前所述,每个com.android.support:xxx依赖项都应该具有相同的版本。