Start a new topic

Native SDK OnCreate crash on Android 4.0.4 API 15

Native SDK OnCreate crash on Android 4.0.4 API 15


Documentation states that SDK should work with Android API 14 and higher. 
But I expirience null pointer crash  inside Wikitude.OnCreate function.
Same code works fine on API 19 for example.
Android Native SDK version 1.1.0.

01-12 00:29:52.273 28817-28817/_____________ E/AndroidRuntime: FATAL EXCEPTION: main

                                                                          java.lang.RuntimeException: Unable to start activity ComponentInfo{____.MainActivity}: java.lang.NullPointerException

                                                                              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)

                                                                              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)

                                                                              at android.app.ActivityThread.access$600(ActivityThread.java:123)

                                                                              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)

                                                                              at android.os.Handler.dispatchMessage(Handler.java:99)

                                                                              at android.os.Looper.loop(Looper.java:137)

                                                                              at android.app.ActivityThread.main(ActivityThread.java:4424)

                                                                              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:784)

                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)

                                                                              at dalvik.system.NativeStart.main(Native Method)

                                                                           Caused by: java.lang.NullPointerException

                                                                              at com.wikitude.internal.WikitudeSDKInternal.b(WikitudeSDKInternal.java)

                                                                              at com.wikitude.internal.WikitudeSDKInternal.a(WikitudeSDKInternal.java)

                                                                              at com.wikitude.WikitudeSDK.onCreate(WikitudeSDK.java)

                                                                              at com.zebra.eto.ledaardemo.MainActivity.onCreate(MainActivity.java:57)

                                                                              at android.app.Activity.performCreate(Activity.java:4465)

                                                                              at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)

                                                                              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)

                                                                              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981) 

                                                                              at android.app.ActivityThread.access$600(ActivityThread.java:123) 

                                                                              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147) 

                                                                              at android.os.Handler.dispatchMessage(Handler.java:99) 

                                                                              at android.os.Looper.loop(Looper.java:137) 

                                                                              at android.app.ActivityThread.main(ActivityThread.java:4424) 

                                                                              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:784) 

                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 

                                                                              at dalvik.system.NativeStart.main(Native Method) 

 

Cut from build.gradle

 


android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
applicationId "__________"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}


 

What is actual minimum Android API version for Native SDK?

 

I guess I need to clarify that my device is Epson Moverio BT-200 Smart Glasses and WikitudeSDKExample from Wikitude Epson SDK 4.0.3 runs fine.

Hi Sergey,
With the latest 5.x release of our SDK, Android API level 16  (4.1) is required.

Best regards

Andreas

Hi,

Thanks for reply. I guess you need to update your documentation then to avoid confusion.

Is it the same for Android Native SDK 1.1.0 ? Initial question was about Native SDK. 

We never tried the native SDK in combination with the Epson Moverio. It's not our most used platform ;)

Best regards

Andreas

Android SDK JavaScript not working with Samsung Tablet OS 4.4.2.

Also, I am unable to download the sample app from play store. It is showing "Device is not compatible with version". Please helpme out.

Hi Prafulla,


Based on the message you see, the device you are using is not supported by our Wikitude SDK. You can refer here https://www.wikitude.com/external/doc/documentation/latest/android/supporteddevicesandroid.html#supported-android-devices for detailed information regarding the minimum technical requirements your phone should have in order to be able to develop our SDK.


Thanks

Eva

Thanks for reply Eva. I am using only Image recognition  feature. I guess it should work. Please confirm the same. 

Hi,


If your phone does not have a compass and/or accelerometer and you do not want to use any GeoLocation features then you can disable them so your app will work with your device. 

  • You simply need to remove any geo location reference from the StartupConfiguration.Feature class.  You have to use AR.hardware.sensors.enabled flag (more details). You should only set its value to false in 2D recognition scenarios, otherwise this will break your Geo-experience as all required sensors (compass, accelerometer, gps) are disabled/ignored. So what you need to do is include this line of code AR.hardware.sensors = false; in your javascript file.
  • In addition, you can remove "<uses-feature android:name="android.hardware.sensor.compass" android:required="true" />" from the manifest.

Thanks

Eva


Login or Signup to post a comment