Wednesday, June 1, 2016

ERROR: build.xml:taskdef A class needed by class com.android.ant.GetUiTargetTask cannot be found: com/android/utils/ILogger


ERROR:
~/.buildozer/android/platform/android-sdk-XX/tools/ant/build.xml:taskdef A class needed by class com.android.ant.GetUiTargetTask cannot be found: com/android/utils/ILogger

Context:
Running ant debug for buildozer



SOLUTION:

  1. Back up the Lib folder in /usr/share/ant (check by using whereis ant) of original ant installation.
  2. Make a link of ~/.buildozer/android/platform/android-sdk-XX/tools/lib and copy it to /usr/share/ant so that /usr/share/ant/lib points to ~/.buildozer/android/platform/android-sdk-XX/tools/lib




If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Tuesday, May 31, 2016

How to input ${sdk.dir} to build.xml | Apache Ant | Ubuntu

Assuming, $ANDROID_HOME (environmental variable ) refers to android sdk directory, you can inject the ANDROID_HOME  into the sdk.dir property using the following ant command.

$ ant debug -Dsdk.dir=$ANDROID_HOME

ANDROID_HOME must be an absolute path such as /home/username/something/android-sdk





If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Mouse cursor not visible | Ubuntu


SOLUTION:
sudo modprobe -r psmouse
sudo modprobe psmouse




If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

android update project: command not found | Ubuntu


Context:
Running android update project

ERROR:
command not found

Solution:

  1. export ANDROID_HOME=/Applications/android-sdks
  2. Add Tools to PATH
    • export PATH=${PATH}:${ANDROID_HOME}/tools
  3. Add platform-tools to PATH
    • export PATH=${PATH}:${ANDROID_HOME}/platform-tools






If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

ERROR: subprocess.CalledProcessError: Command '['ant', 'debug']' returned non-zero exit status 1 | Ubuntu | Buildozer


Context:
Running buildozer android debug

ERROR:
subprocess.CalledProcessError: Command '['ant', 'debug']' returned non-zero exit status 1

SOLUTION:

  1. Go to ~/.buildozer/android/platform/android-sdk-24/tools/ant
  2. Run ant debug
  3. You will find issues.
  4. Sort them out.






If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Monday, May 30, 2016

ERROR: Target id 'android-xx' is not valid. Use 'android list targets' to get the target ids | Buildozer | Ubuntu


ERROR:
Target id 'android-xx' is not valid. Use 'android list targets' to get the target ids.
...
...
...
File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ant', 'debug']' returned non-zero exit status 1

SOLUTION:

  1. Upgrade ant that is linked to Buildozer
  2. Install using sudo apt-get install ant.
  3. If ant is already installed and it is latest, just change the version in specification file of buildozer by following this link.




If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

ANT version change | Buildozer | Ubuntu



  1. Type which ant in terminal. 
  2. Mine resulted with /usr/bin/ant. If apache ant is not installed already, you might get an error.
  3. Uncomment #android.ant_path = line in buildozer.spec
  4. use android.ant_path = /usr/bin/ant 
  5. Now you can control the upgrades of ant and get it updated in buildozer automatically. Otherwise, there will be two instances (can be two different versions) in same machine.






If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged