failed to find target with hash string 'android-22'

后端 未结 10 1220
花落未央
花落未央 2020-11-27 20:16

I have updated android studio with latest version and then after googling I also updated Android SDK with API 18 but still it gives the same error.

10条回答
  •  心在旅途
    2020-11-27 20:25

    I created a new Cordova project, which created with latest android target android level 23. when i run it works. if i changed desire android target value from 23 to 22. and refresh the Gradle build from the Andoid Studio. now it's fail when i run it. i got the following build error.

    project-android /CordovaLib/src/org/apache/cordova/CordovaInterfaceImpl.java Error:(217, 22) error: cannot find symbol method requestPermissions(String[],int)

    I changed the target level in these files.

    project.properties
    AndroidManifest.xml

    and inside CordovaLib folder.

    project.properties

    However, i also have another project which is using the android target level 22, whenever i run that project, it runs. Now my question is can we specify the desire android level at the time of creating the project?

提交回复
热议问题