1

I am trying to build phonegap using command phonegap build android though it always fail with below error

D:\mydolder\myproject>phonegap build android
[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] compiling Android...
[TypeError: Cannot set property 'text' of null]
   [error] Cannot set property 'text' of null

I have downloaded android sdk and set it in Environment Variables as mentioned in this link http://docs.phonegap.com/en/2.2.0/guide_getting-started_android_index.md.html

S4beR
  • 1,872
  • 1
  • 17
  • 33
  • did you try building an example project first? Just to check if it's a code issue or something with your SDK setup is wrong. Also, be sure to use the currect documentation of phonegap, you linked an old version of 2.2: [link](http://docs.phonegap.com/en/edge/guide_platforms_android_index.md.html#Android%20Platform%20Guide), always change the dropdown on the upper right to "edge" to use most current version. – qefzec Jul 10 '14 at 08:29
  • i tried a test project and its build was fine – S4beR Jul 10 '14 at 08:54

1 Answers1

1

I got it working. It seems some resource file were not available. Once i corrected that it started to build properly. To be precise string.xml file under res/values folder had problems

S4beR
  • 1,872
  • 1
  • 17
  • 33
  • +1. I saw this error when I was trying to integrate another project. Sure enough, if you clobber strings.xml (or probably any important resource, for that matter) builds will break! – Matt Mar 18 '15 at 20:29