Android Build Error: Package does not exist


#1

Having some trouble building Android:

After installing the Android SDK, Java, Ant, etc, I go to build Android and look like this :

package org.apache.http.util does not exist

[javac] /Users/erikaugustjohnson/Desktop/cordova/johnny-stewart/platforms/android/CordovaLib/src/org/apache/cordova/CordovaResourceApi.java:33: error: package org.apache.http.util does not exist
[javac] import org.apache.http.util.EncodingUtils;
[javac] ^
[javac] /Users/erikaugustjohnson/Desktop/cordova/johnny-stewart/platforms/android/CordovaLib/src/org/apache/cordova/CordovaResourceApi.java:421: error: cannot find symbol
[javac] byte[] data = base64 ? Base64.decode(dataPartAsString, Base64.DEFAULT) : EncodingUtils.getBytes(dataPartAsString, “UTF-8”);
[javac] ^
[javac] symbol: variable EncodingUtils
[javac] location: class CordovaResourceApi
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 2 errors
[javac] 3 warnings

BUILD FAILED
/Users/erikaugustjohnson/Library/Android/sdk/tools/ant/build.xml:597: The following error occurred while executing this line:
/Users/erikaugustjohnson/Library/Android/sdk/tools/ant/build.xml:716: The following error occurred while executing this line:
/Users/erikaugustjohnson/Library/Android/sdk/tools/ant/build.xml:730: Compile failed; see the compiler error output for details.

Total time: 3 seconds

/Users/erikaugustjohnson/Desktop/cordova/johnny-stewart/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: ant with args: debug,-f,/Users/erikaugustjohnson/Desktop/cordova/johnny-stewart/platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
ERROR building one of the platforms: Error: /Users/erikaugustjohnson/Desktop/cordova/johnny-stewart/platforms/android/cordova/build: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: /Users/erikaugustjohnson/Desktop/cordova/johnny-stewart/platforms/android/cordova/build: Command failed with exit code 1
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1008:16)
at Process.ChildProcess._handle.onexit (child_process.js:1080:5)


#2

Same here. Are you also trying to build for Android 6.0(API 23) using ant? @erikaugust. If you solve, please tell. If I do I will too