访问布局文件时,我的动态功能模块中出现 Resources$NotFoundException。完整的错误日志如下。我怎样才能解决这个问题?
android.content.res.Resources$NotFoundException: Resource ID
#0x7e070001
at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:239)
at android.content.res.MiuiResourcesImpl.getValue(MiuiResourcesImpl.java:96)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2317)
at android.content.res.Resources.getLayout(Resources.java:1191)
at android.view.LayoutInflater.inflate(LayoutInflater.java:536)
at android.view.LayoutInflater.inflate(LayoutInflater.java:481)
at android.view.View.inflate(View.java:26090)
at com.x.y.player.ContentPlayer.<init>(ContentPlayer.kt:144)
代码文件
init {
val view = FrameLayout.inflate(context, R.layout.content_player_layout, this)
videoTextureView = view.findViewById(R.id.videoTextureView)
videoSurfaceView = view.findViewById(R.id.videoSurfaceView)
}
在线错误
val view = FrameLayout.inflate(context, R.layout.content_player_layout, this)