I'm trying to build my cocos project to android.
At first, I ran the following command:
cocos run -s {my_project_path} -p android
And I got errors of packages and symbols that weren't found, here is the first error:
error: package org.apache.http does not exist
import org.apache.http.Header;
and after the list of items that weren't found:
BUILD FAILED
......\AppData\Local\Android\sdk\tools\ant\build.xml:597: The following error occurred while executing this line:
......\AppData\Local\Android\sdk\tools\ant\build.xml:716: The following error occurred while executing this line:
......\AppData\Local\Android\sdk\tools\ant\build.xml:730: Compile failed; see the compiler error output for details.
I've read that it can be because my android project version was 23.
So I edited the version field in the android.properties file to 22
and ran the next command:
cocos run -s {my_project_path} -p android --ap android-22.
The first build output lines are saying it uses the android 22 api, but in the middle of the build, for some reason it starts to use version 23 and I receive the same errors above.
Did anybody have those errors?
Thank you, Ben