在v4 版本中,fragment有生命周期onAttach,而在app中的 没有。
下面是编译的版本:
下面是编译的版本:
android { compileSdkVersion 23 buildToolsVersion "23.0.1" defaultConfig { applicationId "ty.com.caputermarket" minSdkVersion 14 targetSdkVersion 23 versionCode 1 versionName "1.0" }