Hello Dave,

On 5 June 2014 13:21, Dave Richardson <[email protected]> wrote:

>  Great, that's it. Working fine here now.
>

Good to hear it's working.


> P.S.; If I run into this problem again, how did you know which permissions
> were missing?
>

I just ran:

adb logcat | grep xwalk

Then narrowed it down to a permissions issue (I've seen this causing
"application has stopped working" problems before).

Elliot


>
> Dave
>
> On 5-6-2014 13:32, Smith, Elliot wrote:
>
>  On 5 June 2014 12:14, Dave Richardson <[email protected]> wrote:
>
>> That did it! Good find, the build is now successful.
>>
>> But.. there seems to be a problem with the file now. Did you try running
>> the .apk file on an emulator or mobile phone?
>> I installed on both but when running the app I got an error. It said
>> "Unfortunately, KitchenSink has stopped".
>>
>
>  I didn't, but I've gone back and tried it now. The app was crashing due
> to missing permissions which Crosswalk requires.
>
>  I manually added these two lines to
> platforms/android/AndroidManifest.xml (just before the <application>
> element):
>
>      <uses-permission
> android:name="android.permission.ACCESS_NETWORK_STATE" />
>     <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
>
>  My basic app (not kitchensink btw, just the Cordova hello world) now
> runs fine.
>
>  I will need to update the tutorial for version 6 with this information
> (these permissions are Crosswalk-specific and may not be set for a Cordova
> application). Eventually these wrinkles should be ironed out so migration
> is a lot smoother.
>
>  Elliot
>
>
>>
>> Can't be the source code of the app, because the Cordova build did run.
>> And to make sure it isn't the source or any of its plugins, I also built
>> an app with just a basic index.html "hello world" file.
>> Same story though, the .apk file installed fine, but did not run.
>>
>> Then I did the whole thing again, but now with Crosswalk 5 and that .apk
>> file did install and run successfully.
>>
>> But like you said, the tutorial was made for Crosswalk 5. And that seems
>> to work well indeed.
>> Just would've been nice to get it working with Crosswalk 6 so I can
>> use the Cordova APIs and make use of the Chromium command line.
>>
>> For now I am trying to figure out exactly what the reason is that the
>> .apk won't start.
>>
>> Regards,
>> Dave
>>
>> On 5-6-2014 11:53, Smith, Elliot wrote:
>>
>>  Hello Dave.
>>
>>  On 5 June 2014 08:27, Dave Richardson <[email protected]> wrote:
>>
>>> Yesterday I've tried to get Crosswalk Cordova 6 to work, but I can't
>>> seem to figure it out.
>>> Here are all the steps I take.
>>>
>>
>>  I have just tried building a new project based on the steps in the
>> tutorial and as outlined by you above.
>>
>>  My first comment is: did you ensure that you were using the correct
>> plugin versions? The ones listed in the tutorial are for Cordova 3.3 (which
>> is what Crosswalk Cordova 5 is based on). If you are using 3.3 plugins in a
>> 3.4 project, that might cause some issues.
>>
>>  Having said that, I also get some compilation errors when I follow the
>> steps in the tutorial for Crosswalk 6 (I stress that the instructions are
>> only applicable for Crosswalk 5, and may not be expected to work for 6
>> anyway).
>>
>>  I also tried building the projects explicitly in the order
>> xwalk_core_library/CordovaLib/android, but still get errors.
>>
>>  My environment is the same as yours, except I have Java 1.7*.
>>
>>  My errors were as follows:
>>
>>  *******
>>       [echo] Set jars path to:
>> /home/ell/dev/crosswalk/crosswalk-cordova/v6/platforms/android/CordovaLib/ant-build/classes.jar:/home/ell/dev/crosswalk/crosswalk-cordova/v6/platforms/android/CordovaLib/xwalk_core_library/ant-build/classes.jar:/home/ell/dev/crosswalk/crosswalk-cordova/v6/platforms/android/CordovaLib/xwalk_core_library/libs/xwalk_core_library_java.jar
>>
>>  -compile:
>>     [javac] Compiling 5 source files to
>> /home/ell/dev/crosswalk/crosswalk-cordova/v6/platforms/android/bin/classes
>>     [javac]
>> /home/ell/dev/crosswalk/crosswalk-cordova/v6/platforms/android/src/org/crosswalkproject/sample/v6.java:25:
>> error: cannot find symbol
>>     [javac] public class v6 extends CordovaActivity
>>     [javac]                         ^
>>     [javac]   symbol: class CordovaActivity
>>     [javac]
>> /home/ell/dev/crosswalk/crosswalk-cordova/v6/platforms/android/src/org/crosswalkproject/sample/v6.java:30:
>> error: cannot find symbol
>>     [javac]         super.onCreate(savedInstanceState);
>>     [javac]         ^
>>     [javac]   symbol:   variable super
>>     [javac]   location: class v6
>>     [javac]
>> /home/ell/dev/crosswalk/crosswalk-cordova/v6/platforms/android/src/org/crosswalkproject/sample/v6.java:31:
>> error: cannot find symbol
>>     [javac]         super.init();
>>     [javac]         ^
>>     [javac]   symbol:   variable super
>>     [javac]   location: class v6
>>     [javac]
>> /home/ell/dev/crosswalk/crosswalk-cordova/v6/platforms/android/src/org/crosswalkproject/sample/v6.java:33:
>> error: cannot find symbol
>>     [javac]         super.loadUrl(Config.getStartUrl());
>>     [javac]                       ^
>>     [javac]   symbol:   variable Config
>>     [javac]   location: class v6
>>     [javac]
>> /home/ell/dev/crosswalk/crosswalk-cordova/v6/platforms/android/src/org/crosswalkproject/sample/v6.java:33:
>> error: cannot find symbol
>>     [javac]         super.loadUrl(Config.getStartUrl());
>>     [javac]         ^
>>     [javac]   symbol:   variable super
>>     [javac]   location: class v6
>>     [javac]
>> /home/ell/dev/crosswalk/crosswalk-cordova/v6/platforms/android/src/org/crosswalkproject/sample/v6.java:27:
>> error: method does not override or implement a method from a supertype
>>     [javac]     @Override
>>     [javac]     ^
>>     [javac] 6 errors
>>
>>  BUILD FAILED
>> /home/ell/apps/android-sdk/sdk/tools/ant/build.xml:720: The following
>> error occurred while executing this line:
>> /home/ell/apps/android-sdk/sdk/tools/ant/build.xml:734: Compile failed;
>> see the compiler error output for details.
>>  *******
>>
>>  Then I noticed this entry in the classpath:
>>
>>
>> /home/ell/dev/crosswalk/crosswalk-cordova/v6/platforms/android/CordovaLib/ant-build/classes.jar
>>
>>  but the Cordova classes are in:
>>
>>
>> /home/ell/dev/crosswalk/crosswalk-cordova/v6/platforms/android/CordovaLib/bin/classes.jar
>>
>>  Digging down a bit, I find this in android/custom_rules.xml:
>>
>>          <pathconvert property="fixedJarsPath"
>> refid="project.all.jars.path">
>>            <filtermapper>
>>             <replacestring from="/bin/" to="/ant-build/"/>
>>             <replacestring from="\bin\" to="\ant-build\"/>
>>           </filtermapper>
>>         </pathconvert>
>>
>>  If I comment out the filtermapper element here (which is rewriting
>> paths containing "bin" to "ant-build"), the build succeeds. You could try
>> this work-around in the short term.
>>
>>  But it does appear there is a bug. I'll investigate and file it if
>> necessary.
>>
>>  Elliot
>>
>>   --
>> Elliot Smith
>> Senior Software Engineer
>> Intel Open Source Technology Centre
>>
>>
>>
>
>
>  --
> Elliot Smith
> Senior Software Engineer
> Intel Open Source Technology Centre
>
>
>


-- 
Elliot Smith
Senior Software Engineer
Intel Open Source Technology Centre
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help

Reply via email to