mpinvidio
mpinvidio

Reputation: 509

Sencha Touch: Unable to Build Package: com.sencha.exceptions.ExNotFound: Unknown definition for dependency

I have a Sencha Touch App and also a Sencha Touch Package with the following basic structure:

MyApp

 /app

 /packages/MyPackage

When I try to build the package by executing:

sencha package build

(inside packages/MyPackage)

I get the following error:

[ERR] Failed to resolve dependency Ext.data.writer.Writer for file Ext.ux.MyClass [ERR] [ERR] BUILD FAILED [ERR] com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.data.writer.Writer [ERR] [ERR] Total time: 1 second [ERR] The following error occurred while executing this line: /MyApp/packages/MyPackage/.sencha/package/build-impl.xml:137: The following error occurred while executing this line: /MyApp/packages/MyPackage/.sencha/package/js-impl.xml:32: com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.data.writer.Writer

MyClass extends Ext.data.writer.Writer, in the following way:

Ext.define('Ext.ux.MyClass', {
extend: 'Ext.data.writer.Writer',
alias: 'writer.myclass',

I understand that during the compiling process the source of the class Ext.data.writer.Writer cannot be determined. How can I solve this? Thank you!

Upvotes: 1

Views: 5292

Answers (2)

Gabriel Kohen
Gabriel Kohen

Reputation: 4286

In your sencha.cfg you should set:

package.framework=touch

It will add the framework to the classpath

Upvotes: 1

mpinvidio
mpinvidio

Reputation: 509

OK Guys, I was able to build my package by editing the following config file:

/MyApp/packages/MyPackage/.sencha/package/sencha.cfg

I added the touch framework to the package classpath.

Before:

package.classpath=${package.dir}/src

After

package.classpath=${package.dir}/src,${touch.dir}

Upvotes: 0

Related Questions