gpt4 book ai didi

java - 避免'Layer exceeds max dimensions supported by the GPU in Android

转载 作者:太空狗 更新时间:2023-10-29 14:47:15 25 4
gpt4 key购买 nike

所以在我的应用程序中我有两个 Activity ,当第二个 Activity 启动时,文本和图像等 JSON 数据会显示在那里。

问题是,我不知道文本会响多久,所以我得到了那个错误。

有解决办法吗?我不能在 Google Play 上发布这样的应用!

这是我的日志:

07-29 14:50:27.380 29205-29253/com.example.dario.upmovies W/OpenGLRenderer: Layer exceeds max. dimensions supported by the GPU (1080x4531, max=4096x4096)
07-29 14:50:27.381 29205-29253/com.example.dario.upmovies D/OpenGLRenderer: Current memory usage / total memory usage (bytes):
TextureCache 16284072 / 50331648
LayerCache 0 / 33554432 (numLayers = 0)
Layer size 1088x704; isTextureLayer()=0; texid=44 fbo=9; refs=2
Layers total 3063808 (numLayers = 1)
RenderBufferCache 0 / 4194304
GradientCache 16384 / 1048576
PathCache 3700 / 25165824
TessellationCache 24552 / 1048576
TextDropShadowCache 0 / 5242880
PatchCache 0 / 131072
FontRenderer 0 A8 524288 / 524288
FontRenderer 0 RGBA 0 / 0
FontRenderer 0 total 524288 / 524288
Other:
FboCache 0 / 0
Total memory usage:
19916804 bytes, 18.99 MB
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: JNI CallStaticVoidMethodV called with pending exception 'java.lang.IllegalStateException' thrown in void android.os.MessageQueue.nativePollOnce(long, int):-2
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] in call to CallStaticVoidMethodV
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] from void android.os.MessageQueue.nativePollOnce(long, int)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] "main" prio=5 tid=1 Runnable
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] | group="main" sCount=0 dsCount=0 obj=0x738ff000 self=0xb4827800
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] | sysTid=29205 nice=0 cgrp=default sched=0/0 handle=0xb6fc1bec
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] | state=R schedstat=( 2713918368 2160510665 6901 ) utm=240 stm=31 core=0 HZ=100
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] | stack=0xbe3d0000-0xbe3d2000 stackSize=8MB
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] | held mutexes= "mutator lock"(shared held)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] native: #00 pc 0000484c /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] native: #01 pc 00003031 /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] native: #02 pc 0024359b /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, char const*, art::mirror::ArtMethod*, BacktraceMap*)+70)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] native: #03 pc 002279e3 /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, BacktraceMap*) const+154)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] native: #04 pc 000affdd /system/lib/libart.so (art::JniAbort(char const*, char const*)+584)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] native: #05 pc 000b0725 /system/lib/libart.so (art::JniAbortF(char const*, char const*, ...)+60)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] native: #06 pc 000b3867 /system/lib/libart.so (art::ScopedCheck::ScopedCheck(_JNIEnv*, int, char const*)+1286)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] native: #07 pc 000bafe3 /system/lib/libart.so (art::CheckJNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+30)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] native: #08 pc 0005be7b /system/lib/libandroid_runtime.so (???)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] native: #09 pc 0007b8ef /system/lib/libandroid_runtime.so (???)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] native: #10 pc 0007925d /system/lib/libandroid_runtime.so (???)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] native: #11 pc 000796cb /system/lib/libandroid_runtime.so (???)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] native: #12 pc 00011055 /system/lib/libutils.so (android::Looper::pollInner(int)+408)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] native: #13 pc 00011149 /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+92)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] native: #14 pc 0007dd49 /system/lib/libandroid_runtime.so (android::NativeMessageQueue::pollOnce(_JNIEnv*, int)+22)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] native: #15 pc 000b5be3 /system/framework/arm/boot.oat (Java_android_os_MessageQueue_nativePollOnce__JI+102)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] at android.os.MessageQueue.nativePollOnce(Native method)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] at android.os.MessageQueue.next(MessageQueue.java:143)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] at android.os.Looper.loop(Looper.java:195)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] at android.app.ActivityThread.main(ActivityThread.java:5389)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] at java.lang.reflect.Method.invoke!(Native method)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] at java.lang.reflect.Method.invoke(Method.java:372)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)
07-29 14:50:27.480 29205-29205/com.example.dario.upmovies A/art: art/runtime/check_jni.cc:65]
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] Runtime aborting...
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] Aborting thread:
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] "main" prio=5 tid=1 Native
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] | group="" sCount=0 dsCount=0 obj=0x738ff000 self=0xb4827800
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] | sysTid=29205 nice=0 cgrp=default sched=0/0 handle=0xb6fc1bec
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] | state=R schedstat=( 2738514980 2164556658 6950 ) utm=241 stm=32 core=3 HZ=100
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] | stack=0xbe3d0000-0xbe3d2000 stackSize=8MB
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] | held mutexes= "abort lock" "mutator lock"(shared held)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] native: #00 pc 0000484c /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] native: #01 pc 00003031 /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] native: #02 pc 0024359b /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, char const*, art::mirror::ArtMethod*, BacktraceMap*)+70)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] native: #03 pc 002279e3 /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, BacktraceMap*) const+154)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] native: #04 pc 00218605 /system/lib/libart.so (art::AbortState::DumpThread(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, art::Thread*)+24)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] native: #05 pc 0021897b /system/lib/libart.so (art::AbortState::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)+634)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] native: #06 pc 00218b5d /system/lib/libart.so (art::Runtime::Abort()+72)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] native: #07 pc 000a64bb /system/lib/libart.so (art::LogMessage::~LogMessage()+1322)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] native: #08 pc 000b01cb /system/lib/libart.so (art::JniAbort(char const*, char const*)+1078)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] native: #09 pc 000b0725 /system/lib/libart.so (art::JniAbortF(char const*, char const*, ...)+60)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] native: #10 pc 000b3867 /system/lib/libart.so (art::ScopedCheck::ScopedCheck(_JNIEnv*, int, char const*)+1286)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] native: #11 pc 000bafe3 /system/lib/libart.so (art::CheckJNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+30)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] native: #12 pc 0005be7b /system/lib/libandroid_runtime.so (???)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] native: #13 pc 0007b8ef /system/lib/libandroid_runtime.so (???)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] native: #14 pc 0007925d /system/lib/libandroid_runtime.so (???)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] native: #15 pc 000796cb /system/lib/libandroid_runtime.so (???)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] native: #16 pc 00011055 /system/lib/libutils.so (android::Looper::pollInner(int)+408)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] native: #17 pc 00011149 /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+92)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] native: #18 pc 0007dd49 /system/lib/libandroid_runtime.so (android::NativeMessageQueue::pollOnce(_JNIEnv*, int)+22)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] native: #19 pc 000b5be3 /system/framework/arm/boot.oat (Java_android_os_MessageQueue_nativePollOnce__JI+102)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] at android.os.MessageQueue.nativePollOnce(Native method)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] at android.os.MessageQueue.next(MessageQueue.java:143)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] at android.os.Looper.loop(Looper.java:195)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] at android.app.ActivityThread.main(ActivityThread.java:5389)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] at java.lang.reflect.Method.invoke!(Native method)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] at java.lang.reflect.Method.invoke(Method.java:372)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] Pending exception java.lang.IllegalStateException thrown by 'void android.os.MessageQueue.nativePollOnce(long, int):-2'
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] java.lang.IllegalStateException: Unable to create layer for LinearLayout
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] at void android.os.MessageQueue.nativePollOnce(long, int) (MessageQueue.java:-2)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] at android.os.Message android.os.MessageQueue.next() (MessageQueue.java:143)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] at void android.os.Looper.loop() (Looper.java:195)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:5389)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[], boolean) (Method.java:-2)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:372)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:1020)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:815)
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294] Dumping all threads without appropriate locks held: thread list lock mutator lock
07-29 14:50:27.511 29205-29205/com.example.dario.upmovies A/art: art/runtime/runtime.cc:294]
07-29 14:50:27.512 29205-29205/com.example.dario.upmovies A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 29205 (.dario.upmovies)

最佳答案

我用下面的代码遇到了同样的问题

val t = supportFragmentManager.beginTransaction()
t.replace(R.id.main_fl, fragment)
t.setReorderingAllowed(true) ----> remove this
t.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_CLOSE) ----> remove this

所以通过删除 set treasition 和 set recoding allowed ,我解决了这个问题,我认为问题是从一个复杂的 UI fragment 移动到另一个复杂的 UI fragment 并保存两个 fragment 的实例(我正在保存 fragment 在 Activity 中)并且在替换时还使用动画导致此问题

在你的情况下,我认为你正在尝试在一些复杂的 UI 中制作动画

关于java - 避免'Layer exceeds max dimensions supported by the GPU in Android,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38659429/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com