1. #1
    Sencha Premium Member Zdeno's Avatar
    Join Date
    Nov 2009
    Location
    Prague
    Posts
    415
    Vote Rating
    18
    Zdeno will become famous soon enough

      0  

    Default Windows 7 - Android - native not found

    Windows 7 - Android - native not found


    When I follow all instruction in docs and run
    Code:
    sencha app build native
    or
    Code:
    sencha app build -run native
    Nothing happen. I see message like:
    Code:
    [INF] [shellscript] C:\Users\Michal\Projects\MyApp\phonegap>phonegap local build android
    [INF] [shellscript] [phonegap] compiling Android...
    [INF] [shellscript] [phonegap] successfully compiled Android app
    but there is no native package in build folder. Other commands like production or package works well.

    I tried cordova library instead of phonegap with same result. No error but no apk file in build folder.

    Run dont install application into emulator. Everything was fine in previous version when there wasnt support for phonegap/cordova.

  2. #2
    Sencha - Sencha Touch Dev Team
    Join Date
    Oct 2010
    Posts
    90
    Vote Rating
    21
    RossGerbasi will become famous soon enough RossGerbasi will become famous soon enough

      0  

    Default


    I am confused by your message. You say "nothing happens" but you also say you see a "message like this" can you explain what exactly is happening?

    If after running that task you ARE seeing a message like you posted the build files will be inside the Cordova structure now. When building with Cordova we let them take over the native build process. The idea here is to work WITH Cordova/PhoneGap not attempt to abstract it.

    If it is building properly you should see your apk inside {app}/cordova/platforms/android/bin and your .app inside {app}/platforms/ios/build

    If you are not seeing your emulator run properly please attempt to run the andorid emulator manually and make sure it is up on the screen and running 'adb devices' from the terminal is reporting a emulator and id. then attempt to do the 'sencha app build -run native'

    Also I am not sure I understand what you mean by "Everything was fine in previous version when there wasnt support for phonegap/cordova." In the previous version there simply were no commands like this for Cordova/PhoneGap so it was using a totally different mechanism. If you still want to use the older packaging you could just not initialize Cordova or PhoneGap in your app.
    Ross Gerbasi
    Sencha Inc | Senior Software Engineer

  3. #3
    Sencha Premium Member Zdeno's Avatar
    Join Date
    Nov 2009
    Location
    Prague
    Posts
    415
    Vote Rating
    18
    Zdeno will become famous soon enough

      0  

    Default


    I apologize if you are confused. I guess there must be problem with generating apk file but i dont see anything in console with debug option either.


    I checked files inside cordova/phonegap folder and there isnt any bin folder.


    Because current version dont start android emulator, I opened it manually and application isnt installed (perhaps because the apk file isnt generated)


    In previous version was native package generated inside package folder so question is why did you put the file outside of this structure.

    Code:
    >sencha -sdk C:\Users\Michal\bin\Sencha\touch-2.3.0 generate app MyApp MyApp
    >cd MyApp
    >sencha cordova init e476c935-3a88-44da-8254-233a6ad32552
    I changed configuration inside following files:
    cordova.local.properties
    packager.json
    Then I run
    Code:
    >sencha app build native
    Maybe i do something wrong but i really dont know what.

  4. #4
    Sencha - Sencha Touch Dev Team
    Join Date
    Oct 2010
    Posts
    90
    Vote Rating
    21
    RossGerbasi will become famous soon enough RossGerbasi will become famous soon enough

      0  

    Default


    Ahh I see.

    First thing is you do not have to use Cordova or PhoneGap to package natively. It is recommended you do with Cmd 4 and Touch 2.3, but if you really wish to use the older method you can still package with the Sencha Native Packager. Simply do not run 'sencha cordova init' on your project and you will still be using the older method.

    If you do decide to use Cordova or PhoneGap there are a couple things that I can see that are wrong here. First off Cordova does not use Packager.json at all. You will not need to make any modifications to that file. All those modifications are done using Cordova's config.xml or inside native projects themselves.

    But the main thing I believe is wrong is the Application ID you are entering here:

    "sencha cordova init e476c935-3a88-44da-8254-233a6ad32552"

    I can understand how this maybe confusing but the ApplicationId is not your Sencha Application Id. This is your native App ID. On iOS this is tied to your provisioning profile. If you do not know this or simply do not want to deal with it right now, you can always change it later inside of the cordova config files in your project. This id should be in reverse domain format and look something like this

    com.mydomain.MyAppName

    It seems that the ID you are supplying for Cordova is breaking Android builds. Can you please try a ID that matches that format or you may simply omit the id and run 'sencha cordova init' this will generate a fake ID of 'foo.bar.YourAppName'.

    Hopefully this points you in the right direction
    Ross Gerbasi
    Sencha Inc | Senior Software Engineer

  5. #5
    Sencha Premium Member Zdeno's Avatar
    Join Date
    Nov 2009
    Location
    Prague
    Posts
    415
    Vote Rating
    18
    Zdeno will become famous soon enough

      0  

    Default


    However I wanted try Cmd 4 + ST 2.3 because cmd finaly support native packaging for application which needs library like Cordova or PhoneGap. Another thing was migrate ST 2.2 application into 2.3 because ST finally have touch grid. In previous version i simply used Mitchells extension.

    Oh I see now. So Application ID isnt ID from app.json but variable from packager.json which I used in ST 2.2 application.

    After I changed the ID, everything works fine so ID is the key.

    Should I ask you how do you sign the application? I didn't find relevant information for ST 2.3.
    Thank you

  6. #6
    Sencha - Sencha Touch Dev Team
    Join Date
    Oct 2010
    Posts
    90
    Vote Rating
    21
    RossGerbasi will become famous soon enough RossGerbasi will become famous soon enough

      0  

    Default


    Glad to hear the AppId fixed things up.

    I am assuming you are talking Android specifically for a signed app to goto the Google Play store. There is a great response here on Stack Overflow on how to generate a self signed cert for your PhoneGap generated APK file.

    http://stackoverflow.com/questions/1...cation-package

    Also you can look into remote building with PhoneGap Build as this seems to be the way they would like people to do signed apps. This may not be an option for you though and in that case you can use jarsigner to get the app ready for distribution.
    Ross Gerbasi
    Sencha Inc | Senior Software Engineer

  7. #7
    Sencha Premium Member Zdeno's Avatar
    Join Date
    Nov 2009
    Location
    Prague
    Posts
    415
    Vote Rating
    18
    Zdeno will become famous soon enough

      0  

    Default


    I've certificate from previous version and i know how to generate self signed certificate for android application. However if ST 2.3 dont use packager.json when you initialize cordova, where you can put information about certificate (path, alias, password)? Does the new version support signing?

  8. #8
    Sencha - Sencha Touch Dev Team
    Join Date
    Oct 2010
    Posts
    90
    Vote Rating
    21
    RossGerbasi will become famous soon enough RossGerbasi will become famous soon enough

      0  

    Default


    We do not use Packager.json at all for Cordova & PhoneGap, that file is Sencha native packager specific.

    Again the point of the Cordova and PhoneGap Packager is to allow people that want to package using that build system to do so. We recommend going this route as it has a huge community backing and a lot of support. This also means that we do not handle the native build process. Cmd will build the application and get it into the right place for Cordova to take over.

    When you want to sign your application using Cordova or PhoneGap you need to follow there system of doing so. Which for android right now seems to signing your apk or using PhoneGap build.
    Ross Gerbasi
    Sencha Inc | Senior Software Engineer

Thread Participants: 1