Skip to content

TypeError: Cannot read property 'AnimatedDrawable' of undefined #47

@oluwaseye

Description

@oluwaseye

VanillaJS nativescript project

app.js

var application = require("application");
application.start({ moduleName: "pages/home/home" });
var fresco = require("nativescript-fresco");
if (application.android) {
    application.onLaunch = function (intent) {
        fresco.initialize();
    };
}

home.xml

<page
  xmlns="http://schemas.nativescript.org/tns.xsd"
  xmlns:drawer="nativescript-telerik-ui/sidedrawer"
  xmlns:widgets="shared/widgets"
  xmlns:statusbar="nativescript-statusbar"
   xmlns="http://www.nativescript.org/tns.xsd"
   xmlns:nativescript-fresco="nativescript-fresco"
  loaded="pageLoaded">

<nativescript-fresco:FrescoDrawee row="0" height="160" imageUri="http://demo.megathe.me/pear/wp-content/uploads/2017/03/person24.jpg" />

Need some help. Here's the Exception from the plugin

An uncaught Exception occurred on "main" thread.
java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: 

Error calling module function 

Error calling module function 

TypeError: Cannot read property 'AnimatedDrawable' of undefined
File: "file:///data/data/org.nativescript.MyApp/files/app/tns_modules/nativescript-fresco/nativescript-fresco.js, line: 92, column: 42

StackTrace: 
	Frame: function:'', file:'file:///data/data/org.nativescript.MyApp/files/app/tns_modules/nativescript-fresco/nativescript-fresco.js', line: 92, column: 43
	Frame: function:'require', file:'', line: 1, column: 266
	Frame: function:'', file:'file:///data/data/org.nativescript.MyApp/files/app/app.js', line: 2, column: 14
	Frame: function:'require', file:'', line: 1, column: 266


TypeError: Cannot read property 'AnimatedDrawable' of undefined
File: "<unknown>, line: 1, column: 265

StackTrace: 
	Frame: function:'', file:'file:///data/data/org.nativescript.MyApp/files/app/tns_modules/nativescript-fresco/nativescript-fresco.js', line: 92, column: 43
	Frame: function:'require', file:'', line: 1, column: 266
	Frame: function:'', file:'file:///data/data/org.nativescript.MyApp/files/app/app.js', line: 2, column: 14
	Frame: function:'require', file:'', line: 1, column: 266


TypeError: Cannot read property 'AnimatedDrawable' of undefined
File: "<unknown>, line: 1, column: 265

StackTrace: 
	Frame: function:'', file:'file:///data/data/org.nativescript.MyApp/files/app/tns_modules/nativescript-fresco/nativescript-fresco.js', line: 92, column: 43
	Frame: function:'require', file:'', line: 1, column: 266
	Frame: function:'', file:'file:///data/data/org.nativescript.MyApp/files/app/app.js', line: 2, column: 14
	Frame: function:'require', file:'', line: 1, column: 266


	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5364)
	at android.app.ActivityThread.-wrap2(ActivityThread.java)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1528)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:154)
	at android.app.ActivityThread.main(ActivityThread.java:6077)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
Caused by: com.tns.NativeScriptException: 

Error calling module function 

Error calling module function 

TypeError: Cannot read property 'AnimatedDrawable' of undefined
File: "file:///data/data/org.nativescript.MyApp/files/app/tns_modules/nativescript-fresco/nativescript-fresco.js, line: 92, column: 42

StackTrace: 
	Frame: function:'', file:'file:///data/data/org.nativescript.MyApp/files/app/tns_modules/nativescript-fresco/nativescript-fresco.js', line: 92, column: 43
	Frame: function:'require', file:'', line: 1, column: 266
	Frame: function:'', file:'file:///data/data/org.nativescript.MyApp/files/app/app.js', line: 2, column: 14
	Frame: function:'require', file:'', line: 1, column: 266


TypeError: Cannot read property 'AnimatedDrawable' of undefined
File: "<unknown>, line: 1, column: 265

StackTrace: 
	Frame: function:'', file:'file:///data/data/org.nativescript.MyApp/files/app/tns_modules/nativescript-fresco/nativescript-fresco.js', line: 92, column: 43
	Frame: function:'require', file:'', line: 1, column: 266
	Frame: function:'', file:'file:///data/data/org.nativescript.MyApp/files/app/app.js', line: 2, column: 14
	Frame: function:'require', file:'', line: 1, column: 266


TypeError: Cannot read property 'AnimatedDrawable' of undefined
File: "<unknown>, line: 1, column: 265

StackTrace: 
	Frame: function:'', file:'file:///data/data/org.nativescript.MyApp/files/app/tns_modules/nativescript-fresco/nativescript-fresco.js', line: 92, column: 43
	Frame: function:'require', file:'', line: 1, column: 266
	Frame: function:'', file:'file:///data/data/org.nativescript.MyApp/files/app/app.js', line: 2, column: 14
	Frame: function:'require', file:'', line: 1, column: 266


	at com.tns.Runtime.runModule(Native Method)
	at com.tns.Runtime.runModule(Runtime.java:521)
	at com.tns.Runtime.run(Runtime.java:513)
	at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:19)
	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1024)
	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5361)
	... 8 more

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions