Android 场景过渡动画出现JNI错误-层超过最大值
请注意问题底部的编辑 我有两个活动:Android 场景过渡动画出现JNI错误-层超过最大值,android,android-animation,picasso,Android,Android Animation,Picasso,请注意问题底部的编辑 我有两个活动:ActivityA,ActivityB以及相关的片段:FragmentA,FragmentB图像视图v在这两个片段之间共享 一些代码:ActivityA 活动b 碎片B 5次中有4次有效。但当它不起作用时,我会得到一个非常有用的错误: W/OpenGLRenderer﹕ Layer exceeds max. dimensions supported by the GPU (1080x10659, max=4096x4096) JNI DETECTED ERRO
ActivityA
,ActivityB
以及相关的片段:FragmentA
,FragmentB
<代码>图像视图v在这两个片段之间共享
一些代码:ActivityA
活动b
碎片B
5次中有4次有效。但当它不起作用时,我会得到一个非常有用的错误:
W/OpenGLRenderer﹕ Layer exceeds max. dimensions supported by the GPU (1080x10659, max=4096x4096)
JNI DETECTED ERROR IN APPLICATION: JNI CallVoidMethodV called with pending exception 'java.lang.IllegalStateException' thrown in void android.os.MessageQueue.nativePollOnce(long, int):-2
呼叫毕加索
Picasso.with(context).load(url).centerCrop().resize(width, height).noFade().into(mView);
导致这种情况的因素很少:
在FragmentB
mView
中,使用ViewTreeObserver.OnGlobalLayoutListener动态计算位置
mView
扩展ImageView
以在两个片段中创建椭圆形效果
根ViewGroup
是一个ScrollView
最后一件事:这两项活动的主题都是
<style name="Theme" parent="Theme.AppCompat.Light"
<item name="android:windowContentTransitions">true</item>
<item name="android:windowAllowEnterTransitionOverlap">true</item>
<item name="android:windowAllowReturnTransitionOverlap">true</item>
<item name="android:windowSharedElementEnterTransition">@android:transition/move</item>
<item name="android:windowSharedElementExitTransition">@android:transition/move</item>
</style>
链接到第二个问题的讨论了发生这种情况的原因:大小限制是针对整个预呈现的目标活动,而不仅仅是转换的元素。将android:transitionGroup=“true”
添加到已转换布局中的适当位置将修复崩溃。你没有在问题中发布你的布局,所以很难知道它会去哪里,但是如果你有一个滚动视图
或其他很长的视图,那将是一个很好的开始
对于21之前的API级别,这不是问题
AppCompat.startActivity()
将在低于21的API级别上工作,但共享元素转换动画将不会运行。它将返回默认的活动转换。是否可能相关?这是警告,不是错误。如果您认为出现了错误,请发布一个更完整的日志输出,从更早开始,并继续显示这是如何导致终止或其他严重故障的。如果您能够在仿真器、Nexus设备或多个制造商的设备上重现此错误,则它可能代表Android操作系统错误。在这种情况下,如果您可以发布一个复制错误的项目,请。我还没有玩过活动转换,对于如何解决它我也没有一个模糊的概念,但是Java代码的本机崩溃在大多数情况下意味着固件问题。唯一的变量是这是某个制造商的错误还是安卓本身的错误。
W/OpenGLRenderer﹕ Layer exceeds max. dimensions supported by the GPU (1080x10659, max=4096x4096)
JNI DETECTED ERROR IN APPLICATION: JNI CallVoidMethodV called with pending exception 'java.lang.IllegalStateException' thrown in void android.os.MessageQueue.nativePollOnce(long, int):-2
Picasso.with(context).load(url).centerCrop().resize(width, height).noFade().into(mView);
<style name="Theme" parent="Theme.AppCompat.Light"
<item name="android:windowContentTransitions">true</item>
<item name="android:windowAllowEnterTransitionOverlap">true</item>
<item name="android:windowAllowReturnTransitionOverlap">true</item>
<item name="android:windowSharedElementEnterTransition">@android:transition/move</item>
<item name="android:windowSharedElementExitTransition">@android:transition/move</item>
</style>
JNI DETECTED ERROR IN APPLICATION: JNI CallVoidMethodV called with pending exception 'java.lang.IllegalStateException' thrown in void android.os.MessageQueue.nativePollOnce(long, int):-2
in call to CallVoidMethodV
art/runtime/check_jni.cc:65] from void android.os.MessageQueue.nativePollOnce(long, int)
art/runtime/check_jni.cc:65] "main" prio=5 tid=1 Runnable
art/runtime/check_jni.cc:65] | group="main" sCount=0 dsCount=0 obj=0x72fb6000 self=0xb4827800
art/runtime/check_jni.cc:65] | sysTid=6497 nice=0 cgrp=default sched=0/0 handle=0xb6f83bec
art/runtime/check_jni.cc:65] | state=R schedstat=( 1181860917 459124594 2277 ) utm=100 stm=18 core=2 HZ=100
art/runtime/check_jni.cc:65] | stack=0xbe27d000-0xbe27f000 stackSize=8MB
art/runtime/check_jni.cc:65] | held mutexes= "mutator lock"(shared held)
art/runtime/check_jni.cc:65] native: #00 pc 00004e64 /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
art/runtime/check_jni.cc:65] native: #01 pc 00003665 /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8)
art/runtime/check_jni.cc:65] native: #02 pc 00256429 /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, char const*, art::mirror::ArtMethod*)+84)
art/runtime/check_jni.cc:65] native: #03 pc 00238fe7 /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const+158)
art/runtime/check_jni.cc:65] native: #04 pc 000b191b /system/lib/libart.so (art::JniAbort(char const*, char const*)+610)
art/runtime/check_jni.cc:65] native: #05 pc 000b2055 /system/lib/libart.so (art::JniAbortF(char const*, char const*, ...)+68)
art/runtime/check_jni.cc:65] native: #06 pc 000b530f /system/lib/libart.so (art::ScopedCheck::ScopedCheck(_JNIEnv*, int, char const*)+1346)
art/runtime/check_jni.cc:65] native: #07 pc 000bd6f7 /system/lib/libart.so (art::CheckJNI::CallVoidMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list)+42)
art/runtime/check_jni.cc:65] native: #08 pc 0006244b /system/lib/libandroid_runtime.so (???)
art/runtime/check_jni.cc:65] native: #09 pc 000760c5 /system/lib/libandroid_runtime.so (android::NativeDisplayEventReceiver::dispatchVsync(long long, int, unsigned int)+40)
native: #10 pc 0007628d /system/lib/libandroid_runtime.so (android::NativeDisplayEventReceiver::handleEvent(int, int, void*)+80)
native: #11 pc 00012545 /system/lib/libutils.so (android::Looper::pollInner(int)+484)
native: #12 pc 000125ed /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+92)
native: #13 pc 00081709 /system/lib/libandroid_runtime.so (android::NativeMessageQueue::pollOnce(_JNIEnv*, int)+22)
native: #14 pc 000b3863 /data/dalvik-cache/arm/system@framework@boot.oat (Java_android_os_MessageQueue_nativePollOnce__JI+102)
at android.os.MessageQueue.nativePollOnce(Native method)
at android.os.MessageQueue.next(MessageQueue.java:143)
at android.os.Looper.loop(Looper.java:122)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke!(Native method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Fatal signal 11 (SIGSEGV), code 1, fault addr 0xfffffff0 in tid 6497