Hi Wanming

Thank you for your response.

In the meantime we were able to find the problem. ProGuard emitted warnings 
regarding classes from Android. As soon as we disabled these warnings, as was 
also done in Chromium [1], the build worked again.

[1] 
https://chromium.googlesource.com/chromium/src/+/b5c3f8a04315769ad6253f2f4cebcaa250ab3ef0%5E!/#F0

The rules we added to the ProGuard definition are as follows:

-dontwarn android.view.*
-dontwarn android.webkit.*
-dontwarn android.app.assist.*

Cheers

> On 27 Nov 2015, at 10:08, Lin, Wanming <[email protected]> wrote:
> 
> Hi, Troxler
> 
> Thank you for trying Crosswalk!
> 
> But I cannot reproduce this issue with below steps:
> 1. $ cordova create foo (cordova CLI = 5.4.0)
> 2. $ cd foo & cordova platform add android
> 3. $ cordova plugin add cordova-plugin-crosswalk-webview  (1.4.0 version with 
> Crosswalk 15+)
> 4. $ cordova build android --release
> 
> No error occurs, and two apks have been generated.
>    android-armv7-release-unsigned.apk  
>    android-x86-release-unsigned.apk
> 
> And I also sign one of them with below steps:
> 1. $ keytool -genkey -v -keystore foo.keystore -alias foo -keyalg RSA 
> -keysize 2048 -validity 10000
> 2. $ jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore 
> foo.keystore android-x86-release-unsigned.apk  foo
> 3. $ zipalign -v 4 android-x86-release-unsigned.apk.apk foo.apk
> 
> foo.apk can install & launch successfully.
> 
> What is your cordova CLI version? Could you please provide some more info for 
> us? Maybe there's something wrong with your android env.
> 
> Thanks,
> Wanming
> 
> -----Original Message-----
> From: Crosswalk-help 
> [mailto:[email protected]] On Behalf Of 
> Troxler Silvan
> Sent: Friday, November 27, 2015 4:31 PM
> To: [email protected]
> Subject: [Crosswalk-help] xwalkVersion 15+: Build error with --release 
> argument
> 
> Hi
> 
> We’ve run into build errors when using cordova-plugin-crosswalk-webview 1.4.0 
> with the following configuration:
> <preference name="xwalkVersion" value="15+”/>
> 
> It works fine with 14+. It also works with 15+ and "cordova build android", 
> but using “cordova build android —release” results in the following error:
> 
> 
> 
> :createXwalkCommandLineFileArmv7Release
> :generateArmv7ReleaseResValues UP-TO-DATE :generateArmv7ReleaseResources 
> UP-TO-DATE :mergeArmv7ReleaseResources UP-TO-DATE 
> :processArmv7ReleaseManifest UP-TO-DATE :processArmv7ReleaseResources 
> UP-TO-DATE :generateArmv7ReleaseSources UP-TO-DATE :compileArmv7ReleaseJava 
> UP-TO-DATE :lintVitalArmv7Release :compileArmv7ReleaseNdk UP-TO-DATE 
> :proguardArmv7Release
> Note: there were 2 duplicate class definitions.
>      
> (http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass)
> Warning: library class android.app.Activity depends on program class 
> android.app.assist.AssistContent
> Warning: library class android.view.View depends on program class 
> android.view.ViewStructure
> Warning: library class android.view.View depends on program class 
> android.view.ViewStructure
> Warning: library class android.view.View depends on program class 
> android.view.ViewStructure
> Warning: library class android.view.ViewGroup depends on program class 
> android.view.ViewStructure
> Warning: library class android.webkit.WebView depends on program class 
> android.view.ViewStructure
> Warning: library class android.widget.TextView depends on program class 
> android.view.ViewStructure
> Warning: there were 7 instances of library classes depending on program 
> classes.
>         You must avoid such dependencies, since the program classes will
>         be processed, while the library classes will remain unchanged.
>         
> (http://proguard.sourceforge.net/manual/troubleshooting.html#dependency)
> :proguardArmv7Release FAILED
> 
> FAILURE: Build failed with an exception.
> 
> * What went wrong:
> Execution failed for task ':proguardArmv7Release'.
>> java.io.IOException: Please correct the above warnings first.
> 
> * Try:
> Run with --stacktrace option to get the stack trace. Run with --info or 
> --debug option to get more log output.
> 
> BUILD FAILED
> 
> Total time: 8.512 secs
> 
> /Users/.../cordova/platforms/android/cordova/node_modules/q/q.js:126
>                    throw e;
>                    ^
> Error code 1 for command: /Users/.../cordova/platforms/android/gradlew with 
> args: 
> cdvBuildRelease,-b,/Users/.../cordova/platforms/android/build.gradle,-Dorg.gradle.daemon=true
> ERROR building one of the platforms: Error: 
> /Users/.../cordova/platforms/android/cordova/build: Command failed with exit 
> code 1 You may not have the required environment or OS to build this project
> Error: /Users/.../cordova/platforms/android/cordova/build: Command failed 
> with exit code 1
>    at ChildProcess.whenDone 
> (/Users/.../.nvm/versions/node/v4.1.1/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
>    at emitTwo (events.js:87:13)
>    at ChildProcess.emit (events.js:172:7)
>    at maybeClose (internal/child_process.js:817:16)
>    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
> 
> 
> 
> 
> So far, we were not able to identify the problem. Does anybody have an idea 
> what could cause that error?
> 
> Thank you very much.
> 
> Cheers
> 
> _______________________________________________
> Crosswalk-help mailing list
> [email protected]
> https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help
> 
> 

_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help

Reply via email to