1

I am working on cordova for a while and the project was work without any error yesterday I try to get the latest version from TFS and then I faced this error

D:\projects\mycordovaProject>cordova platforms add android Adding android project... Error: Cannot call method 'replace' of undefined

I try to remove all plugins and platforms but the problem didn't solve and I try to create new project it's created and working perfectly and I try to take a project to run in another laptop, sitll not working with same error.

2
  • remove all platforms before what you have installed and then try again Commented Jan 28, 2016 at 11:00
  • I'm having this issue on running iOS version. Commented Feb 20, 2017 at 17:12

1 Answer 1

1

the problem was in config.xml replace

<widget android-packageName=""

with

<widget id="" 
Sign up to request clarification or add additional context in comments.

1 Comment

This worked for me without replacing just adding 'id'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.