在进行androidx转换时,将异常作为非法参数接收。
添加了sharedElement和其他视图样式的过渡。
我已经搜索了相关问题,并试图理解和应用,但未能解决问题。
0 libswiftCore.dylib 0x0000000103994aa0 0x1037a8000 + 2017952
1 libswiftCore.dylib 0x0000000103994aa0 0x1037a8000 + 2017952
2 libswiftCore.dylib 0x0000000103801404 0x1037a8000 + 365572
3 project 0x00000001011cea20 closure #1 in closure #1 in AppDelegate.persistentContainer.getter + 1560 (AppDelegate.swift:558)
4 project 0x00000001013fa1e0 thunk for @escaping @callee_guaranteed (@guaranteed NSPersistentStoreDescription, @guaranteed Err... + 152 (<compiler-generated>:0)
5 CoreData 0x00000002221770f0 -[NSPersistentStoreCoordinator _doAddPersistentStoreWithDescription:privateCopy:completionHandler:] + 800 (NSPersistentStoreCoordinator.m:1413)
6 CoreData 0x0000000222177514 -[NSPersistentStoreCoordinator addPersistentStoreWithDescription:completionHandler:] + 172 (NSPersistentStoreCoordinator.m:1454)
7 CoreData 0x00000002221813cc -[NSPersistentContainer loadPersistentStoresWithCompletionHandler:] + 476 (NSPersistentContainer.m:205)
8 project 0x00000001011ce3e8 closure #1 in AppDelegate.persistentContainer.getter + 224 (AppDelegate.swift:540)
9 project 0x00000001011c0c38 AppDelegate.persistentContainer.getter + 320 (AppDelegate.swift:532)
@available(iOS 10.0, *)
lazy var persistentContainer: NSPersistentContainer = {
let container = NSPersistentContainer(name: "NotificationCenterCoreData")
container.loadPersistentStores(completionHandler: { (storeDescription, error) in
if let error = error as NSError? {
fatalError("Unresolved error \(error), \(error.userInfo)")
}
})
return container
}()
错误:
IllegalArgumentException:共享元素不能为null 在android.app.ActivityOptions.makeSceneTransitionAnimation(ActivityOptions.java:724) 在android.app.ActivityOptions.makeSceneTransitionAnimation(ActivityOptions.java:644) 在androidx.core.app.ActivityOptionsCompat.makeSceneTransitionAnimation(ActivityOptionsCompat.java:217) 在mateiladesign.practice.com.materialdesign.Adapter.rvAdapter $ 1.holderClicked(rvAdapter.java:129) 在mateiladesign.practice.com.materialdesign.Adapter.rvAdapter $ rvViewHolder.onClick(rvAdapter.java:71) 在android.view.View.performClick(View.java:6256)