You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "jcesarmobile (JIRA)" <ji...@apache.org> on 2018/02/24 23:28:00 UTC

[jira] [Closed] (CB-13919) Android WebViews - Docs Missing Steps/Confusing

     [ https://issues.apache.org/jira/browse/CB-13919?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jcesarmobile closed CB-13919.
-----------------------------
    Resolution: Duplicate

Yeah, the embedded use case is extremely out of date.
There is already an issue for tracking it CB-9393.

It has a few PRs where it was an attempt to update it but in the end they were closed, you can take a look at them as despite being closed, they have most of the information you need.

> Android WebViews - Docs Missing Steps/Confusing
> -----------------------------------------------
>
>                 Key: CB-13919
>                 URL: https://issues.apache.org/jira/browse/CB-13919
>             Project: Apache Cordova
>          Issue Type: Bug
>    Affects Versions: cordova-android-7.0.0
>            Reporter: Greg Berns
>            Priority: Major
>
> I am having some issues walking through this document. I suspect that the project has been updated and the docs just haven't kept up. Someone may just generally want to review the article and update it.
> [https://github.com/apache/cordova-docs/blob/master/www/docs/en/dev/guide/platforms/android/webview.md]
> (I haven't contributed anything before so if I did anything wrong, apologies)
>  
> Issues:
> Issue #1 - Step 1 and 2
> Doc says:
> "Download it from [cordova.apache.org|http://cordova.apache.org/]and unzip its Android package.
> Navigate to the Android package's {{/framework}} directory and run {{ant jar}}. It creates the Cordova {{.jar}} file, formed as {{/framework/cordova-x.x.x.jar}}."
> If I download the source from "http://apache.claz.org/cordova/platforms/" "[cordova-android-7.0.0.tgz|http://apache.claz.org/cordova/platforms/cordova-android-7.0.0.tgz]", open it (on Mac), terminal into the 'framework' folder, then execute `{{ant jar`, the following error occurs:}}
> ```
> BUILD FAILED
> /Users/gb/temp/package/framework/build.xml:42: You need to create the file 'local.properties' by running 'android update project -p .' here.
> ```
> {{If I add a `local.properties` file, and add `}}
> sdk.dir=/usr/local/Cellar/android-sdk/24.4.1_1` to it, then the error goes away.
>  
> Also, 'android update project -p .'  is not a valid command anymore, so that instruction might need to be updated.
>  
> Issue #2 - Step 4
>  
> "Add the following to the application's {{/res/xml/main.xml}} file, with the {{layout_height}}, {{layout_width}} and {{id }}modified to suit the application:"
>  
> I don't see this file in my Cordova project. Its not in `/res/xml/` or `/platforms/android/res/xml/`. Is it supposed to be created?
>  
> Issue #3 - Step 5
>  
> "Modify the activity so that it implements the {{CordovaInterface}}. It should implement the included methods. You may wish to copy them from {{/framework/src/org/apache/cordova/CordovaActivity.java}}, or else implement them on your own. The following code fragment shows a basic application that relies on the interface. Note how the referenced view id matches the {{id}} attribute specified in the XML fragment shown above:"
>  
> This step is a bit confusing.
>  
> What Activity should I modify? Is the intention to create a new class and inherit from the 'CordovaActivity.java' class? Are we talking about the 'MainActivity' file in my Android project?
> I'd assume if Java classes are being modified they need to be put in a place where they won't be overwritten if the 'platforms' folder gets overwritten (since it seems like thats a new-ish~ thing in Cordova)
>  
> Issue #4 - Step 9
>  
> "Copy the {{config.xml}} file from {{/framework/res/xml}} to the project's {{/res/xml}} directory."
>  
> I don't see this folder exist anywhere: '/framework/res/xml'
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org