Check for a mismatch in your gradle file and android sdk version locally.

add   
multiDexEnabled true implementation 
'org.tensorflow:tensorflow-lite-gpu:2.2.0'

both to your gradle.build 


If all else fails downgrade your android sdk. 

On Monday, March 27, 2023 at 1:43:56 PM UTC-7 Steven Pierre wrote:

> Running into this error ```java.lang.NoSuchMethodError: No virtual method 
> getBoolean(Ljava/lang/Object;J)Z in class Lsun/misc/Unsafe; or its super 
> classes (declaration of 'sun.misc.Unsafe' appears in 
> /system/framework/core-libart.jar)
> at 
> com.google.protobuf.UnsafeUtil$JvmMemoryAccessor.getBoolean(UnsafeUtil.java:666)
> at com.google.protobuf.UnsafeUtil.getBoolean(UnsafeUtil.java:144)
> at 
> com.google.protobuf.MessageSchema.isFieldPresent(MessageSchema.java:5967)
> at 
> com.google.protobuf.MessageSchema.getSerializedSizeProto3(MessageSchema.java:2089)
> at 
> com.google.protobuf.MessageSchema.getSerializedSize(MessageSchema.java:1464)
> at 
> com.google.protobuf.GeneratedMessageLite.computeSerializedSize(GeneratedMessageLite.java:390)
> at 
> com.google.protobuf.GeneratedMessageLite.getSerializedSize(GeneratedMessageLite.java:373)
> at 
> com.google.protobuf.CodedOutputStream.computeMessageSizeNoTag(CodedOutputStream.java:927)
> at 
> com.google.protobuf.CodedOutputStream.computeMessageSize(CodedOutputStream.java:715)
> at com.google.protobuf.SchemaUtil.computeSizeMessage(SchemaUtil.java:675)
> at 
> com.google.protobuf.MessageSchema.getSerializedSizeProto2(MessageSchema.java:1551)
> at 
> com.google.protobuf.MessageSchema.getSerializedSize(MessageSchema.java:1464)
> at 
> com.google.protobuf.GeneratedMessageLite.computeSerializedSize(GeneratedMessageLite.java:387)
> at 
> com.google.protobuf.GeneratedMessageLite.getSerializedSize(GeneratedMessageLite.java:373)
> at 
> com.google.protobuf.GeneratedMessageLite.getSerializedSize(GeneratedMessageLite.java:382)
> at 
> com.google.protobuf.AbstractMessageLite.toByteArray(AbstractMessageLite.java:72)
> at 
> com.google.android.apps.youtube.app.common.devicecapabilities.XenoEffectTextureProcessorTest.setEffect_returnsSuccessfulFuture(XenoEffectTextureProcessorTest.java:101)```
> when adding a test for protobuf parsing in this cl 
> https://critique.corp.google.com/cl/519762270. Here is the full link to 
> the error: 
> https://fusion2.corp.google.com/invocations/ab032a75-9dac-424e-ae64-764d376fc00d/targets/%2F%2Fjavatests%2Fcom%2Fgoogle%2Fandroid%2Fapps%2Fyoutube%2Fapp%2Fcommon%2Fdevicecapabilities:XenoEffectTextureProcessorTest/tests
>  
> .
>
> Looking online it says this most commonly occur on a protobuf version 
> mismatch but that is not the case here when I run blaze query. Am I missing 
> an import or is this a potential bad interaction with the jni in the test?

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/235e3f3f-677e-4634-87bd-80720c18e08fn%40googlegroups.com.

Reply via email to