Unable to start activity ComponentInfo in Android after crash - android

I don't know where this error comes from. It appears when I start the app and crashes!
Error message and stack trace:
09-16 17:57:32.022 2441-2441/com.example.tobias.uebung1 E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.tobias.uebung1, PID: 2441
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.tobias.uebung1/com.example.tobias.uebung1.main}: android.content.res.Resources$NotFoundException: String resource ID #0xfffffffd
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: android.content.res.Resources$NotFoundException: String resource ID #0xfffffffd
at android.content.res.Resources.getText(Resources.java:312)
at android.widget.TextView.setText(TextView.java:4417)
at com.example.tobias.uebung1.main.Main(main.java:483)
at com.example.tobias.uebung1.main.onCreate(main.java:100)
at android.app.Activity.performCreate(Activity.java:6237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
            at android.app.ActivityThread.-wrap11(ActivityThread.java)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:148)
            at android.app.ActivityThread.main(ActivityThread.java:5417)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Thank you for your help!

Read A third Line
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.tobias.uebung1/com.example.tobias.uebung1.main}: android.content.res.Resources$NotFoundException: String resource ID #0xfffffffd
android.content.res.Resources$NotFoundException : Means You add Your Activity In AndroidManifest.xml File..
Or check Java File Or XML File name...

Related

android.view.InflateException: Binary XML file line #7: Binary XML file line #7: Error inflating class com.terlici.dragndroplist.DragNDropListView

I am new to android and want to create drag and drop list view in my project.I am following this link.
This is my XML layout(activity_main.xml) contain com.terlici.dragndroplist.DragNDropListView.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.terlici.dragndroplist.DragNDropListView
android:id="#id/android:list"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</LinearLayout>
There is my java main activity onCreate method
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
When i run this code i am getting this error.
09-27 09:02:09.266 2465-2465/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.franscc.testlistviewdraganddrop, PID: 2465
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.franscc.testlistviewdraganddrop/com.example.franscc.testlistviewdraganddrop.MainActivity}: android.view.InflateException: Binary XML file line #7: Binary XML file line #7: Error inflating class com.terlici.dragndroplist.DragNDropListView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: android.view.InflateException: Binary XML file line #7: Binary XML file line #7: Error inflating class com.terlici.dragndroplist.DragNDropListView
at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:393)
at android.app.Activity.setContentView(Activity.java:2166)
at com.example.franscc.testlistviewdraganddrop.MainActivity.onCreate(MainActivity.java:15)
at android.app.Activity.performCreate(Activity.java:6237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class com.terlici.dragndroplist.DragNDropListView
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:393)
at android.app.Activity.setContentView(Activity.java:2166)
at com.example.franscc.testlistviewdraganddrop.MainActivity.onCreate(MainActivity.java:15)
at android.app.Activity.performCreate(Activity.java:6237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.terlici.dragndroplist.DragNDropListView" on path: DexPathList[[zip file "/data/app/com.example.franscc.testlistviewdraganddrop-1/base.apk"],nativeLibraryDirectories=[/data/app/com.example.franscc.testlistviewdraganddrop-1/lib/x86, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.view.LayoutInflater.createView(LayoutInflater.java:583)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:393)
at android.app.Activity.setContentView(Activity.java:2166)
at com.example.franscc.testlistviewdraganddrop.MainActivity.onCreate(MainActivity.java:15)
at android.app.Activity.performCreate(Activity.java:6237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Suppressed: java.lang.ClassNotFoundException: com.terlici.dragndroplist.DragNDropListView
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 24 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
09-27 09:02:11.410 2465-2472/com.example.franscc.testlistviewdraganddrop W/art: Suspending all threads took: 9.984ms
Thanks for your rare time
Change
android:id="#id/android:list"
to this
android:id="#android:id/list"

Unable to resume activity - Failure delivering result

My analytics are reporting the following error:
java.lang.RuntimeException Msg: (Unable to resume activity
{com.NSouth.myapp/com.NSouth.myapp.Activity_Main}:
java.lang.RuntimeException: Failure delivering result
ResultInfo{who=null, request=211, result=0, data=null} to activity
211 is a request code I use for an in-app purchase. Since my code is not referenced in the stacktrace, is there anything I can do about this?
Full stacktrace:
java.lang.RuntimeException
android.app.ActivityThread.performResumeActivity(ActivityThread.java:3103)
android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3134)
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2481)
android.app.ActivityThread.-wrap11(ActivityThread.java)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
android.os.Handler.dispatchMessage(Handler.java:102)
android.os.Looper.loop(Looper.java:148)
android.app.ActivityThread.main(ActivityThread.java:5422)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: android.app.ActivityThread.deliverResults(ActivityThread.java:3699)
android.app.ActivityThread.performResumeActivity(ActivityThread.java:3089)
android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3134)
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2481)
android.app.ActivityThread.-wrap11(ActivityThread.java)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
android.os.Handler.dispatchMessage(Handler.java:102)
android.os.Looper.loop(Looper.java:148)
android.app.ActivityThread.main(ActivityThread.java:5422)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Reminders app tutorial, app does not load, issue with java file

I am learning Android Studio from a book called "Learn Android Studio: Build Android Apps Quickly and Effectively" By: Clifton Craig; Adam Gerber. I am following a tutorial on how to build a Reminders app and can't get the app to load. In the tutorial, I have been instructed to alter the onCreate() method with what is provided in the book, making sure to import what they provided.
The altered code is provided here.
The logcat is provided below:
01-18 06:04:55.460 2212-2212/com.apress.gerber.reminders I/art: Not late-enabling -Xcheck:jni (already on)
01-18 06:04:55.800 2212-2212/com.apress.gerber.reminders W/System: ClassLoader referenced unknown path: /data/app/com.apress.gerber.reminders-2/lib/x86_64
01-18 06:04:55.960 2212-2212/com.apress.gerber.reminders D/AndroidRuntime: Shutting down VM
01-18 06:04:55.960 2212-2212/com.apress.gerber.reminders E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.apress.gerber.reminders, PID: 2212
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.apress.gerber.reminders/com.apress.gerber.reminders.RemindersActivity}: java.lang.ClassCastException: android.widget.RelativeLayout cannot be cast to android.widget.ListView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.ClassCastException: android.widget.RelativeLayout cannot be cast to android.widget.ListView
at com.apress.gerber.reminders.RemindersActivity.onCreate(RemindersActivity.java:22)
at android.app.Activity.performCreate(Activity.java:6237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
01-18 06:05:00.980 2212-2212/com.apress.gerber.reminders I/Process: Sending signal. PID: 2212 SIG: 9
The app will not load. The emulator gives an error. Any feedback on this would be greatly appreciated.

Contacts List Read Permission Error in Android

As you can tell I am a newbie to Android :) and struggling with retrieving contacts list. I did add android.permission.READ_CONTACTS in AndroidManifest.xml but still it is not working. I am running it on Windows 10, in case if that makes any difference. Thanks in advance.
09-07 17:27:15.819 5272-5272/? I/art﹕ Not late-enabling -Xcheck:jni (already on)
09-07 17:27:15.819 5272-5272/? I/art﹕ Late-enabling JIT
09-07 17:27:15.821 5272-5272/? I/art﹕ JIT created with code_cache_capacity=2MB compile_threshold=1000
09-07 17:27:15.871 5272-5272/com.sr.phonecontactslist W/System﹕ ClassLoader referenced unknown path: /data/app/com.sr.phonecontactslist-1/lib/x86
09-07 17:27:15.879 5272-5272/com.sr.phonecontactslist D/AndroidRuntime﹕ Shutting down VM
09-07 17:27:15.879 5272-5272/com.sr.phonecontactslist E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.sr.phonecontactslist, PID: 5272
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sr.phonecontactslist/com.sr.phonecontactslist.MainActivity}: java.lang.SecurityException: Permission Denial: opening provider com.android.providers.contacts.ContactsProvider2 from ProcessRecord{15540fd 5272:com.sr.phonecontactslist/u0a59} (pid=5272, uid=10059) requires android.permission.READ_CONTACTS or android.permission.WRITE_CONTACTS
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.SecurityException: Permission Denial: opening provider com.android.providers.contacts.ContactsProvider2 from ProcessRecord{15540fd 5272:com.sr.phonecontactslist/u0a59} (pid=5272, uid=10059) requires android.permission.READ_CONTACTS or android.permission.WRITE_CONTACTS
at android.os.Parcel.readException(Parcel.java:1599)
at android.os.Parcel.readException(Parcel.java:1552)
at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:3550)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:4778)
at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2018)
at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1468)
at android.content.ContentResolver.query(ContentResolver.java:475)
at android.content.ContentResolver.query(ContentResolver.java:434)
at com.sr.phonecontactslist.MainActivity.onCreate(MainActivity.java:20)
at android.app.Activity.performCreate(Activity.java:6237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
            at android.app.ActivityThread.-wrap11(ActivityThread.java)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:148)
            at android.app.ActivityThread.main(ActivityThread.java:5417)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Service not Register After Changing in package name

After I Change package name there is an error occur like.
I am tryng to change package name. package name will be change but there is an error that service not register. and my application cant able to run properly. application cant able to destroy launcher activity.
06-26 16:45:19.806 27366-27366/my.instaupdate.otr.app.im E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: my.instaupdate.otr.app.im, PID: 27366
java.lang.RuntimeException: Unable to destroy activity {my.instaupdate.otr.app.im/my.instaupdate.otr.app.im.app.WelcomeActivity}: java.lang.IllegalArgumentException: Service not registered: my.instaupdate.cacheword.CacheWordActivityHandler#14403580
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3758)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3776)
at android.app.ActivityThread.access$1400(ActivityThread.java:148)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1346)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5312)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)
Caused by: java.lang.IllegalArgumentException: Service not registered: my.instaupdate.cacheword.CacheWordActivityHandler#14403580
at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1033)
at android.app.ContextImpl.unbindService(ContextImpl.java:1936)
at android.content.ContextWrapper.unbindService(ContextWrapper.java:550)
at my.instaupdate.otr.app.im.app.WelcomeActivity.onDestroy(WelcomeActivity.java:231)
at android.app.Activity.performDestroy(Activity.java:6132)
at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1163)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3745)
            at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3776)
            at android.app.ActivityThread.access$1400(ActivityThread.java:148)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1346)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5312)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)
this error about what???

Categories

Resources