Start a new topic

android.view.InflateException: Binary XML file line #6: Error inflating cla

android.view.InflateException: Binary XML file line #6: Error inflating cla


Hi,

fixed!

while trying to isolate the problem and compare exactly with the sdk I found two difference if the manifest:

1. <supports-screens

android:smallScreens="false" android:largeScreens="true"

android:normalScreens="true" android:anyDensity="true" 

android:xlargeScreens="true" />

2. android:configChanges="orientation|screenSize"

After adding 1, the crash occure 25% of the times. and after adding 2, it's didn't happend anymore.

I guss you know better why? (-:

tnx,

Dov 

Hi,

while testing on your APK it's work! so I will try to isolate the problem.

I don't want to update the device because I want to support from 4.03.

I will let you know if I will found somting.

If you have any suggestion I will be happy to here it. (send the code, js , etc...)

 

Dov

We tested on the official Android 4.1.2 OTA version of the Samsung S3.
Please check the delivered apk that comes with the Wikitude Android SDK (WikitudeSDK_Android_4_0_0/Examples/apk) and let me know the results.
Could you please also check on other devices and check if there an OS update of your device solves the issue?

Kind regards

Hi!

Thanks for the quick replay and check!

 

which OS version you have? mine is 4.03.

I must point two points.

1. On the first time it's works good (not when returning from close screen). 

2. when I only change the "wikitudesdk.jar" to the 3 version it's working again. and 1 to 5 tries it's crash with anther issue.

 

just to verify the bug - when the app is running. close the screen with the close button. then open it (either with the close or home button) and open the lock screen.

In SDK 3 it will works and sometimes (1 to 4-5)  you will get NullPointerException

In SDK 4 it will crash 100% consistently all the times.

 

Thanks again,

Dov

Hi again,

Seems as if you're device's camera is not accessible.
Could you please try restarting it and check behavior on another S3 or Android device?
We have an S3 in the office but are not able to repproduce the issue.

Kind regards

Hi!

with the new 4.0 SDK it's happend 100% of the times.

The error is diffrent.

Thanks

Dov

This is the log:

 

07-30 22:02:22.930: E/AndroidRuntime(10870): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.iapps.threatsscanner/com.iapps.threatsscanner.ScannerActivity}: java.lang.RuntimeException: java.lang.RuntimeException: Fail to connect to camera service

07-30 22:02:22.930: E/AndroidRuntime(10870): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1970)

07-30 22:02:22.930: E/AndroidRuntime(10870): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995)

07-30 22:02:22.930: E/AndroidRuntime(10870): at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3365)

07-30 22:02:22.930: E/AndroidRuntime(10870): at android.app.ActivityThread.access$700(ActivityThread.java:128)

07-30 22:02:22.930: E/AndroidRuntime(10870): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1165)

07-30 22:02:22.930: E/AndroidRuntime(10870): at android.os.Handler.dispatchMessage(Handler.java:99)

07-30 22:02:22.930: E/AndroidRuntime(10870): at android.os.Looper.loop(Looper.java:137)

07-30 22:02:22.930: E/AndroidRuntime(10870): at android.app.ActivityThread.main(ActivityThread.java:4514)

07-30 22:02:22.930: E/AndroidRuntime(10870): at java.lang.reflect.Method.invokeNative(Native Method)

07-30 22:02:22.930: E/AndroidRuntime(10870): at java.lang.reflect.Method.invoke(Method.java:511)

07-30 22:02:22.930: E/AndroidRuntime(10870): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)

07-30 22:02:22.930: E/AndroidRuntime(10870): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)

07-30 22:02:22.930: E/AndroidRuntime(10870): at dalvik.system.NativeStart.main(Native Method)

07-30 22:02:22.930: E/AndroidRuntime(10870): Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Fail to connect to camera service

07-30 22:02:22.930: E/AndroidRuntime(10870): at com.wikitude.architect.ArchitectView.onCreate(Unknown Source)

07-30 22:02:22.930: E/AndroidRuntime(10870): at com.iapps.threatsscanner.ScannerActivity.onCreate(ScannerActivity.java:177)

07-30 22:02:22.930: E/AndroidRuntime(10870): at android.app.Activity.performCreate(Activity.java:4562)

07-30 22:02:22.930: E/AndroidRuntime(10870): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1053)

07-30 22:02:22.930: E/AndroidRuntime(10870): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1934)

07-30 22:02:22.930: E/AndroidRuntime(10870): ... 12 more

07-30 22:02:22.930: E/AndroidRuntime(10870): Caused by: java.lang.RuntimeException: Fail to connect to camera service

07-30 22:02:22.930: E/AndroidRuntime(10870): at android.hardware.Camera.native_setup(Native Method)

07-30 22:02:22.930: E/AndroidRuntime(10870): at android.hardware.Camera.<init>(Camera.java:349)

07-30 22:02:22.930: E/AndroidRuntime(10870): at android.hardware.Camera.open(Camera.java:326)

07-30 22:02:22.930: E/AndroidRuntime(10870): at com.wikitude.architect.ArchitectView.b(Unknown Source)

07-30 22:02:22.930: E/AndroidRuntime(10870): at com.wikitude.architect.ArchitectView.<init>(Unknown Source)

07-30 22:02:22.930: E/AndroidRuntime(10870): at java.lang.reflect.Constructor.constructNative(Native Method)

07-30 22:02:22.930: E/AndroidRuntime(10870): at java.lang.reflect.Constructor.newInstance(Constructor.java:417)

07-30 22:02:22.930: E/AndroidRuntime(10870): at android.view.LayoutInflater.createView(LayoutInflater.java:586)

07-30 22:02:22.930: E/AndroidRuntime(10870): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)

07-30 22:02:22.930: E/AndroidRuntime(10870): at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)

07-30 22:02:22.930: E/AndroidRuntime(10870): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)

07-30 22:02:22.930: E/AndroidRuntime(10870): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)

07-30 22:02:22.930: E/AndroidRuntime(10870): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)

07-30 22:02:22.930: E/AndroidRuntime(10870): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:280)

07-30 22:02:22.930: E/AndroidRuntime(10870): at android.app.Activity.setContentView(Activity.java:1892)

07-30 22:02:22.930: E/AndroidRuntime(10870): at com.iapps.threatsscanner.ScannerActivity.onCreate(ScannerActivity.java:153)

07-30 22:02:22.930: E/AndroidRuntime(10870): ... 15 more

 

Hi there!

Could you please check if the issue still occurs on latest Wikitude SDK 4.x and let me know the outcome?

Link to Download latest Wikitude SDK

Hi,

I am still having the same kind of crash when returning from a close phone.

But it's happned more rarly - 1 to 4 or 5.

 

can you please check this.

Again I have Samsung galaxi S3 4.03.

 

In the log you can see that the architectView has a null pointer exception.

 

07-28 23:43:35.975: E/AndroidRuntime(24337): at android.app.Activity.performCreate(Activity.java:4562)

07-28 23:43:35.975: E/AndroidRuntime(24337): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1053)

07-28 23:43:35.975: E/AndroidRuntime(24337): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1934)

07-28 23:43:35.975: E/AndroidRuntime(24337): ... 12 more

07-28 23:43:35.975: E/AndroidRuntime(24337): Caused by: java.lang.reflect.InvocationTargetException

07-28 23:43:35.975: E/AndroidRuntime(24337): at java.lang.reflect.Constructor.constructNative(Native Method)

07-28 23:43:35.975: E/AndroidRuntime(24337): at java.lang.reflect.Constructor.newInstance(Constructor.java:417)

07-28 23:43:35.975: E/AndroidRuntime(24337): at android.view.LayoutInflater.createView(LayoutInflater.java:586)

07-28 23:43:35.975: E/AndroidRuntime(24337): ... 23 more

07-28 23:43:35.975: E/AndroidRuntime(24337): Caused by: java.lang.NullPointerException

07-28 23:43:35.975: E/AndroidRuntime(24337): at com.wikitude.architect.ArchitectView.a(Unknown Source)

07-28 23:43:35.975: E/AndroidRuntime(24337): at com.wikitude.architect.ArchitectView.<init>(Unknown Source)

07-28 23:43:35.975: E/AndroidRuntime(24337): ... 26 more

 

Tnx,

Just download the latest and it work!

I was use the jar from the samples - I guss it's not updated.

 

Tnx again

 

Dov

Dov, the issue that I was experiencing on Android device went away right after Wikitude has published a new SDK for Android and I have installed it. I do not have reports from users using my app that Android App crashes since then. 

Hi,

I am new to wikitude and I have the same issue.

I implement the sdk very carfully (and have very simply hello world wikitude app), and also read the docs.

Yes I am delivering the onResume and onPause to the architectView. But it's still seems to crash after I close the screen and open it.

I have Samsung Galaxi 3 Android 4.03. 

It's a little bother me that was no answer from 4/13/14. Gabriele Boccone can you please check this issue?

any workaround will be nice too!

 

Thanks.

 

Dov

Thank you very much Gabriele! Thank you for finding some time to check my sample project and the AR world. I am very happy you were able to reproduce the issue because now I know you will fix it. How long do you think we will need to wait for the fix?  Is it realistic to expect it next week?

I checked your project and done some other test.

If I start your AR world in our sample application, then both videos are showing most of the times, but I've managed to reproduce the issue (although the error message on my test device is different), and we are working on a possible solution.

We will keep you informed about the development.

Gabriele, thank you for your response. 

I did try waiting until video is loaded but the issue is still there. Video does not appear and does not play... I have tried many times. It would work ones and then would never appear again... on iPhone though the video drawable appears right away and starts playing right away... As always I have tried on two different Android devices and the behaviour identical.  Here is javascript example: 

    

var is_video_loaded = false;

 

 var my_video = new AR.VideoDrawable(" URL TO mp4 file here ?, 0.9, {

                                            offsetX: 0,

                                            offsetY: 0,

                                            onLoaded: function videoLoaded() {

                                                 is_video_loaded = true;

                                            },

                                            onPlaybackStarted: function videoPlaying () {

                                               my_video.enabled = true;

                                            },

                                            onFinishedPlaying: function videoFinished () {

                                            my_video.playing = false;

                                            my_video.enabled = false;

                                            },

                                            onClick: function videoClicked () {

                                            if (my_video.playing) {

                                            my_video.pause();

                                            my_video.playing = false;

                                            

                                            } else {

                                            my_video.resume();

                                            my_video.playing = true;

                                            

                                            }

                                            }

                                            });

 

 var video_tracker = new AR.Trackable2DObject(this.tracker, ?target_image?, {

                                          drawables: {

                                          cam:

                                          },

                                          onEnterFieldOfVision: function onEnterFieldOfViewFn () {

                                           if(is_video_loaded)

                                               {

                                                   my_video.play(1);

                                                   my_video.playing = true;

                                               }

                                          },

                                          onExitFieldOfVision: function onExitFieldOfView() {

                                         if (my_video.playing) {

                                             my_video.stop();

                                             my_video.playing = false;

                                               

                                           }

                                          }

                                          });

 

 

Gabriele, is there a way for me to trigger video loading again? I am assuming that for some reason the video loading takes a very long time or for some reason it is not loaded when was first requested. Can I trigger the system to make it try to load video one more time?

 

 

 

The error you get is "E/VideoManager? Exception when playing video null"

This means that the media player cannot play the video, because there is no video. When you create a VideoDrawable, the video is not available until your application receives the "onLoaded()' event.

If you declare onLoaded as an empty function, your application doesn't know whether the video is loaded or not.

 
Login or Signup to post a comment