RootEncoder
RootEncoder copied to clipboard
(OpenGlView) Component not rendered in preview
The preview does not show. Error :-
The following classes could not be instantiated:
- com.pedro.rtplibrary.view.OpenGlView (Open Class, Show Exception, Clear Cache)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE.
**Exception Details:-**
java.lang.NoClassDefFoundError: android/opengl/EGL14
at com.pedro.encoder.input.gl.SurfaceManager.<init>(SurfaceManager.java:42)
at com.pedro.rtplibrary.view.OpenGlViewBase.<init>(OpenGlViewBase.java:53)
at com.pedro.rtplibrary.view.OpenGlView.<init>(OpenGlView.java:56)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:351)
at org.jetbrains.android.uipreview.ViewLoader.loadClass(ViewLoader.java:200)
at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:161)
at com.android.tools.idea.rendering.LayoutlibCallbackImpl.loadView(LayoutlibCallbackImpl.java:294)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:417)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:428)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:332)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:965)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:1127)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:72)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1101)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:1130)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:72)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1101)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088)
at android.view.LayoutInflater.inflate(LayoutInflater.java:686)
at android.view.LayoutInflater.inflate(LayoutInflater.java:505)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:359)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:436)
at com.android.tools.idea.layoutlib.LayoutLibrary.createSession(LayoutLibrary.java:121)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:717)
at com.android.tools.idea.rendering.RenderTask.lambda$inflate$9(RenderTask.java:873)
at com.android.tools.idea.rendering.RenderExecutor$runAsyncActionWithTimeout$3.run(RenderExecutor.kt:192)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Hello,
According with the log your device haven't EGL14 implemented. EGL14 should be implemented in most of devices with API 17+. If you don't need filters or similar you can use SurfaceView instead of OpenGlView to avoid use opengl.
Can you tell me device model and Android API?
Hello,
According with the log your device haven't EGL14 implemented. EGL14 should be implemented in most of devices with API 17+. If you don't need filters or similar you can use SurfaceView instead of OpenGlView to avoid use opengl.
Can you tell me device model and Android API?
Hello padro, Thanks for quick replay.
Here I am not talking about camera preview, I am talking about layout preview in the android studio when I use "com.pedro.rtplibrary.view.OpenGlView" does not show.
My compileSdk is 33 and gradle-7.2
Hello, According with the log your device haven't EGL14 implemented. EGL14 should be implemented in most of devices with API 17+. If you don't need filters or similar you can use SurfaceView instead of OpenGlView to avoid use opengl. Can you tell me device model and Android API?
Hello padro, Thanks for quick replay.
Here I am not talking about camera preview, I am talking about layout preview in the android studio when I use "com.pedro.rtplibrary.view.OpenGlView" does not show.
My compileSdk is 33 and gradle-7.2
Hi, I am also having this problem. Did you resolve it?
Hello, According with the log your device haven't EGL14 implemented. EGL14 should be implemented in most of devices with API 17+. If you don't need filters or similar you can use SurfaceView instead of OpenGlView to avoid use opengl. Can you tell me device model and Android API?
Hello padro, Thanks for quick replay. Here I am not talking about camera preview, I am talking about layout preview in the android studio when I use "com.pedro.rtplibrary.view.OpenGlView" does not show. My compileSdk is 33 and gradle-7.2
Hi, I am also having this problem. Did you resolve it?
Not yet, Please download the previous android studio version (Recommend Chipmunk). It's working.
Hello, According with the log your device haven't EGL14 implemented. EGL14 should be implemented in most of devices with API 17+. If you don't need filters or similar you can use SurfaceView instead of OpenGlView to avoid use opengl. Can you tell me device model and Android API?
Hello padro, Thanks for quick replay. Here I am not talking about camera preview, I am talking about layout preview in the android studio when I use "com.pedro.rtplibrary.view.OpenGlView" does not show. My compileSdk is 33 and gradle-7.2
Hi, I am also having this problem. Did you resolve it?
Not yet, Please download the previous android studio version (Recommend Chipmunk). It's working.
Thank you!