ofxARCore icon indicating copy to clipboard operation
ofxARCore copied to clipboard

error: unreported exception UnavailableArcoreNotInstalledException

Open guillemontecinos opened this issue 5 years ago • 4 comments

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)
Screen Shot 2019-04-02 at 11 09 04 AM 1

guillemontecinos avatar Apr 02 '19 15:04 guillemontecinos

You can use my fork of the project : https://github.com/boehm-e/ofxARCore

boehm-e avatar Apr 03 '19 10:04 boehm-e

Thanks @boehm-e I'll give try it and let you know how it works.

guillemontecinos avatar Apr 03 '19 14:04 guillemontecinos

It definitely worked! Thanks @boehm-e

guillemontecinos avatar Apr 04 '19 20:04 guillemontecinos

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
}



javl avatar Jul 31 '19 09:07 javl