Hi,

> When trying to pack the archive, something is barfing when it becomes too 
> large (perhaps 50MB ceiling for Google Play?)

We don’t enforce any limit, but the underlying tools/libraries may have 
problems dealing with large packages.

> While the website claims you can safely ignore the error about llzw not being 
> installed, can't help thikning this may actually be relevant at this point.

It really isn’t relevant. LMZA is used as an alternative compression method to 
reduce the size of APKs but is not required and needs to be enabled explicitly.

>  much of my confusion came from not fully grokking the intended workflow 
> using "crosswalk-app create", "crosswalk-app build", and "crosswalk-pkg".

This is understandable. Crosswalk-pkg is the tool we recommend using. 
Crosswalk-app was created first, but was then superceded by crosswalk-pkg. Both 
tool can work together though. We should make this clearer in the docs

> For one thing I assumed at first glance that one might use all three commands 
> in one project. I also assumed (rightly?) that one of the first two
> commands would result in a full Android application directory, containing 
> within it the "web app" (www), and that crosswalk-pkg
> would bundle it up into the apk. Were this the case, it would be *possible* 
> to edit the default project configuration,
> using widely existing documentation.

This should be correct AFAIK.

Francesco



From: Jason Boyd <[email protected]>
Date: Tuesday 13 September 2016 at 17:46
To: "Fu, Junwei" <[email protected]>
Cc: Belem Zhang <[email protected]>, Francesco Balestrieri 
<[email protected]>, "[email protected]" 
<[email protected]>
Subject: Re: [Crosswalk-help] building crosswalk android app on mac osx

fyi -- I've been non-responsive as I'm currently traveling, but I intend to 
share back notes on what works, and hopefully can add some relevant docs to the 
project.

I believe from what I've seen that the issue is roughly:

1. My manifest file is in the parent of "www", which also contains *lots* of 
files not meant for packaging with the app.
2. crosswalk-pkg does not appear to offer any means to exclude files (e.g. 
passthru config to aapt-ignore props)
3. All steps thru compilation *appear* to succeed (though the ultimate error 
message misled me to think initially that compilation failed)
4. When trying to pack the archive, something is barfing when it becomes too 
large (perhaps 50MB ceiling for Google Play?)

While the website claims you can safely ignore the error about llzw not being 
installed, can't help thikning this may actually be relevant at this point. 
That said, crosswalk-pkg works just fine on my Mac when packaging a simple 
HelloWorld template app.

I haven't had time to do this, but I suspect a workaround/solution in my case 
will be to reorganize my project directories and/or add a build script that 
moves only the needed files into a temp dir before invoking crosswalk-pkg.

As an aside -- much of my confusion came from not fully grokking the intended 
workflow using "crosswalk-app create", "crosswalk-app build", and 
"crosswalk-pkg". For one thing I assumed at first glance that one might use all 
three commands in one project. I also assumed (rightly?) that one of the first 
two commands would result in a full Android application directory, containing 
within it the "web app" (www), and that crosswalk-pkg would bundle it up into 
the apk. Were this the case, it would be *possible* to edit the default project 
configuration, using widely existing documentation.

Is the following understanding correct?:

- crosswalk-app create -- intended for one-time use in case where no project 
exists initially; sets up *both* an Android project and an alternative "web 
app" project. Development would presumably use only one of these artifacts...
- crosswalk-app build -- intended to be used repeatedly on the Android project 
created by the above command (?), to build an executable for use in emulator
- crosswalk-pkg -- intended to be used repeatedly NOT in conjunction with the 
above commands, applied to a web app, creates entire Android project 
on-the-fly, compiles, and archives into distributable apk




On Mon, Sep 12, 2016 at 7:08 PM, Fu, Junwei 
<[email protected]<mailto:[email protected]>> wrote:
Hi Belem,

Could you please file an issue to track and borrow a Mac device for me to 
refine it?

Thanks,
Junwei
From: Crosswalk-help 
[mailto:[email protected]<mailto:[email protected]>]
 On Behalf Of Balestrieri, Francesco
Sent: Monday, September 12, 2016 2:57 PM
To: Jason Boyd; 
[email protected]<mailto:[email protected]>

Subject: Re: [Crosswalk-help] building crosswalk android app on mac osx

Hi,

Is the manifest file in the same folder from which you launch crosswalk-pkg? If 
so, could you create a subdir “foo”, copy the manifest there and run the 
command from the parent directory (crosswalk-pkg foo)? Does it help?

At least on my Mac I could reproduce your issue by running “crosswalk-pkg .”, 
but things went fine in the way I described above.

Francesco

From: Crosswalk-help 
<[email protected]<mailto:[email protected]>>
 on behalf of Francesco Balestrieri 
<[email protected]<mailto:[email protected]>>
Date: Monday 12 September 2016 at 09:55
To: Jason Boyd <[email protected]<mailto:[email protected]>>, 
"[email protected]<mailto:[email protected]>"
 
<[email protected]<mailto:[email protected]>>
Subject: Re: [Crosswalk-help] building crosswalk android app on mac osx

Hi,



From: Crosswalk-help 
<[email protected]<mailto:[email protected]>>
 on behalf of Jason Boyd <[email protected]<mailto:[email protected]>>
Date: Friday 9 September 2016 at 23:09
To: 
"[email protected]<mailto:[email protected]>"
 
<[email protected]<mailto:[email protected]>>
Subject: [Crosswalk-help] building crosswalk android app on mac osx

I realize it is documented that building crosswalk apps from OS X is not yet 
documented, but since the crosswalk-app-tools README claims OS X is supported, 
I am wondering what if anything I have not set up to do this.

I get an error when doing crosswalk-pkg, details below. I am hoping for at 
least an explanation as to what might be broken, if not a solution, as I am 
trying to determine how feasible it will be to have OS X build setup while 
targeting Android devices.

Hi,

Is the manifest file in the same folder from which you launch crosswalk-pkg? If 
so, could you create a subdir “foo”, copy the manifest there and run the 
command from the parent directory (crosswalk-pkg foo)? Does it help?

At least on my Mac I could reproduce your issue by running “crosswalk-pkg .”, 
but things went fine in the way I described above.

Francesco


Any help is appreciated.

I am running:

OS X 10.11.3 (El Capitan)
XCode Version 7.3.1 (7D1014)
Apple LLVM version 7.3.0 (clang-703.0.31)
JRE 1.8.0
Ant 1.9.7
crosswalk-app-tools 0.10.4 (crosswalk 21.51.546.6 downloaded)
Android SDK with 21, 22, 23 (5.0, 5.1, 6.0)

Have set environment vars for $JAVA_HOME, $ANDROID_HOME, $ANT_HOME, and set 
PATH accordingly.

I've tried creating a simple manifest.json as described in online docs, and 
also tried crosswalk-app manifest . to generate one, and either way I get a 
build error possibly related to an Ant build step. The output also warns that 
this version of crosswalk-app-tools is not tested with crosswalk 21, but I have 
seen no instructions on how I would control which version of crosswalk is 
downloaded.
$ crosswalk-pkg .
  Packaging /Library/WebServer/Documents/vg
  Checking host setup
  + Checking host setup for target android
  + Checking for android... ...rs/macbookpro/Library/Android/sdk/tools/android
  + Checking for ant... /Users/macbookpro/apache-ant-1.9.7/bin/ant
  + Checking for java... /usr/bin/java
*** ERROR: Checking for lzma... null
  + Checking for ANDROID_HOME... /Users/macbookpro/Library/Android/sdk/
  Initializing build dir ...folders/lw/tdlh9kzs0kb75gs5gm962qpr0000gn/T/JeTYKX
  + Copying app template from ...node_modules/crosswalk-app-tools/app-template
  + Loading 'android' platform backend
  + Building against API level android-21
  + Creating com.example.foo [done]
  + Defaulting to download channel stable
  + Looking for latest version in crosswalk/stable
  + Fetching 'stable' versions index [##########]
  + Found version '21.51.546.6' in channel 'stable'
  + Using cached crosswalk-21.51.546.6.zip
  + Extracting crosswalk-21.51.546.6.zip [##        ]
 ** WARNING: This tool has not been tested with Crosswalk 21.
  + Extracting crosswalk-21.51.546.6.zip [##########]
  + Project template created at ...0000gn/T/JeTYKX/com.example.foo/prj/android
  Importing web application
  + Source /Library/WebServer/Documents/vg
  + Destination ...tdlh9kzs0kb75gs5gm962qpr0000gn/T/JeTYKX/com.example.foo/app
  Building packages armeabi-v7a,x86
  + Loading 'android' platform backend
 ** WARNING: No usable icons found in manifest.json
 ** WARNING: Using builtin default icon
  + Adding permissions ACCESS_NETWORK_STATE,ACCES_WIFI_STATE,INTERNET
  + Updating java activity for 'debug' configuration
  + Copying app to ...pr0000gn/T/JeTYKX/com.example.foo/prj/android/assets/www
  + Updating theme.xml for display mode (fullscreen: no)
  + Using android:versionCode '20000001'
  + Building armeabi-v7a [aapt...]
 ** WARNING: BUILD FAILED
/Users/macbookpro/Library/Android/sdk/tools/ant/build.xml:928: The following 
error occurred while executing this line:
/Users/macbookpro/Library/Android/sdk/tools/ant/build.xml:946: null returned: 1
Total time: 32 seconds

*** ERROR: Building ABI 'armeabi-v7a' failed
  + Logfiles at 
/var/folders/lw/tdlh9kzs0kb75gs5gm962qpr0000gn/T/crosswalk-app-tools-com.example.foo
/usr/local/lib/node_modules/crosswalk-app-tools/src/crosswalk-pkg:572
                    throw new Error("Packaging failed");
                    ^
Error: Packaging failed
    at callback 
(/usr/local/lib/node_modules/crosswalk-app-tools/src/crosswalk-pkg:572:27)
    at Main.<anonymous> 
(/usr/local/lib/node_modules/crosswalk-app-tools/src/Main.js:314:13)
    at PlatformBase.<anonymous> 
(/usr/local/lib/node_modules/crosswalk-app-tools/android/lib/AndroidPlatform.js:1430:13)
    at PlatformBase.<anonymous> 
(/usr/local/lib/node_modules/crosswalk-app-tools/android/lib/AndroidPlatform.js:814:21)
    at ChildProcess.<anonymous> 
(/usr/local/lib/node_modules/crosswalk-app-tools/android/lib/AndroidSDK.js:226:9)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

*********

The log file for the build is verbose but the only error I see is the end:
     [aapt]     (skipping file '.npmignore' due to ANDROID_AAPT_IGNORE pattern 
'.*')     [aapt]     (skipping file '.cproject' due to ANDROID_AAPT_IGNORE 
pattern '.*')

     [aapt]     (skipping file '.project' due to ANDROID_AAPT_IGNORE pattern 
'.*')

     [aapt]     (skipping file '.npmignore' due to ANDROID_AAPT_IGNORE pattern 
'.*')

     [aapt]       Unable to add 
'/private/var/folders/lw/tdlh9kzs0kb75gs5gm962qpr0000gn/T/JeTYKX/com.example.foo/prj/android/assets/www/node_modules/grunt-qunit-amd/node_modules/phantomjs/node_modules/npmconf/node_modules/semver/semver.browser.js.gz':
 file already in archive (try '-u'?)

     [aapt] ERROR: unable to process assets while packaging 
'/private/var/folders/lw/tdlh9kzs0kb75gs5gm962qpr0000gn/T/JeTYKX/com.example.foo/prj/android/bin/com.example.foo.ap_'

     [aapt] ERROR: packaging of 
'/private/var/folders/lw/tdlh9kzs0kb75gs5gm962qpr0000gn/T/JeTYKX/com.example.foo/prj/android/bin/com.example.foo.ap_'
 failed

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help

Reply via email to