0
votes

Trying to build a cordova app using senchaCMD I am also using EXTJS framework. Following the guide on their documentation:

Generating the app on the console:

sencha -sdk /path/to/Framework generate app MyApp /path/to/MyApp

Then modifying the app.json file on the root folder under builds block:

"builds":{
      "classic": {
           "toolkit": "classic",
           "theme": "theme-triton"
      },
      "modern": {
           "toolkit": "modern",
           "theme": "theme-cupertino",
           "packager": "cordova",
           "cordova": {
           "config": {
                  "platforms": "android",
                  "id": "com.mydomain.MyApp"
            }
    }
}
}

Saved it and run the sencha cordova init:

sencha cordova init com.mycompany.MyApp MyApp

After that cordova directory can be seen on my Project directory As said on the documentation I added the the another build on the builds block named "native" so the app.json file will be looked like this:

"builds":{
        "native": {
            "packager": "cordova",
            "cordova" : {
                 "config": {
                     "platforms": "ios"
                     "id": "com.mydomain.MyApp"
                 }
             }
         }
 }

Saved it and tried to run the sencha command on the console:

sencha app build native

That's the time I always get the ff error on the cmd:

[ERR]Failed to resolve dependency Ext.app.Application for file MyApp.Application [ERR]BUILD FAILED [ERR] com.sencha.exceptions.ExNotFound: Unknown definition for dependency: Ext.app.Application

Anyone has idea on why is this happening since I already followed the step-by-step procedure on sencha documentation.

Will really much appreciate any help. Thanks!

2

2 Answers

1
votes

When you add native to your builds make sure you add the "toolkit" and "theme"

Try this:

"builds":{
    "native": {
       "toolkit": "modern",
       "theme": "theme-cupertino",
        "packager": "cordova",
        "cordova" : {
             "config": {
                 "platforms": "ios",
                 "id": "com.mydomain.MyApp"
             }
         }
     }

}

0
votes

So it looks like you are using ExtJS 6 - a relatively new version of the framework, and also not free. My first instinct is to post this issue to Sencha's forums.

However, taking a stab at a solution, I think this might be an issue with Sencha's build configuration.

Since CMD is tripping up on Ext.app.Application, I would guess that it is not finding the entire framework.

In the file app/.sencha/sencha.cfg, make sure

app.framework.version=6.0.0.227
app.cmd.version=6.0.0.92

are set correctly for the versions you have.

*edit - also to narrow down whether this is an issue with the native packager, try a build command like testing or package.