0

I am using sencha cmd 6 and trying to build native app with help of - https://docs.sencha.com/cmd/6.x/cordova_phonegap.html

I have generated Ext 6+ universal application using following command:

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

Then I have added following code in app.json -

"builds": {
         "classic": { 
            "toolkit": "classic",
             "theme": "theme-triton",
             "sass": { 
                // "save": "classic/sass/save.json" 
          } 
    },         
"native": { 
            "toolkit": "modern",
             "theme": "theme-cupertino",
             "packager": "phonegap",
             "phonegap": {
                 "config": {
                    "platforms": "ios android",
                    "id": "com.mydomain.MyApp"
                 }
             }
         }
 }

But after running sencha app build android, I am getting following exception -

 BUILD FAILED
 java.lang.NullPointerException
   at org.a
 pache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)

Also as per suggestion in Developing a PhoneGap application from sencha doc, i have modified app.json with following code -

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

But after this, following exception is coming on my console -

Failed to resolve dependency Ext.app.Application for file MyApp.Application

BUILD FAILED
com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.app.Application
Guilherme Lopes
  • 4,688
  • 1
  • 19
  • 42
Avinash T.
  • 2,280
  • 2
  • 16
  • 23

2 Answers2

1

I know this is a late answer, but it might help someone else landing on this page.

To resolve the dependency, we need to include the toolkit and theme in our build profile:

"native": {
            "toolkit": "modern",
            "theme": "theme-cupertino",
            "packager": "cordova",
            "cordova": {
                "config": {
                    "platforms": "android",
                    "id": "com.mydomain.NewApp"
                }
            }
        }

In context, the build profile should look like:

resolving Ext.Application Dependency - Click to see the build profile

user812786
  • 4,302
  • 5
  • 38
  • 50
parv kothari
  • 91
  • 1
  • 6
-2

Please find the answer to this question on following link -

https://www.sencha.com/forum/showthread.php?304530-Unable-to-create-Native-app-using-command-sencha-app-build-native

Avinash T.
  • 2,280
  • 2
  • 16
  • 23
  • -1 This Answer provides a link to a section of Sencha's support forum that requires a Premium subscription. Please specify the content of that posting here, don't link to paid services instead. – speakr Aug 28 '17 at 13:10