title: Getting compile error: package com.twilio.sdk does not exist
body: <p>New-bee in java here.
  I'm on an ubuntu 12.04 machine.</p>
  
  <p>I am trying the Twilio API using java to make voice calls from an uiautomator test case and following the instructions provided at <a href="https://www.twilio.com/docs/java/install" rel="nofollow">https://www.twilio.com/docs/java/install</a>. I downloaded  both <code>twilio-java-sdk-3.4.2-with-dependencies.jar</code> and <code>twilio-java-sdk-3.4.2.jar</code> from <a href="http://search.maven.org/#browse|1260284827" rel="nofollow">http://search.maven.org/#browse|1260284827</a> (pre-built).</p>
  
  <p>I am using Twilio API in an uiautomator java project. I am able to build and run that uiautomator java project without implementing the Twilio API code. But if I try to use the Twilio API library, I get a compile time errors that it <strong>could not find the package</strong>. </p>
  
  <p><strong>Steps I'm doing:</strong></p>
  
  <p>1-> Open the java project in eclipse </p>
  
  <p>2-> Add the Twilio java library <code>twilio-java-sdk-3.4.2-with-dependencies.jar</code> OR <code>twilio-java-sdk-3.4.2.jar</code> via <code>BuildPath-&gt;Configure Build Path-&gt;Add External JARs</code>. </p>
  
  <p>I have following line of code to test if I can make the <code>TwilioRestClient</code> object. I have other test functions with the uiautomator and they work fine without this piece of code. Consider the following method in addition to other test methods.</p>
  
  <p><strong>test.java</strong></p>
  
  <pre><code>//Assume all other required libraries are imported
  import com.twilio.sdk.TwilioRestClient;
  
  public class testClient extends UiAutomatorTestCase {   
  
      public void testMethodGetClient(){
          try{
              TwilioRestClient client = new TwilioRestClient("ACCOUNT_SID", "AUTH_TOKEN");
              log.info("client: " + client.getAccountSid());
          }catch(Exception e){
              log.info(e.toString());
          }
      }
  }
  </code></pre>
  
  <p>I do not get any reference errors in my code before the <code>comiple/build</code> command. To believe that, if I do <code>client.</code> ,eclipse shows me all the methods available for the <code>client</code> object. So, can I assume here that my import was successful?
  Then I go the terminal and execute below command to create the <code>build.xml</code> file:</p>
  
  <p><strong>ubuntu terminal</strong></p>
  
  <pre><code>$&gt; android create uitest-project -n JARNAME -t 1 -p &lt;PATH-TO-PROJECT&gt;
  $&gt; ant clean build
  Buildfile: &lt;PATH-TO-PROJECT&gt;/build.xml
  
  -check-env:
   [checkenv] Android SDK Tools Revision 22.3.0
   [checkenv] Installed at &lt;ANDROID-SDK-PATH&gt;
  
  -pre-clean:
  
  clean:
     [delete] Deleting directory &lt;PATH-TO-PROJECT&gt;/bin
  
  -check-env:
   [checkenv] Android SDK Tools Revision 22.3.0
   [checkenv] Installed at &lt;ANDROID-SDK-PATH&gt;
  
  -build-setup:
  [getbuildtools] Using latest Build Tools: 19.0.0
       [echo] Resolving Build Target for &lt;PACKAGE-NAME&gt;...
  [getuitarget] Project Target:   Android 4.2.2
  [getuitarget] API level:        17
       [echo] ----------
       [echo] Creating output directories if needed...
      [mkdir] Created dir: &lt;PATH-TO-PROJECT&gt;/bin
      [mkdir] Created dir: /&lt;PATH-TO-PROJECT&gt;/bin/classes
  
  -pre-compile:
  
  compile:
      [javac] Compiling 33 source files to &lt;PATH-TO-PROJECT&gt;/bin/classes
      [javac] &lt;PATH-TO-PROJECT&gt;/test.java:15: package com.twilio.sdk does not exist
      [javac] import com.twilio.sdk.TwilioRestClient;
      [javac]                      ^
  [javac] &lt;PATH-TO-PROJECT&gt;/test.java:42: cannot find symbol
  [javac] symbol  : class TwilioRestClient
  [javac] location: class &lt;packagename&gt;.Telephony
  [javac]             TwilioRestClient client = new TwilioRestClient("ACCOUNT_SID", "AUTH_TOKEN");
  [javac]             ^
  [javac] &lt;PATH-TO-PROJECT&gt;/test.java:42: cannot find symbol
  [javac] symbol  : class TwilioRestClient
  [javac] location: class &lt;packagename&gt;.Telephony
  [javac]             TwilioRestClient client = new TwilioRestClient("ACCOUNT_SID", "AUTH_TOKEN");
  [javac]                                           ^
      [javac] 3 errors
  
  BUILD FAILED
  &lt;ANDROID-SDK-PATH&gt;/tools/ant/uibuild.xml:183: Compile failed; see the compiler error output for details.
  
  Total time: 1 second
  </code></pre>
  
  <p>The above command would create the .jar if I did not have the testMethodGetClient method. So, I serached for the articals for <code>package not found</code> errors, but most of them suggesting to add the library either via 'Add External Jars' or 'provide the class path'. I tried both and I get the same error. So, I came here and posting it as a new question.</p>
  
  <p>Any help is greatly appreciated.</p>
  
  <p>Regards,
  Rumit</p>