cordova ubuntu: An error occurred while listing Android targets

前端 未结 4 797
深忆病人
深忆病人 2020-12-05 18:47

I\'m trying add the android platform to my cordova project, though I get the error:

$ cordova platform add android -d
cordova library for \"android\" already         


        
4条回答
  •  有刺的猬
    2020-12-05 19:04

    Please Refer the Question

    An error occurred while listing Android targets

    and the Link developer.android.com/tools/devices/managing-avds-cmdline.html

    Most probably the path variable pointing to this android was wrong. I had used %ANDROID_HOME% as variable and scaled the same to path variables %ANDROID_HOME%\SDK\TOOLS. This method doesn't work. Experimentally resolved by directly pointing to the Tools and Platform Tools.

    Just based on what I did and it worked for me. Hope You get the Issue resolved

    I had faced the Issue even after the Cordova check_reqs was working correctly without providing any error.But on adding a new platform this error was still being raised. The above method personaly resolved my issue.

提交回复
热议问题