Coder Social home page Coder Social logo

Comments (14)

bradmartin avatar bradmartin commented on September 4, 2024

Error is on line 387 of the first file in the stack trace. So it's throwing from core file-system on android.

The line is : javaFile.getParentFile().mkdirs(); - so the parent file is returning null causing the issue. Not sure why. Seems like a file is missing.

from ui-lottie.

kryptus36 avatar kryptus36 commented on September 4, 2024

Right, and the filename in question is a json file, which exists in App_Resources/Android/src/main/assets so I'm a little confused.

from ui-lottie.

farfromrefug avatar farfromrefug commented on September 4, 2024

What s the src value ?

from ui-lottie.

kryptus36 avatar kryptus36 commented on September 4, 2024

src="1801-fireworks.json"

The loaded function just has a console.log call in it (and never fires, obviously)

I'm running the latest nativescript available

from ui-lottie.

farfromrefug avatar farfromrefug commented on September 4, 2024

@kryptus36 you did not set any path to the file. It simply cant find it. You need to add the path tothe file

from ui-lottie.

kryptus36 avatar kryptus36 commented on September 4, 2024

I'm misunderstanding then. From the examples and demo code I thought the path was relative to App_Resources/Android/src/main/assets

What should the path be?

from ui-lottie.

farfromrefug avatar farfromrefug commented on September 4, 2024

@kryptus36 depends on where you put it. It works like any resource handling in . like image https://v7.docs.nativescript.org/ui/components/image

from ui-lottie.

kryptus36 avatar kryptus36 commented on September 4, 2024

When I download LottieLogo1.json from the sample dir on this project and put it in app/assets/lotttie/LottieLogo1.json Then set

<StackLayout> <Lottie:LottieView src="~/assets/lottie/LottieLogo1.json" height="130" loop="true" autoPlay="true" loaded="{{ lottieLoaded }}" /> </StackLayout>

I get

Unable to parse composition

from ui-lottie.

farfromrefug avatar farfromrefug commented on September 4, 2024

Much better now please share your package.json.

from ui-lottie.

kryptus36 avatar kryptus36 commented on September 4, 2024

Thanks for your time on this.

{
  "scripts": {
    "lint": "tslint 'app/**/*.ts' -t verbose"
  },
  "description": "The new way to get bingo information!",
  "license": "SEE LICENSE IN <your-license-filename>",
  "repository": "<fill-your-repository-here>",
  "dependencies": {
    "@nativescript-community/ui-lottie": "^4.3.0",
    "@nativescript-community/ui-pager": "^13.0.11",
    "@nativescript/appversion": "^2.0.0",
    "@nativescript/core": "8.1.5",
    "@nativescript/firebase": "^11.1.3",
    "@nativescript/geolocation": "^7.0.0",
    "@nativescript/iqkeyboardmanager": "^2.0.0",
    "@nativescript/secure-storage": "^3.0.0",
    "@nativescript/theme": "^3.0.0",
    "@nstudio/nativescript-exoplayer": "^5.0.6",
    "@proplugins/nativescript-masked-text-field": "^6.0.0",
    "@proplugins/nativescript-orientation": "^2.5.0",
    "@triniwiz/nativescript-pager": "^13.0.0",
    "@types/node": "^12.12.7",
    "moment": "^2.27.0",
    "moment-timezone": "^0.5.28",
    "nativescript-audio": "^6.2.6",
    "nativescript-google-maps-sdk": "^3.0.2",
    "nativescript-insomnia": "^2.0.0",
    "nativescript-mqtt": "^3.0.1",
    "nativescript-sentry": "^2.0.0",
    "nativescript-ui-listview": "^9.0.2",
    "nativescript-ui-sidedrawer": "^9.0.3",
    "nativescript-webview-interface": "^1.4.4",
    "util": "^0.12.4"
  },
  "devDependencies": {
    "@nativescript/android": "8.1.1",
    "@nativescript/ios": "8.1.0",
    "@nativescript/types": "~8.0.0",
    "@nativescript/webpack": "~5.0.0-beta.0",
    "node-sass": "^4.14.1",
    "tslint": "^6.1.1",
    "typescript": "~4.0.0"
  },
  "prettier": {
    "singleQuote": true,
    "semi": true
  },
  "gitHead": "c06800e52ee1a184ea2dffd12a6702aaa43be4e3",
  "readme": "NativeScript Application",
  "main": "./app/app.ts"
}

from ui-lottie.

farfromrefug avatar farfromrefug commented on September 4, 2024

Ok that wont help.as you are using ^. Because of that i dont know which version you are using. You need to look this up in your project

from ui-lottie.

kryptus36 avatar kryptus36 commented on September 4, 2024

"name": "@nativescript-community/ui-lottie",
"version": "4.3.0",
"description": "NativeScript plugin to expose AirBnB Lottie library",
"main": "lottie",

from ui-lottie.

farfromrefug avatar farfromrefug commented on September 4, 2024

@kryptus36 just released 4.3.1 which fixes urls like 1801-fireworks.json
I didnt know about this syntax and it now works.
About your latest issue it is a bit weird i cant reproduce it. Let me know how it goes with latest version

from ui-lottie.

kryptus36 avatar kryptus36 commented on September 4, 2024

Seems to be working now. Much appreciated!

from ui-lottie.

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.