VFY: unable to find class referend in signature - android

In my android project i use other projects as librarys. They are added in the build path as Projects and in Order and Export
03-16 19:54:32.418: I/System.out(27217): Antes del unmarshal
03-16 19:55:36.488: W/dalvikvm(27217): VFY: unable to find class referenced in signature (Lcom/theoryinpractise/halbuilder/api/ReadableRepresentation;)
03-16 19:55:36.488: I/dalvikvm(27217): Could not find method com.theoryinpractise.halbuilder.api.ReadableRepresentation.getValue, referenced from method com.theoryinpractise.halbuilder.jaxrs.HalUnmarshaller.getObjectFromRepresentation
03-16 19:55:36.488: W/dalvikvm(27217): VFY: unable to resolve interface method 11651: Lcom/theoryinpractise/halbuilder/api/ReadableRepresentation;.getValue (Ljava/lang/String;)Ljava/lang/Object;
03-16 19:55:36.488: D/dalvikvm(27217): VFY: replacing opcode 0x72 at 0x003e
03-16 19:55:36.498: W/dalvikvm(27217): VFY: unable to resolve exception class 1502 (Lcom/theoryinpractise/halbuilder/api/RepresentationException;)
03-16 19:55:36.498: W/dalvikvm(27217): VFY: unable to find exception handler at addr 0x58
03-16 19:55:36.508: W/dalvikvm(27217): VFY: rejected Lcom/theoryinpractise/halbuilder/jaxrs/HalUnmarshaller;.getObjectFromRepresentation (Lcom/theoryinpractise/halbuilder/api/ReadableRepresentation;Ljava/lang/Class;)Ljava/lang/Object;
03-16 19:55:36.508: W/dalvikvm(27217): VFY: rejecting opcode 0x0d at 0x0058
03-16 19:55:36.508: W/dalvikvm(27217): VFY: rejected Lcom/theoryinpractise/halbuilder/jaxrs/HalUnmarshaller;.getObjectFromRepresentation (Lcom/theoryinpractise/halbuilder/api/ReadableRepresentation;Ljava/lang/Class;)Ljava/lang/Object;
03-16 19:55:36.508: W/dalvikvm(27217): Verifier rejected class Lcom/theoryinpractise/halbuilder/jaxrs/HalUnmarshaller;
03-16 19:55:45.828: W/System.err(27217): java.util.concurrent.ExecutionException: java.lang.VerifyError: com/theoryinpractise/halbuilder/jaxrs/HalUnmarshaller
03-16 19:55:45.848: W/System.err(27217): at java.util.concurrent.FutureTask.report(FutureTask.java:93)
03-16 19:55:45.848: W/System.err(27217): at java.util.concurrent.FutureTask.get(FutureTask.java:163)
03-16 19:55:45.858: W/System.err(27217): at android.os.AsyncTask.get(AsyncTask.java:483)
03-16 19:55:45.858: W/System.err(27217): at com.example.modelo.ObtieneRecursos.obtieneTokenMe(ObtieneRecursos.java:49)
03-16 19:55:45.868: W/System.err(27217): at com.example.pestanasholacampus.InitActivity.compruebaUsuario(InitActivity.java:123)
03-16 19:55:45.878: W/System.err(27217): at com.example.pestanasholacampus.InitActivity$2.onClick(InitActivity.java:68)
03-16 19:55:45.878: W/System.err(27217): at android.view.View.performClick(View.java:4442)
03-16 19:55:45.878: W/System.err(27217): at android.view.View$PerformClick.run(View.java:18473)
03-16 19:55:45.878: W/System.err(27217): at android.os.Handler.handleCallback(Handler.java:733)
03-16 19:55:45.878: W/System.err(27217): at android.os.Handler.dispatchMessage(Handler.java:95)
03-16 19:55:45.888: W/System.err(27217): at android.os.Looper.loop(Looper.java:136)
03-16 19:55:45.888: W/System.err(27217): at android.app.ActivityThread.main(ActivityThread.java:5105)
03-16 19:55:45.888: W/System.err(27217): at java.lang.reflect.Method.invokeNative(Native Method)
03-16 19:55:45.888: W/System.err(27217): at java.lang.reflect.Method.invoke(Method.java:515)
03-16 19:55:45.888: W/System.err(27217): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
03-16 19:55:45.888: W/System.err(27217): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:608)
03-16 19:55:45.898: W/System.err(27217): at dalvik.system.NativeStart.main(Native Method)
03-16 19:55:45.898: W/System.err(27217): Caused by: java.lang.VerifyError: com/theoryinpractise/halbuilder/jaxrs/HalUnmarshaller
03-16 19:55:45.898: W/System.err(27217): at com.example.modelo.ObtencionTokenUsuario.doInBackground(ObtencionTokenUsuario.java:60)
03-16 19:55:45.898: W/System.err(27217): at com.example.modelo.ObtencionTokenUsuario.doInBackground(ObtencionTokenUsuario.java:1)
03-16 19:55:45.898: W/System.err(27217): at android.os.AsyncTask$2.call(AsyncTask.java:288)
03-16 19:55:45.908: W/System.err(27217): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
03-16 19:55:45.908: W/System.err(27217): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
03-16 19:55:45.908: W/System.err(27217): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
03-16 19:55:45.908: W/System.err(27217): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
03-16 19:55:45.908: W/System.err(27217): at java.lang.Thread.run(Thread.java:841)
I only see one rare thing in the buildPath. It only contains this:
I have read another posts with this problem but i dont know why does not works if the build path contains the projects.
All helps are welcome. Thanks.

Related

Using android.support.design.widget.CoordinatorLayout getting android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>

When I am using android.support.design.widget.CoordinatorLayout the above error is throwing up Caused by: java.lang.reflect.InvocationTarg. But when i am using LinearLayout it is working fine. Can anyone explain why?
The logcat data is:-
FATAL EXCEPTION: main
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: Process:E/AndroidRuntime:android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.LayoutInflater.createView(LayoutInflater.java:620)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:469)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at accos.viewing.com.viewingtheaccos.ListBuiltups.ListAdapter.getView(ListAdapter.java:52)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.widget.AbsListView.obtainView(AbsListView.java:2338)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.widget.ListView.measureHeightOfChildren(ListView.java:1273)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.widget.ListView.onMeasure(ListView.java:1182)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.View.measure(View.java:16834)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:824)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:500)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.View.measure(View.java:16834)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5379)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.support.design.widget.CoordinatorLayout.onMeasureChild(CoordinatorLayout.java:610)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.support.design.widget.HeaderScrollingViewBehavior.onMeasureChild(HeaderScrollingViewBehavior.java:78)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.support.design.widget.AppBarLayout$ScrollingViewBehavior.onMeasureChild(AppBarLayout.java:1132)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.support.design.widget.CoordinatorLayout.onMeasure(CoordinatorLayout.java:675)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.View.measure(View.java:16834)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5379)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.widget.FrameLayout.onMeasure(FrameLayout.java:340)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:135)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.View.measure(View.java:16834)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5379)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1621)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.widget.LinearLayout.measureVertical(LinearLayout.java:742)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.widget.LinearLayout.onMeasure(LinearLayout.java:607)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.View.measure(View.java:16834)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5379)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.widget.FrameLayout.onMeasure(FrameLayout.java:340)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.View.measure(View.java:16834)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5379)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1621)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.widget.LinearLayout.measureVertical(LinearLayout.java:742)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.widget.LinearLayout.onMeasure(LinearLayout.java:607)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.View.measure(View.java:16834)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5379)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.widget.FrameLayout.onMeasure(FrameLayout.java:340)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2368)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.View.measure(View.java:16834)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2246)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1312)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1509)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1189)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6223)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:788)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.Choreographer.doCallbacks(Choreographer.java:591)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.Choreographer.doFrame(Choreographer.java:560)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:774)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:808)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:103)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.os.Looper.loop(Looper.java:193)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5333)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:515)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:828)
03-16 13:36:15.901 23048-23048/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(
Open gradle, add these dependencies (if not exist) and target your app SDK to 23.
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'

Fatal exception and error opening trace file

I'm working on an Music Player, based on Apollo, an app built for Cyanogenmod. Upon loading and launching the app onto a emulator, the following appeared in the logcat view
05-26 08:58:16.539: E/Trace(1108): error opening trace file: No such file or directory (2)
05-26 08:58:16.687: W/dalvikvm(1108): Unable to resolve superclass of Lcom/echolabs/echo/ui/activities/BaseActivity; (146)
05-26 08:58:16.697: W/dalvikvm(1108): Link of class 'Lcom/echolabs/echo/ui/activities/BaseActivity;' failed
05-26 08:58:16.697: W/dalvikvm(1108): Unable to resolve superclass of Lcom/echolabs/echo/ui/activities/HomeActivity; (421)
05-26 08:58:16.697: W/dalvikvm(1108): Link of class 'Lcom/echolabs/echo/ui/activities/HomeActivity;' failed
05-26 08:58:16.697: D/AndroidRuntime(1108): Shutting down VM
05-26 08:58:16.717: W/dalvikvm(1108): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
05-26 08:58:16.729: E/AndroidRuntime(1108): FATAL EXCEPTION: main
05-26 08:58:16.729: E/AndroidRuntime(1108): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.echolabs.echo/com.echolabs.echo.ui.activities.HomeActivity}: java.lang.ClassNotFoundException: Didn't find class "com.echolabs.echo.ui.activities.HomeActivity" on path: /data/app/com.echolabs.echo-1.apk
05-26 08:58:16.729: E/AndroidRuntime(1108): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2106)
05-26 08:58:16.729: E/AndroidRuntime(1108): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
05-26 08:58:16.729: E/AndroidRuntime(1108): at android.app.ActivityThread.access$600(ActivityThread.java:141)
05-26 08:58:16.729: E/AndroidRuntime(1108): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
05-26 08:58:16.729: E/AndroidRuntime(1108): at android.os.Handler.dispatchMessage(Handler.java:99)
05-26 08:58:16.729: E/AndroidRuntime(1108): at android.os.Looper.loop(Looper.java:137)
05-26 08:58:16.729: E/AndroidRuntime(1108): at android.app.ActivityThread.main(ActivityThread.java:5041)
05-26 08:58:16.729: E/AndroidRuntime(1108): at java.lang.reflect.Method.invokeNative(Native Method)
05-26 08:58:16.729: E/AndroidRuntime(1108): at java.lang.reflect.Method.invoke(Method.java:511)
05-26 08:58:16.729: E/AndroidRuntime(1108): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
05-26 08:58:16.729: E/AndroidRuntime(1108): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
05-26 08:58:16.729: E/AndroidRuntime(1108): at dalvik.system.NativeStart.main(Native Method)
05-26 08:58:16.729: E/AndroidRuntime(1108): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.echolabs.echo.ui.activities.HomeActivity" on path: /data/app/com.echolabs.echo-1.apk
05-26 08:58:16.729: E/AndroidRuntime(1108): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
05-26 08:58:16.729: E/AndroidRuntime(1108): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
05-26 08:58:16.729: E/AndroidRuntime(1108): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
05-26 08:58:16.729: E/AndroidRuntime(1108): at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
05-26 08:58:16.729: E/AndroidRuntime(1108): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
05-26 08:58:16.729: E/AndroidRuntime(1108): ... 11 more
I honestly have Absolutely NO idea where these problems are coming from. If anyone out there can find the root of the problem, that would be greatly appreciated. Thank you!
The problem is with your R.java generated file.
Goto Project --> Clean in your eclipse.
and wait for your project to rebuild.

how to get contacts from google contacts programmatically in android

i am using contacservice class and i set the usercredentials of my gmail account
and i want to get the contact from the google contacts for that my code as follows
ContactService myservice=new ContactService("ex-app-1.0");
myservice.setUserCredentials("username","password");
URL url=new URL("https://www.google.com/m8/feeds/contacts/xxx#gmail.com/full");
ContactFeed resultFeed = myService.getFeed(feedUrl, ContactFeed.class);
but i got an exception like this in logcat
03-16 12:24:49.217: E/AndroidRuntime(1013): FATAL EXCEPTION: main
03-16 12:24:49.217: E/AndroidRuntime(1013): java.lang.RuntimeException: Unable to start activity
ComponentInfo{c.b.p/c.b.p.ContactsBackupActivity}: java.lang.NullPointerException
03-16 12:24:49.217: E/AndroidRuntime(1013): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
03-16 12:24:49.217: E/AndroidRuntime(1013): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
03-16 12:24:49.217: E/AndroidRuntime(1013): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
03-16 12:24:49.217: E/AndroidRuntime(1013): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
03-16 12:24:49.217: E/AndroidRuntime(1013): at android.os.Handler.dispatchMessage(Handler.java:99)
03-16 12:24:49.217: E/AndroidRuntime(1013): at android.os.Looper.loop(Looper.java:123)
03-16 12:24:49.217: E/AndroidRuntime(1013): at android.app.ActivityThread.main(ActivityThread.java:4627)
03-16 12:24:49.217: E/AndroidRuntime(1013): at java.lang.reflect.Method.invokeNative(Native Method)
03-16 12:24:49.217: E/AndroidRuntime(1013): at java.lang.reflect.Method.invoke(Method.java:521)
03-16 12:24:49.217: E/AndroidRuntime(1013): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
03-16 12:24:49.217: E/AndroidRuntime(1013): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
03-16 12:24:49.217: E/AndroidRuntime(1013): at dalvik.system.NativeStart.main(Native Method)
03-16 12:24:49.217: E/AndroidRuntime(1013): Caused by: java.lang.NullPointerException
03-16 12:24:49.217: E/AndroidRuntime(1013): at c.b.p.ContactsBackupActivity.onCreate(ContactsBackupActivity.java:128)
03-16 12:24:49.217: E/AndroidRuntime(1013): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
03-16 12:24:49.217: E/AndroidRuntime(1013): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
03-16 12:24:49.217: E/AndroidRuntime(1013): ... 11 more
03-16 12:29:49.329: I/Process(1013): Sending signal. PID: 1013 SIG: 9

Android application crashes at getContentResolver().query

Please find the attached code to retrieve the contact name for the incoming call. Here I hard coded the number as "123". I have added this contact in the emulator. But the application crashes at getContentResolver().query. Any help please.
String number = "123";
// define the columns I want the query to return
String[] projection = new String[] {
ContactsContract.PhoneLookup.DISPLAY_NAME,
ContactsContract.PhoneLookup.NUMBER };
// encode the phone number and build the filter URI
Uri contactUri = Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number));
// query time
Cursor c = getContentResolver().query(contactUri, projection, null,
null, null);
// if the query returns 1 or more results
// return the first result
if (c.moveToFirst()) {
String name = c.getString(c
.getColumnIndex(ContactsContract.PhoneLookup.DISPLAY_NAME));
Log.i("Map", "Contact Name " + name);
}
03-16 11:12:09.304: INFO/ActivityManager(65): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=ContactName.com/.ContactName }
03-16 11:12:09.544: INFO/ActivityManager(65): Start proc ContactName.com for activity ContactName.com/.ContactName: pid=406 uid=10024 gids={}
03-16 11:12:10.284: DEBUG/ddm-heap(406): Got feature list request
03-16 11:12:11.103: ERROR/DatabaseUtils(145): Writing exception to parcel
03-16 11:12:11.103: ERROR/DatabaseUtils(145): java.lang.SecurityException: Permission Denial: reading com.android.providers.contacts.ContactsProvider2 uri content://com.android.contacts/phone_lookup/9895318420 from pid=406, uid=10024 requires android.permission.READ_CONTACTS
03-16 11:12:11.103: ERROR/DatabaseUtils(145): at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:240)
03-16 11:12:11.103: ERROR/DatabaseUtils(145): at android.content.ContentProvider$Transport.bulkQuery(ContentProvider.java:116)
03-16 11:12:11.103: ERROR/DatabaseUtils(145): at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:98)
03-16 11:12:11.103: ERROR/DatabaseUtils(145): at android.os.Binder.execTransact(Binder.java:287)
03-16 11:12:11.103: ERROR/DatabaseUtils(145): at dalvik.system.NativeStart.run(Native Method)
03-16 11:12:11.194: DEBUG/AndroidRuntime(406): Shutting down VM
03-16 11:12:11.204: WARN/dalvikvm(406): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
03-16 11:12:11.214: ERROR/AndroidRuntime(406): Uncaught handler: thread main exiting due to uncaught exception
03-16 11:12:11.284: ERROR/AndroidRuntime(406): java.lang.RuntimeException: Unable to start activity ComponentInfo{ContactName.com/ContactName.com.ContactName}: java.lang.SecurityException: Permission Denial: reading com.android.providers.contacts.ContactsProvider2 uri content://com.android.contacts/phone_lookup/9895318420 from pid=406, uid=10024 requires android.permission.READ_CONTACTS
03-16 11:12:11.284: ERROR/AndroidRuntime(406): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
03-16 11:12:11.284: ERROR/AndroidRuntime(406): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
03-16 11:12:11.284: ERROR/AndroidRuntime(406): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
03-16 11:12:11.284: ERROR/AndroidRuntime(406): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
03-16 11:12:11.284: ERROR/AndroidRuntime(406): at android.os.Handler.dispatchMessage(Handler.java:99)
03-16 11:12:11.284: ERROR/AndroidRuntime(406): at android.os.Looper.loop(Looper.java:123)
03-16 11:12:11.284: ERROR/AndroidRuntime(406): at android.app.ActivityThread.main(ActivityThread.java:4363)
03-16 11:12:11.284: ERROR/AndroidRuntime(406): at java.lang.reflect.Method.invokeNative(Native Method)
03-16 11:12:11.284: ERROR/AndroidRuntime(406): at java.lang.reflect.Method.invoke(Method.java:521)
03-16 11:12:11.284: ERROR/AndroidRuntime(406): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
03-16 11:12:11.284: ERROR/AndroidRuntime(406): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
03-16 11:12:11.284: ERROR/AndroidRuntime(406): at dalvik.system.NativeStart.main(Native Method)
03-16 11:12:11.284: ERROR/AndroidRuntime(406): Caused by: java.lang.SecurityException: Permission Denial: reading com.android.providers.contacts.ContactsProvider2 uri content://com.android.contacts/phone_lookup/9895318420 from pid=406, uid=10024 requires android.permission.READ_CONTACTS
03-16 11:12:11.284: ERROR/AndroidRuntime(406): at android.os.Parcel.readException(Parcel.java:1218)
03-16 11:12:11.284: ERROR/AndroidRuntime(406): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:160)
03-16 11:12:11.284: ERROR/AndroidRuntime(406): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:114)
03-16 11:12:11.284: ERROR/AndroidRuntime(406): at android.content.ContentProviderProxy.bulkQuery(ContentProviderNative.java:326)
03-16 11:12:11.284: ERROR/AndroidRuntime(406): at android.content.ContentProviderProxy.query(ContentProviderNative.java:345)
03-16 11:12:11.284: ERROR/AndroidRuntime(406): at android.content.ContentResolver.query(ContentResolver.java:202)
03-16 11:12:11.284: ERROR/AndroidRuntime(406): at ContactName.com.ContactName.onCreate(ContactName.java:31)
03-16 11:12:11.284: ERROR/AndroidRuntime(406): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
03-16 11:12:11.284: ERROR/AndroidRuntime(406): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
03-16 11:12:11.284: ERROR/AndroidRuntime(406): ... 11 more
03-16 11:12:11.344: INFO/Process(65): Sending signal. PID: 406 SIG: 3
03-16 11:12:11.354: INFO/dalvikvm(406): threadid=7: reacting to signal 3
03-16 11:12:11.354: ERROR/dalvikvm(406): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
03-16 11:12:19.364: WARN/ActivityManager(65): Launch timeout has expired, giving up wake lock!
03-16 11:12:20.454: WARN/ActivityManager(65): Activity idle timeout for HistoryRecord{43ea9568 ContactName.com/.ContactName}
03-16 11:17:11.394: INFO/Process(406): Sending signal. PID: 406 SIG: 9
03-16 11:17:11.454: INFO/ActivityManager(65): Process ContactName.com (pid 406) has died.
03-16 11:17:11.684: ERROR/gralloc(65): [unregister] handle 0x388370 still locked (state=40000001)
03-16 11:17:11.724: INFO/UsageStats(65): Unexpected resume of com.android.launcher while already resumed in ContactName.com
03-16 11:17:11.914: WARN/InputManagerService(65): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#43b7f980
03-16 11:21:00.374: DEBUG/dalvikvm(65): GC freed 13348 objects / 660920 bytes in 285ms
Can you give the logs output from logcat.
You need a context to call getContentResolver(). Are you calling this method in your activity class or somewhere else?
Edit: You need to add permissions to read the contacts from the phone's address book. Please follow this link:
http://developer.android.com/reference/android/Manifest.permission.html#READ_CONTACTS
ERROR/DatabaseUtils(145): java.lang.SecurityException: Permission Denial: reading
com.android.providers.contacts.ContactsProvider2 uri
content://com.android.contacts/phone_lookup/9895318420 from pid=406, uid=10024 requires
android.permission.READ_CONTACTS
The solution is right in the error log you posted. Add permission READ_CONTACTS to your AndroidManifest You'll need a few other related permissions as well, look at the documentation for content to see which. -- which you need will depend on how you use the API.

Help with app, (force close)

I created an app, on eclips, but when i try to run it is force close why?
logcat :
03-16 19:28:09.820: INFO/ActivityManager(439): Start proc com.soundboard.Jaribarh.LIL_SIDDI for activity com.soundboard.Jaribarh.LIL_SIDDI/.Jaribarh_soundbord: pid=2621 uid=10020 gids={1015}
03-16 19:28:09.860: DEBUG/AK8973(415): Compass Start
03-16 19:28:09.860: DEBUG/Sensors(439): open_akm, fd=126
03-16 19:28:09.870: DEBUG/dalvikvm(2621): Debugger has detached; object registry had 1 entries
03-16 19:28:09.910: DEBUG/AndroidRuntime(2621): Shutting down VM
03-16 19:28:09.910: WARN/dalvikvm(2621): threadid=1: thread exiting with uncaught exception (group=0x40025a18)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): FATAL EXCEPTION: main
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.soundboard.Jaribarh.LIL_SIDDI/com.soundboard.Jaribarh.LIL_SIDDI.Jaribarh_soundbord}: java.lang.ClassNotFoundException: com.soundboard.Jaribarh.LIL_SIDDI.Jaribarh_soundbord in loader dalvik.system.PathClassLoader[/data/app/com.soundboard.Jaribarh.LIL_SIDDI-2.apk]
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2755)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2854)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at android.app.ActivityThread.access$2300(ActivityThread.java:136)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2179)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at android.os.Handler.dispatchMessage(Handler.java:99)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at android.os.Looper.loop(Looper.java:143)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at android.app.ActivityThread.main(ActivityThread.java:5068)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at java.lang.reflect.Method.invokeNative(Native Method)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at java.lang.reflect.Method.invoke(Method.java:521)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at dalvik.system.NativeStart.main(Native Method)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): Caused by: java.lang.ClassNotFoundException: com.soundboard.Jaribarh.LIL_SIDDI.Jaribarh_soundbord in loader dalvik.system.PathClassLoader[/data/app/com.soundboard.Jaribarh.LIL_SIDDI-2.apk]
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at android.app.Instrumentation.newActivity(Instrumentation.java:1034)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2747)
03-16 19:28:09.910: ERROR/AndroidRuntime(2621): ... 11 more
03-16 19:28:09.920: WARN/ActivityManager(439): Force finishing activity com.soundboard.Jaribarh.LIL_SIDDI/.Jaribarh_soundbord
03-16 19:28:10.420: WARN/ActivityManager(439): Activity pause timeout for HistoryRecord{48894070 com.soundboard.Jaribarh.LIL_SIDDI/.Jaribarh_soundbord}
It looks like the class com.soundboard.Jaribarh.LIL_SIDDI/.Jaribarh_soundbord doesn't exist. Possibly a misspelling of soundboard?
This is the important line from your log:
java.lang.ClassNotFoundException: com.soundboard.Jaribarh.LIL_SIDDI.Jaribarh_soundbord
Is there a typo in the class name, or is it possible that this Activity is not declared in the Manifest?

Categories

Resources