Giter VIP home page Giter VIP logo

Comments (5)

istima avatar istima commented on July 26, 2024 4

@tpsiaki thanks for the recommendation, Tim!
I've tried to put resources within both raw and assets folder in my project, but the Sceneform SDK have troubles accessing it.

I'm receiving FileNotFoundException for all the resources:

   java.util.concurrent.CompletionException: java.io.FileNotFoundException: No package found for authority: android.resource://com.aita.arprofile/raw/sceneform_default_light_probes
        at com.google.ar.sceneform.rendering.LightProbe.lambda$loadInBackground$1(LightProbe.java:208) 

The path it's using is fine' I've checked with the following code:

public static Uri resourceToUri(Context context, int resID) {
      return Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" +
              context.getResources().getResourcePackageName(resID) + '/' +
              context.getResources().getResourceTypeName(resID) + '/' +
              context.getResources().getResourceEntryName(resID) );
  }

from sceneform-android-sdk.

istima avatar istima commented on July 26, 2024 4

If you'd be able to share what exactly does your plugin do with the project what would be a great help.

After further investigation, I discovered that I can't get access to raw resources at all when I apply 'com.android.dynamic-feature' plugin to my AR project and using LoadHelper.resourceToUri() method.

from sceneform-android-sdk.

tpsiaki avatar tpsiaki commented on July 26, 2024

@volhakaleda - We are working on enabling the Sceneform gradle plugin for non-Android projects. This will be available in an upcoming release.

At the moment, since the Sceneform plugin requires an Android App project, the best workaround is to create a simple Android project (e.g. you could use any template in Android Studio), and import your assets into that project. When you build that project, SFBs will be generated where you placed them during import. Copy these SFBs into your feature module project placing them in assets or res/raw as you desire. These SFBs will now be loadable by Sceneform just as if they were imported in this project.

I will leave this issue open until we release the Gradle plugin that supports all Gradle projects.

from sceneform-android-sdk.

istima avatar istima commented on July 26, 2024

ARdynamicfeature.zip
Here is the project that reproduces the issues.
Just open CameraTestActivity and you'll what I am talking about. When I use com.google.ar.sceneform.ux.ArFragment it would fail to load due to the following errors: https://pastebin.com/JjXd5wdA.
Loading texture another way in my project is not an issue. The way it is harcoded within Sceneform SDK is the real issue that is blocking the usage of ARFragment

from sceneform-android-sdk.

abramyan avatar abramyan commented on July 26, 2024

The Sceneform plugin is now compatible with any gradle project.

from sceneform-android-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.