我有嵌套片段的问题:我有一个父片段,我用它来为操作栏创建一个选项卡并SupportMapFragment
在其中显示一个地图,但是如果我使用 Maven 构建我的项目,我会收到此错误:
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.maps.SupportMapFragment" on path: DexPathList[[zip file "/data/app/com.etaxi.android.driverapp-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.etaxi.android.driverapp-1, /system/lib]]
我正在使用官方的 ActionBar 支持库,并且我getChildFragmentManager()
在父片段中的任何地方都使用SupportMapFragment
这样的访问:
map = ((SupportMapFragment) getChildFragmentManager().findFragmentById(R.id.map)).getMap();
有什么建议么?