I am able to successfully build and run the samples but i cannot get a bare-bones AR application working. The app starts, the wikitude splash fades in and out but the camera never starts. In the console i see the following errors:I/OpenGLRenderer:
D/libEGL: eglInitialize EGLDisplay = 0x9c7ff3cc W/AudioCapabilities: Unsupported mime audio/mpeg-L1 W/AudioCapabilities: Unsupported mime audio/mpeg-L2 D/libEGL: eglInitialize EGLDisplay = 0xaddfa4c4 W/AudioCapabilities: Unsupported mime audio/x-ms-wma W/AudioCapabilities: Unsupported mime audio/x-ima W/CameraBase: An error occurred while connecting to camera: 0 E/libEGL: called unimplemented OpenGL ES API W/VideoCapabilities: Unrecognized profile 2130706433 for video/avc E/CameraPreviewBase: Exception on setting up Camera java.lang.RuntimeException: Fail to connect to camera service at android.hardware.Camera.<init>(Camera.java:568) at android.hardware.Camera.open(Camera.java:405) at com.wikitude.architect.CameraPreviewBase.j(ProGuard:471) at com.wikitude.architect.CameraPreviewBase.getCamera(ProGuard:398) at com.wikitude.architect.CameraPreviewBase.i(ProGuard:406) at com.wikitude.architect.CameraPreviewBase.surfaceCreated(ProGuard:381) at android.view.SurfaceView.updateWindow(SurfaceView.java:712) at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:209) at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:1014) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2510) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1437) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7397) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:920) at android.view.Choreographer.doCallbacks(Choreographer.java:695) at android.view.Choreographer.doFrame(Choreographer.java:631) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:906) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:158) at android.app.ActivityThread.main(ActivityThread.java:7225) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) W/VideoCapabilities: Unsupported mime video/wvc1 W/VideoCapabilities: Unsupported mime video/x-ms-wmv W/DisplayListCanvas: DisplayListCanvas is started on unbinded RenderNode (without mOwningView)
<!-- do not support small resolution screens --> <supports-screens android:smallScreens="false" android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:xlargeScreens="true" />
public class MainActivity extends AppCompatActivity { private static final String TAG = MainActivity.class.getSimpleName(); protected boolean theIsLoadingFlag = false; protected static final String WIKITUDE_SDK_KEY = "REDACTED";
public void onResume() { super.onResume(); theArchitectView.onResume(); }
protected void onPause() { super.onPause();
if (theArchitectView != null) { theArchitectView.onPause(); } }
protected void onStop() { super.onStop(); }
protected void onDestroy() { super.onDestroy();
if (theArchitectView != null) { theArchitectView.onDestroy(); } }
public void onLowMemory() { super.onLowMemory();
if (theArchitectView != null) { theArchitectView.onLowMemory(); } } }
Any help is greatly appreciated.
thanks,
Greg
G
Greg
said
almost 7 years ago
ok i figured it out. For anyone else that has this problem there are two ways to fix it. For me, the simple way was to just downgrade the targetedSkVersion to 21. There was a tooltip i hadn't noticed in the AndroidManifest.xml that indicated the <uses-sdk> tag is ignored in favor of what's specified in gradle build script. I didn't realize this was the case so that tag is not helpful so i had to just adjust the build and that did the trick. the second way is to use the new permissions approach which you can see detailed here: https://inthecheesefactory.com/blog/things-you-need-to-know-about-android-m-permission-developer-edition/en
Greg