0

I'm trying to play with new phonegap-cli main focus is to setup wp8 platform and when running command:

  phonegap build wp8

It tries to use PhoneGap Build, which I presume happens because it hasn't found my installed SDK in any path.

I tried to test my thesis and ran this command:

  phonegap local build wp8

And it returns this error: enter image description here

I have .NET Framework v4.0 installed, so this path exists:

C:\Windows\Microsoft.NET\Framework\v4.0.30319

So the only thing I think happens is that phonegap can't find where SDK is installed, so I have been searching through the documentation and I couldn't find anything regarding which Environment Variable PhoneGap checks.

So I would really appreciate any kind of help here.

TheCodeDestroyer
  • 763
  • 9
  • 29
  • What's the output of `echo %path%`? – Paul Mougel Nov 22 '13 at 09:28
  • It has no path to sdk, but the thing I was wondering actually what would be the proper path to SDK I know I have it in "C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0" should it be pointed to tools folder? – TheCodeDestroyer Nov 22 '13 at 10:23

2 Answers2

1

Please make sure that you have added the framework path to the system PATH variable.

In my case it was the above reason and also related to Ant installed and configuration.

Purus
  • 5,701
  • 9
  • 50
  • 89
  • Are you sure Ant is needed as I don't see that anywhere in the docs? – TheCodeDestroyer Nov 22 '13 at 12:36
  • It was the problem for me when I was trying to build. Download Ant and configure to your path as mentioned in its docs – Purus Nov 22 '13 at 12:37
  • 1
    OK it had nothing to do with Ant, I had to to add Framework path to the PATH, although it didn't seem logical as you can see from screenshot it knows about the location where .NET 4.0 is... – TheCodeDestroyer Nov 22 '13 at 12:59
  • 1
    Good to know that you solved it. Edited my response to make it useful for others too. – Purus Nov 22 '13 at 13:07
0

Alternatively you can use phonegap's online build service:

https://build.phonegap.com/

It works like a charm and is free for 1 private project.

Mads Buch
  • 344
  • 2
  • 10
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – benka Apr 25 '14 at 09:32
  • @Mads Buch The issue was with local build not PhoneGap build – TheCodeDestroyer Apr 29 '14 at 06:06
  • @benka thank you, I will keep that in mind. TheCodeDestroyer I see. I did not know if you were aware of the service. It might have solved your problem. the response was made in good faith. – Mads Buch Apr 30 '14 at 07:47