ofxARCore
ofxARCore copied to clipboard
error: unreported exception UnavailableArcoreNotInstalledException
Hi there, I'm trying to build the exampleBasic on a Google Pixel (Android 8.0.0) and I receive the following errors:
- error: unreported exception UnavailableArcoreNotInstalledException; must be caught or declared to be thrown
- error: unreported exception CameraNotAvailableException; must be caught or declared to be thrown
I've successfully followed the oF in Android tutorial, and followed all the instructions in this repo's README.md. I realized that UnavailableArcoreNotInstalledException is thrown when the ARCore APK is not installed on this device link, so I tried the Sceneform example for Android (to check if ARCore was installed) and it worked.
The error is thrown under ofcARCoreLib, so I'm not quite sure if it's a problem on the library or in my system. I'd be thankful if anyone can help.
My setup is:
- macOS Sierra 10.12.6
- Android Studio 3.3.2
- oF 0.10.1 android
- Andoid 8.0.0 (device)

You can use my fork of the project : https://github.com/boehm-e/ofxARCore
Thanks @boehm-e I'll give try it and let you know how it works.
It definitely worked! Thanks @boehm-e
Far from perfect and an extremely unreliable hack, but I managed to get this repo to work again by simply wrapping each of the offending lines in a try/catch. For example:
try{
if(mIsReady) mSession.update().getCamera().getProjectionMatrix(mProjectionMatrix, 0, near, far);
}catch(Exception e){
// ignore
}