Software Archive
Read-only legacy content
17061 讨论

Including Cordova on building fails

Jochen_M_
初学者
598 次查看

Hello everyone,

I wrote an app which includes Cordova (In App-Browsing etc.). On my Android 5.1 device using "Intel App Preview" everything works great. But when I build my application and install it on the same device, some things doesn´t work. I can´t open web content inside an iframe for example. I use the new "Cordova Hybrid Mobile App Platform"-method to build my app. When I use the legacy method, everything works fine, but the .apk file is 6 MB larger here.

I thought, that I would do something wrong, but I have the same problem with example programs from other authors. I also installed Intel XDK on another "clean" Windows 8.1 machine, but the same error occurs here, too. It also occurs, even when I start a fresh new app.

Is there a current problem with the build server?

Yours
Jochen M.

0 项奖励
5 回复数
John_H_Intel2
员工
598 次查看

What version of the XDK do you have installed? 1912 is the latest. 1878 had an issue where plugins got confused sometimes. Install the latest, then create a new project and copy your html/javascript to the new project and select the plugins you require and try building again.

0 项奖励
John_H_Intel2
员工
598 次查看

Instead of an iframe, why dont you use the Cordova inappbrowser plugin?

0 项奖励
Jochen_M_
初学者
598 次查看

P. S. the "InAppBrowser" plugin is selected in the properties.

0 项奖励
Anusha_M_Intel1
598 次查看

Hi Jochen,

When you built the iFrame app, did you use the URL that came with the app or change it?

Some URLs do not render in iFrame due to security issues. You best bet is the InAppBrowser plugin. Here is the link to its documentation: http://docs.phonegap.com/en/edge/cordova_inappbrowser_inappbrowser.md.html

For example, if you want to display the webpage in the click of a button, this is all you have to do:

    $(document).on("click", ".uib_w_3", function(evt)
    {
        /* your code goes here */ 
         var ref = window.open('https://software.intel.com/en-us/xdk/articles/android-splash-screens-using-nine-patch-png', '_blank', 'location=yes');
    });

0 项奖励
Jochen_M_
初学者
598 次查看

Thank you! In Intel APP Preview it works fine again, but when I build the APP, it doesn't work anymore. Strange...

0 项奖励
回复