New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in Api 16 lib 1.0.0-beta3.10 #477

Closed
rodolfoizidoro opened this Issue Jan 10, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@rodolfoizidoro
Copy link

rodolfoizidoro commented Jan 10, 2019

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

Emulator Google Api 16

Project min api 16
Target sdk api 27
Compile api 27

Steps to Reproduce

Use library 1.0.0-beta3.10 in android with api 16.

Expected Behavior

Open Camera

Actual Behavior

01-10 12:10:02.312 4509-4509/ E/AndroidRuntime: FATAL EXCEPTION: main java.lang.RuntimeException: Unable to start activity ComponentInfo{.MaskCameraActivity}: android.view.InflateException: Binary XML file line #11: Error inflating class com.camerakit.CameraKitView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084) at android.app.ActivityThread.access$600(ActivityThread.java:130) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4745) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) at dalvik.system.NativeStart.main(Native Method) Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class com.camerakit.CameraKitView at android.view.LayoutInflater.createView(LayoutInflater.java:613) at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater.createCustomViewInternal(CalligraphyLayoutInflater.java:211) at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater.access$000(CalligraphyLayoutInflater.java:20) at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater$PrivateWrapperFactory2.onCreateView(CalligraphyLayoutInflater.java:302) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680) at android.view.LayoutInflater.rInflate(LayoutInflater.java:746) at android.view.LayoutInflater.inflate(LayoutInflater.java:489) at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater.inflate(CalligraphyLayoutInflater.java:60) at android.view.LayoutInflater.inflate(LayoutInflater.java:396) at android.view.LayoutInflater.inflate(LayoutInflater.java:352) at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) at MaskCameraActivity.onCreate(MaskCameraActivity.kt:35) at android.app.Activity.performCreate(Activity.java:5008) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)  at android.app.ActivityThread.access$600(ActivityThread.java:130)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)  at android.os.Handler.dispatchMessage(Handler.java:99)  at android.os.Looper.loop(Looper.java:137)  at android.app.ActivityThread.main(ActivityThread.java:4745)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:511)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)  at dalvik.system.NativeStart.main(Native Method)  Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.constructNative(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:417) at android.view.LayoutInflater.createView(LayoutInflater.java:587) at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater.createCustomViewInternal(CalligraphyLayoutInflater.java:211)  at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater.access$000(CalligraphyLayoutInflater.java:20)  at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater$PrivateWrapperFactory2.onCreateView(CalligraphyLayoutInflater.java:302)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)  at android.view.LayoutInflater.inflate(LayoutInflater.java:489)  at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater.inflate(CalligraphyLayoutInflater.java:60)  at android.view.LayoutInflater.inflate(LayoutInflater.java:396)  at android.view.LayoutInflater.inflate(LayoutInflater.java:352)  at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)  at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)  at MaskCameraActivity.onCreate(MaskCameraActivity.kt:35)  at android.app.Activity.performCreate(Activity.java:5008)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)  at android.app.ActivityThread.access$600(ActivityThread.java:130)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)  at android.os.Handler.dispatchMessage(Handler.java:99)  at android.os.Looper.loop(Looper.java:137)  at android.app.ActivityThread.main(ActivityThread.java:4745)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:511)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)  at dalvik.system.NativeStart.main(Native Method)  Caused by: java.lang.ExceptionInInitializerError at com.camerakit.CameraPreview.<init>(CameraPreview.kt:77) at com.camerakit.CameraKitView.obtainAttributes(CameraKitView.java:269) at com.camerakit.CameraKitView.<init>(CameraKitView.java:238) at java.lang.reflect.Constructor.constructNative(Native Method)  at java.lang.reflect.Constructor.newInstance(Constructor.java:417)  at android.view.LayoutInflater.createView(LayoutInflater.java:587)  at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater.createCustomViewInternal(CalligraphyLayoutInflater.java:211)  at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater.access$000(CalligraphyLayoutInflater.java:20)  at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater$PrivateWrapperFactory2.onCreateView(CalligraphyLayoutInflater.java:302)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)  at android.view.LayoutInflater.inflate(LayoutInflater.java:489)  at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater.inflate(CalligraphyLayoutInflater.java:60)  at android.view.LayoutInflater.inflate(LayoutInflater.java:396)  at android.view.LayoutInflater.inflate(LayoutInflater.java:352)  at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)  at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)  at MaskCameraActivity.onCreate(MaskCameraActivity.kt:35)  at android.app.Activity.performCreate(Activity.java:5008)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)  at android.app.ActivityThread.access$600(ActivityThread.java:130)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)  at android.os.Handler.dispatchMessage(Handler.java:99)  at android.os.Looper.loop(Looper.java:137)  at android.app.ActivityThread.main(ActivityThread.java:4745)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:511)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)  at dalvik.system.NativeStart.main(Native Method)  Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1891]: 1140 could not load needed library 'libcamerakit-core.so' for 'libcamerakit.so' (load_library[1093]: Library 'libcamerakit-core.so' not found) at java.lang.Runtime.loadLibrary(Runtime.java:370) at java.lang.System.loadLibrary(System.java:535) at com.camerakit.preview.CameraSurfaceView.<clinit>(CameraSurfaceView.kt:109) at com.camerakit.CameraPreview.<init>(CameraPreview.kt:77)  at com.camerakit.CameraKitView.obtainAttributes(CameraKitView.java:269)  at com.camerakit.CameraKitView.<init>(CameraKitView.java:238)  at java.lang.reflect.Constructor.constructNative(Native Method)  at java.lang.reflect.Constructor.newInstance(Constructor.java:417)  at android.view.LayoutInflater.createView(LayoutInflater.java:587)  at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater.createCustomViewInternal(CalligraphyLayoutInflater.java:211)  at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater.access$000(CalligraphyLayoutInflater.java:20)  at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater$PrivateWrapperFactory2.onCreateView(CalligraphyLayoutInflater.java:302)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)  at android.view.LayoutInflater.inflate(LayoutInflater.java:489)  at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater.inflate(CalligraphyLayoutInflater.java:60)  at android.view.LayoutInflater.inflate(LayoutInflater.java:396)  at android.view.LayoutInflater.inflate(LayoutInflater.java:352)  at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)  at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)  at MaskCameraActivity.onCreate(MaskCameraActivity.kt:35)  at android.app.Activity.performCreate(Activity.java:5008)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)  at android.app.ActivityThread.access$600(ActivityThread.java:130)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)  at android.os.Handler.dispatchMessage(Handler.java:99)  at android.os.Looper.loop(Looper.java:137)  at android.app.ActivityThread.main(ActivityThread.java:4745)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:511)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)  at dalvik.system.NativeStart.main(Native Method) 

captura de tela 2019-01-10 as 12 14 30

<com.camerakit.CameraKitView android:id="@+id/cameraKitView" android:layout_width="match_parent" android:layout_height="match_parent" android:adjustViewBounds="true" android:keepScreenOn="true" app:camera_flash="off" app:camera_focus="auto" app:camera_permissions="camera"/>

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

@emersoncloud

This comment has been minimized.

Copy link
Contributor

emersoncloud commented Jan 23, 2019

Hey @rodolfoizidoro thanks for letting us know about this issue! We've added the fixes to both v1.0.0-beta3.11 as well as 0.13.5. We've made your changes ourselves to prevent the need for a Contributor License Agreement. We truly appreciate your contributions to CameraKit, without your PR we wouldn't have made these changes.

Go ahead and give either of the versions a try! Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment