11 Replies - 4084 Views - Last Post: 27 September 2012 - 05:44 PM

#1 blankwall  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 65
  • Joined: 12-July 12

Source not found error Android 16 has no jar source attached

Posted 25 September 2012 - 08:55 PM

My code is throwing a source not found error. I have been having things happen like this a lot recently and it is quite annoying. I have checked and my android 16 does have the file it says is missing. Is this a problem with my code? Any help figuring this out is greatly appreciated. If you need to see some code I will post it it is just a lot so I didnt want to take up to much room.
Is This A Good Question/Topic? 0
  • +

Replies To: Source not found error Android 16 has no jar source attached

#2 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon



Reputation: 2876
  • View blog
  • Posts: 11,051
  • Joined: 15-July 08

Re: Source not found error Android 16 has no jar source attached

Posted 25 September 2012 - 10:07 PM

Firstly, please post questions here, not in the tutorials forum. Nextly, you should check your project settings to make sure you have the jars for API level 16 installed.
Was This Post Helpful? 1
  • +
  • -

#3 EndLessMind  Icon User is offline

  • These are the droids you're looking for
  • member icon

Reputation: 194
  • View blog
  • Posts: 1,099
  • Joined: 13-March 09

Re: Source not found error Android 16 has no jar source attached

Posted 26 September 2012 - 02:07 AM

It's not a code-problem, or at least not in your app.
Was This Post Helpful? 1
  • +
  • -

#4 blankwall  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 65
  • Joined: 12-July 12

Re: Source not found error Android 16 has no jar source attached

Posted 26 September 2012 - 08:00 AM

It shows I have all the files for android 16 jar. Think maybe I should try to reinstall the add ons? What if I tried to build in android 15?
Was This Post Helpful? 0
  • +
  • -

#5 blankwall  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 65
  • Joined: 12-July 12

Re: Source not found error Android 16 has no jar source attached

Posted 26 September 2012 - 08:55 AM

I used the eclipse install new software and used source.android.com any other things I should try to install? Really looking for a solution that will work.
Was This Post Helpful? 0
  • +
  • -

#6 EndLessMind  Icon User is offline

  • These are the droids you're looking for
  • member icon

Reputation: 194
  • View blog
  • Posts: 1,099
  • Joined: 13-March 09

Re: Source not found error Android 16 has no jar source attached

Posted 26 September 2012 - 01:45 PM

Try building to a older android version.
There aren't that many phone that runs Android 4.1 yet
Was This Post Helpful? 1
  • +
  • -

#7 blankwall  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 65
  • Joined: 12-July 12

Re: Source not found error Android 16 has no jar source attached

Posted 26 September 2012 - 06:18 PM

Ok i tried running it on android 3.2 and it hs the exact same problem jar file android-13 has no source attached to it. I have been scouring the internet for how to attach a jar file but have been unsuccesful at figuring it out.
Was This Post Helpful? 0
  • +
  • -

#8 blankwall  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 65
  • Joined: 12-July 12

Re: Source not found error Android 16 has no jar source attached

Posted 26 September 2012 - 06:30 PM

Cannot complete the request. See the error log for details.
"Android Sources" will be ignored because it is already installed.

That what it says when I try to install new sources

When I ran android 16 it said jar now android 13 saye Parcel class. Im running on linux if that matters.
Was This Post Helpful? 0
  • +
  • -

#9 blankwall  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 65
  • Joined: 12-July 12

Re: Source not found error Android 16 has no jar source attached

Posted 26 September 2012 - 09:42 PM

package com.paad.contactpicker;

import android.app.Activity;
import android.content.ContentUris;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.provider.ContactsContract;
import android.provider.ContactsContract.Contacts;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;

public class ContactPicker extends Activity {
  @Override
  public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    setContentView(R.layout.main);
    
    final Cursor c = getContentResolver().query(
        ContactsContract.Contacts.CONTENT_URI, null, null, null, null);

      String[] from = new String[] { Contacts.DISPLAY_NAME_PRIMARY };
      int[] to = new int[] { R.id.itemTextView };

      SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
                                                            R.layout.listitemlayout,
                                                            c,
                                                            from,
                                                            to);
      ListView lv = (ListView)findViewById(R.id.contactListView);
      lv.setAdapter(adapter);

      lv.setOnItemClickListener(new ListView.OnItemClickListener() {
        public void onItemClick(AdapterView<?> parent, View view, int pos,
                                long id) {
          // Move the cursor to the selected item
          c.moveToPosition(pos);
          // Extract the row id.
          int rowId = c.getInt(c.getColumnIndexOrThrow("_id"));
          // Construct the result URI.
          Uri outURI = ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI, rowId);
          Intent outData = new Intent();
          outData.setData(outURI);
          setResult(Activity.RESULT_OK, outData);
          finish();
        }
      });

  }
}


There is the code for my sub activity that throws the source error. I believe there is an exception somewhere in there that needs to be found. If you have any tips I appreciate it. I am going to continue on to the next chapter of my book and hope someone can help me out with an answer. Thanks for all the responses.
Was This Post Helpful? 0
  • +
  • -

#10 blankwall  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 65
  • Joined: 12-July 12

Re: Source not found error Android 16 has no jar source attached

Posted 27 September 2012 - 05:05 PM

Thanks for all the help solved the problem had a problem with my intent string.
Was This Post Helpful? 0
  • +
  • -

#11 EndLessMind  Icon User is offline

  • These are the droids you're looking for
  • member icon

Reputation: 194
  • View blog
  • Posts: 1,099
  • Joined: 13-March 09

Re: Source not found error Android 16 has no jar source attached

Posted 27 September 2012 - 05:30 PM

Good job on solving it!
I wish you the best of luck developing apps to Android!
Was This Post Helpful? 1
  • +
  • -

#12 blankwall  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 65
  • Joined: 12-July 12

Re: Source not found error Android 16 has no jar source attached

Posted 27 September 2012 - 05:44 PM

Thanks man Im gonna keep you in my memory for next time I run into an issue. You were very helpful
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1