Software Archive
Read-only legacy content
17061 讨论

Windows Phone 8.1 Build fails

Sam_Deepak
初学者
2,504 次查看

 

Hi,

Could someone please help me in fixing this build issue. I am trying to give a build for windows phone 8.1 from intel xdk. It fails saying as below:

Command finished with error code 2: cmd /s /c "...\Howmuch\platforms\windows\cordova\build.bat --release --verbose --phone"
ERROR building one of the platforms: Error: cmd: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 2
    at ChildProcess.whenDone (D:\Developer\cordova\5.1.1\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:134:23)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:818:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

 

 I have attached the screenshot of XDK build log page and detailed error log. Please review and advice ASAP.

 

Regards,

Sam Deepak.

0 项奖励
17 回复数
PaulF_IntelCorp
2,504 次查看

Sam, need to look one line further back in your build error log for the answer:

package.phone.appxmanifest(20,78): error APPX3207: App manifest references the wide 310x150 logo image 'images\Wide310x150Logo.scale-240.png' which is larger than the maximum image file size. It must be no larger than 204,800 bytes. [...\Howmuch\platforms\windows\CordovaApp.Phone.jsproj]

One of your image files is too big.

0 项奖励
Sam_Deepak
初学者
2,504 次查看

Hi Paul,

I skipped 310x150, 434x210, 744x360 sized images (from launch icons), then it worked. Can you advice if there is any problem I would face due to this.

Regards,

Sam Deepak.

0 项奖励
Sam_Deepak
初学者
2,504 次查看

Hi Paul,

After building it without any error by skipping images that created error, now the app crashes on launching it. The app has been built for windows phone 8.1.

Could you please advice what could be the reasons for crash.

 

Regards,

Sam Deepak.

0 项奖励
PaulF_IntelCorp
2,504 次查看

We're still working out why some apps crash with Windows Phone 8.1 builds. So far it appears to be something about the IE11 Mobile webview that Cordova uses when building for WP8.1. It appears to be very sensitive to the version of jQuery you use. Are you using App Designer to create your app? Does your app include jQuery?

0 项奖励
Sam_Deepak
初学者
2,504 次查看

 

Hi Paul,

Yes, I am using jquery 2.x version. I did not use App Designer, I am using Intel App Framework.3.0. But I created a test app by a Hello World template example., It loads fine, but on click of a button, I am running a javascript to alert the user which is not working, but I changed it to change the color which is surprisingly working. 

I am quire confused. Can you please advice.

 

Regards,

Sam Deepak.

0 项奖励
PaulF_IntelCorp
2,504 次查看

The alert() function does not work in the Windows device webviews... so you won't see any alert messages. I found this shim library, which might help (https://github.com/MSOpenTech/winstore-jscompat), but I haven't had time to check it out and see how well it helps.

0 项奖励
Sam_Deepak
初学者
2,504 次查看

Hi Paul,

I have placed the script you suggested (winstore-jscompat) before all scripts in the html page, it solved the crash problem. Thanks Paul, If there is any other issue I am going to face, I will come back.

0 项奖励
PaulF_IntelCorp
2,504 次查看

Thanks for the feedback, Sam. I hope to do the same test with a few other apps I have here that are failing, very hopeful that the script will resolve this problem for those apps, as well!

0 项奖励
Stefano_C_
初学者
2,504 次查看

I'm getting the same error in XDK (no Visual Studio).

I've tried reducing icon images size (in Kb.,,, are less than limit indicated), but still no way to build app for windows phone.
Otherwise Windows App works fine, but I need to get WindowsPhone App.

Any suggesion?

 

0 项奖励
Pamela_H_Intel
主持人
2,504 次查看

Stefano - There are many reasons you might get a build failure. Please attach your full build log.

0 项奖励
Stefano_C_
初学者
2,504 次查看

Pamela H. (Intel) wrote:

Stefano - There are many reasons you might get a build failure. Please attach your full build log.

 

I sent log file transcription in p.m.

0 项奖励
Sam_Deepak
初学者
2,504 次查看

Hi,

Please skip 310x150, 434x210, 744x360 sized images (from launch icons), then it should work. This is what I did and worked for me.

0 项奖励
Stefano_C_
初学者
2,504 次查看

Sam Deepak wrote:

Hi,

Please skip 310x150, 434x210, 744x360 sized images (from launch icons), then it should work. This is what I did and worked for me.

Intel XDK doesn't allow to skip them.

I've even tried to remove from configuration file, but while building it recovers and use the previous version of 310x150, 150x150 images.

I don't know what other ways try to get app for Windows Phone built

0 项奖励
Sam_Deepak
初学者
2,504 次查看

Please delete the previous build from the app dev center. here you go https://appcenter.html5tools-software.intel.com/csd/controlpanel.aspx . And then after deleting the builds, give a fresh build and see if it works.

0 项奖励
Stefano_C_
初学者
2,504 次查看

Sam Deepak wrote:

Please delete the previous build from the app dev center. here you go https://appcenter.html5tools-software.intel.com/csd/controlpanel.aspx . And then after deleting the builds, give a fresh build and see if it works.

 

Done also this, but nothing changes.

0 项奖励
Pamela_H_Intel
主持人
2,504 次查看

Stefano - It looks like your icon images are too large. The first error in your build log is:

package.phone.appxmanifest(20,78): error APPX3207: App manifest references the wide 310x150 logo image 'images\Wide310x150Logo.scale-140.png' which is larger than the maximum image file size. It must be no larger than 204,800 bytes. [...\i-Wed\platforms\windows\CordovaApp.Phone.jsproj]<br>

We changed our build system last week and published a new XDK version yesterday (3088). We made changes that help our tools work better with Windows icons and splashscreens. I recommend upgrading your XDK version and build again. As always, be sure to create backup copies of your projects before upgrading.

0 项奖励
Stefano_C_
初学者
2,504 次查看

Pamela H. (Intel) wrote:

Stefano - It looks like your icon images are too large. The first error in your build log is:

package.phone.appxmanifest(20,78): error APPX3207: App manifest references the wide 310x150 logo image 'images\Wide310x150Logo.scale-140.png' which is larger than the maximum image file size. It must be no larger than 204,800 bytes. [...\i-Wed\platforms\windows\CordovaApp.Phone.jsproj]<br>

We changed our build system last week and published a new XDK version yesterday (3088). We made changes that help our tools work better with Windows icons and splashscreens. I recommend upgrading your XDK version and build again. As always, be sure to create backup copies of your projects before upgrading.

 

Hi Pamela,

I saw these error, but my icon files have right dimensions in pixels and are smaller in bytes.

I've upgraded to last version released yesterday, but I still get the same issues.
Thanks

0 项奖励
回复