使用compileSdkVersion 23,但是尝试支持9到9.
getNetworkInfo(int)在23中已弃用.建议改为使用getAllNetworks和getNetworkInfo(Network).然而,这两者都需要最少的API 21.
我们可以在支持包中使用哪个类可以帮助解决这个问题吗?
我知道之前提出了一个解决方案,但是我对9的最小api要求的挑战造成了问题.
networking android android-6.0-marshmallow android-connectivitymanager
我正在尝试构建一个导航抽屉,我从一些网站上复制了代码,我在其中一个XML中收到了这个错误.
找不到与给定名称匹配的资源(在'paddingBottom'中,值为'@ dimen/activity_vertical_margin')
如何摆脱这个错误?
<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=".TabbedActivity$DummySectionFragment" >
<TextView
android:id="@+id/section_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)