I wanted to try and code location based AR which shows places.I tried the android code in the following link Augmented reality android example and ended up with the following error in Redmi note 3(API 24) Nougat. I did some changes in main.xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/surface_overlay">
<SurfaceView android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/surface_camera" />
</FrameLayout>
Error
08-18 09:15:15.588 32701-32701/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: advisory.arplaces, PID: 32701
java.lang.NullPointerException: Attempt to write to field 'advisory.arplaces.arview.DataView advisory.arplaces.arview.RadarView.view' on a null object reference
at advisory.arplaces.arview.DataView.draw(DataView.java:329)
at advisory.arplaces.arview.RadarMarkerView.onDraw(ARView.java:390)