无名模块问题
在调用文本_转语音方法时报错:堆栈跟踪(崩溃信息):
java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. Make sure your adapter calls notifyDataSetChanged() when its content changes.
at android.widget.ListView.layoutChildren(ListView.java:1779)
at android.widget.AbsListView.onLayout(AbsListView.java:2309)
at android.view.View.layout(View.java:20949)
at android.view.ViewGroup.layout(ViewGroup.java:6396)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
at android.view.View.layout(View.java:20949)
at android.view.ViewGroup.layout(ViewGroup.java:6396)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:331)
at android.widget.FrameLayout.onLayout(FrameLayout.java:269)
at android.view.View.layout(View.java:20949)
at android.view.ViewGroup.layout(ViewGroup.java:6396)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
at android.view.View.layout(View.java:20949)
at android.view.ViewGroup.layout(ViewGroup.java:6396)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:331)
at android.widget.FrameLayout.onLayout(FrameLayout.java:269)
at android.view.View.layout(View.java:20949)
at android.view.ViewGroup.layout(ViewGroup.java:6396)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
at android.view.View.layout(View.java:20949)
at android.view.ViewGroup.layout(ViewGroup.java:6396)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:331)
at android.widget.FrameLayout.onLayout(FrameLayout.java:269)
at com.android.internal.policy.DecorView.onLayout(DecorView.java:1379)
at android.view.View.layout(View.java:20949)
at android.view.ViewGroup.layout(ViewGroup.java:6396)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2899)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2422)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1536)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7431)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1079)
at android.view.Choreographer.doCallbacks(Choreographer.java:884)
at android.view.Choreographer.doFrame(Choreographer.java:816)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1065)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:243)
at android.app.ActivityThread.main(ActivityThread.java:7172)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:511)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:876) 文本转语音没有问题。。是其它问题导致的。。
The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. Make sure your adapter calls notifyDataSetChanged() when its content changes.
这意思翻译一下就是,操作列表框导致的。。可能是你在多线程里面操作列表框。。
不信你可以单独写个例子测试 文本_转语音这个方法。绝对没有任何问题。
本帖最后由 商继珠 于 2021-4-1 00:01 编辑
文本_转语音返回真后,(su xin)了一下文件列表。
页:
[1]