I have a test project which uses OI FileManager. I added that project to my test project as an Android library, then I call an Activitity in the library. It shows error:
E/AndroidRuntime( 1359): FATAL EXCEPTION: main
E/AndroidRuntime( 1359): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.androidcoretest/org.openintents.filemanager.FileManagerActivity}; have you declared this activity in your AndroidManifest.xml?
E/AndroidRuntime( 1359): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1404)
E/AndroidRuntime( 1359): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
E/AndroidRuntime( 1359): at android.app.Activity.startActivityForResult(Activity.java:2817)
E/AndroidRuntime( 1359): at android.app.Activity.startActivity(Activity.java:2923)
E/AndroidRuntime( 1359): at com.androidcoretest.FileExplorerTest$1.onClick(FileExplorerTest.java:24)
E/AndroidRuntime( 1359): at android.view.View.performClick(View.java:2408)
E/AndroidRuntime( 1359): at android.view.View$PerformClick.run(View.java:8816)
E/AndroidRuntime( 1359): at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 1359): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 1359): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 1359): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 1359): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1359): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 1359): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 1359): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 1359): at dalvik.system.NativeStart.main(Native Method)
When I add full path of that Activity in the Manifest, it generates another error.
<activity
android:label="#string/app_name"
android:name="org.openintents.filemanager.FileManagerActivity" >
</activity>
It shows:
E/AndroidRuntime( 1393): FATAL EXCEPTION: main
E/AndroidRuntime( 1393): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.androidcoretest/org.openintents.filemanager.FileManagerActivity}: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.androidcoretest/org.openintents.distribution.EulaActivity}; have you declared this activity in your AndroidManifest.xml?
E/AndroidRuntime( 1393): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
E/AndroidRuntime( 1393): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
E/AndroidRuntime( 1393): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
E/AndroidRuntime( 1393): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
E/AndroidRuntime( 1393): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1393): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 1393): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 1393): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1393): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 1393): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 1393): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 1393): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 1393): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.androidcoretest/org.openintents.distribution.EulaActivity}; have you declared this activity in your AndroidManifest.xml?
E/AndroidRuntime( 1393): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1404)
E/AndroidRuntime( 1393): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
E/AndroidRuntime( 1393): at android.app.Activity.startActivityForResult(Activity.java:2817)
E/AndroidRuntime( 1393): at android.app.Activity.startActivity(Activity.java:2923)
E/AndroidRuntime( 1393): at org.openintents.distribution.EulaOrNewVersion.startForwardActivity(EulaOrNewVersion.java:127)
E/AndroidRuntime( 1393): at org.openintents.distribution.EulaOrNewVersion.showEula(EulaOrNewVersion.java:69)
E/AndroidRuntime( 1393): at org.openintents.distribution.DistributionLibrary.showEulaOrNewVersion(DistributionLibrary.java:53)
E/AndroidRuntime( 1393): at org.openintents.filemanager.FileManagerActivity.onCreate(FileManagerActivity.java:312)
E/AndroidRuntime( 1393): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime( 1393): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
E/AndroidRuntime( 1393): ... 11 more
W/ActivityManager( 59): Force finishing activity com.androidcoretest/org.openintents.filemanager.FileManagerActivity
I would say this is a bug of Eclipse. Eclipse and ADT recently have many bugs on building process: ClassNotFound and ActivityNotFound.
Update:
My code just use one line:
final Intent intent = new Intent(FileExplorerTest.this, FileManagerActivity.class);
startActivity(intent);
Actually I have 3 projects. 2 library projects and 1 test project. Library "OI File Manager" uses Library "OI Distribution", then the test project C uses library "IO File Manager".
Ensure you are linking the OI FileManager projects as a library rather than external jar. go to Project properties > Android > Library, then click add library.
Then as you are doing define the activity in your project manifest (however with ADT 20 i think this is automatic)
<activity
android:label="#string/app_name"
android:name="org.openintents.filemanager.FileManagerActivity" >
</activity>
I guess it can't find com.androidcoretest/org.openintents.distribution.EulaActivity not the FileManager activity. Do you have that EulaActivity in the manifest?
See in your log:
Caused by: android.content.ActivityNotFoundException: Unable to find
explicit activity class
{com.androidcoretest/org.openintents.distribution.EulaActivity}; have
you declared this activity in your AndroidManifest.xml?
Related
This is my .java code
public class MainHelp extends PreferenceActivity {
#Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.help_main);
}
}
and this is the layout
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<Preference
android:title="Commands Documentation"
android:key="#string/commands"/>
<Preference
android:title = "How To Use"
android:key="#string/howToUse"/>
<Preference
android:title="Write Us"
android:key="#string/writeUs"/>
<Preference
android:title="About"
android:key="#string/aboutSuppApp"/>
</PreferenceScreen>
When I run the program the above code works perfectly....But, when i hit home button and try to go to this Activity, I get error saying
E/AndroidRuntime( 495): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime( 495): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.suppapp/com.suppapp.help.MainHelp}: android.view.InflateException: Binary XML file line #10: Error inflating class prferences
E/AndroidRuntime( 495): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
E/AndroidRuntime( 495): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
E/AndroidRuntime( 495): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
E/AndroidRuntime( 495): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
E/AndroidRuntime( 495): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 495): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 495): at android.app.ActivityThread.main(ActivityThread.java:4363)
E/AndroidRuntime( 495): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 495): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 495): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime( 495): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/AndroidRuntime( 495): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 495): Caused by: android.view.InflateException: Binary XML file line #10: Error inflating class prferences
E/AndroidRuntime( 495): at android.preference.GenericInflater.createItemFromTag(GenericInflater.java:441)
E/AndroidRuntime( 495): at android.preference.GenericInflater.rInflate(GenericInflater.java:481)
E/AndroidRuntime( 495): at android.preference.GenericInflater.inflate(GenericInflater.java:326)
E/AndroidRuntime( 495): at android.preference.GenericInflater.inflate(GenericInflater.java:263)
E/AndroidRuntime( 495): at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:254)
E/AndroidRuntime( 495): at android.preference.PreferenceActivity.addPreferencesFromResource(PreferenceActivity.java:253)
E/AndroidRuntime( 495): at com.suppapp.help.MainHelp.onCreate(MainHelp.java:19)
E/AndroidRuntime( 495): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime( 495): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
E/AndroidRuntime( 495): ... 11 more
E/AndroidRuntime( 495): Caused by: java.lang.ClassNotFoundException: android.preference.prferences in loader dalvik.system.PathClassLoader#44c06600
E/AndroidRuntime( 495): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
E/AndroidRuntime( 495): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
E/AndroidRuntime( 495): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
E/AndroidRuntime( 495): at android.preference.GenericInflater.createItem(GenericInflater.java:375)
E/AndroidRuntime( 495): at android.preference.GenericInflater.onCreateItem(GenericInflater.java:417)
E/AndroidRuntime( 495): at android.preference.GenericInflater.createItemFromTag(GenericInflater.java:428)
E/AndroidRuntime( 495): ... 19 more
I tried to link my activity with the other .xml file but getting the same error again!! Even Caused by: android.view.InflateException: Binary XML file line #10: Error inflating class prferences shows the same line number(#10) for other .xml files
i changed the version code(inside manifest file) and re-installed the app...its working fine now.
My appwidget crashes with following error:
E/AndroidRuntime( 5572): FATAL EXCEPTION: main
E/AndroidRuntime( 5572): java.lang.RuntimeException: Unable to start receiver com.android.mlweatherwidget.WeatherWidgetLarge: java.lang.RuntimeException: system server dead?
E/AndroidRuntime( 5572): at android.app.ActivityThread.handleReceiver(ActivityThread.java:1805)
E/AndroidRuntime( 5572): at android.app.ActivityThread.access$2400(ActivityThread.java:117)
E/AndroidRuntime( 5572): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:981)
E/AndroidRuntime( 5572): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 5572): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 5572): at android.app.ActivityThread.main(ActivityThread.java:3683)
E/AndroidRuntime( 5572): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 5572): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 5572): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime( 5572): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime( 5572): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 5572): Caused by: java.lang.RuntimeException: system server dead?
E/AndroidRuntime( 5572): at com.android.mlhome.appwidget.AppWidgetManager.getAppWidgetIds(AppWidgetManager.java:375)
E/AndroidRuntime( 5572): at com.android.mlweatherwidget.WeatherWidgetLarge.onReceive(WeatherWidgetLarge.java:202)
E/AndroidRuntime( 5572): at android.app.ActivityThread.handleReceiver(ActivityThread.java:1794)
E/AndroidRuntime( 5572): ... 10 more
E/AndroidRuntime( 5572): Caused by: android.os.DeadObjectException
E/AndroidRuntime( 5572): at android.os.BinderProxy.transact(Native Method)
E/AndroidRuntime( 5572): at com.android.mlhome.appwidget.ILauncherAppWidget$Stub$Proxy.getAppWidgetIds(ILauncherAppWidget.java:256)
E/AndroidRuntime( 5572): at com.android.mlhome.appwidget.AppWidgetManager.getAppWidgetIds(AppWidgetManager.java:369)
E/AndroidRuntime( 5572): ... 12 more
Can anybody understand from the above log what exactly is causing this error?
How to fix android.os.DeadObjectException android X
this guy met the same issue, check this link out.
I copyed the answer written by Dimitar Dimitrov as follows
This means that your service had already stopped - either killed from
the OS, or stopped from your application.
Does this problem happen every time you debug your project?
Override your service's onDestroy() method and watch what event flow
leads to it. If you catch DeadObjectException without going through
this method, your service should have been killed by the OS.
Started getting a ClassCastException in a widget I've been working on that I'm not sure what it's having an issue with. I haven't modified the configure class, nor the configure layout, yet I've started getting a stack trace leading back to my configure class after modifying the main layout
E/AndroidRuntime( 2010): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.metatroid.minimal.music/
com.metatroid.minimal.music.Configure}: java.lang.ClassCastException: android.widget.RadioButton
E/AndroidRuntime( 2010): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
E/AndroidRuntime( 2010): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
E/AndroidRuntime( 2010): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
E/AndroidRuntime( 2010): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
E/AndroidRuntime( 2010): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 2010): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 2010): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 2010): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 2010): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 2010): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime( 2010): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/AndroidRuntime( 2010): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 2010): Caused by: java.lang.ClassCastException: android.widget.RadioButton
E/AndroidRuntime( 2010): at com.metatroid.minimal.music.Configure.onCreate(Configure.java:39)
E/AndroidRuntime( 2010): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime( 2010): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
E/AndroidRuntime( 2010): ... 11 more
Reverting my changes causes the issue to go away, but I'm not doing anything with this file, nor am I modifying any RadioButtons...so what the hell? The line #39 of Configure.java is
EditText prv = (EditText) findViewById(R.id.previous_input);
I don't see how that ties into anything. And the only changes I am making to the entire project are changing some TextViews into Buttons in my main.xml layout which is not referenced in Configure.java. Reverting the Button back to TextView makes the error go away. What causes a "ClassCastException" and what could possibly be going on here?
Try clean your project. Previously you had RadioButton.
While running the Navit code for car navigation, I am getting the following exception, i thought that navit library is not available. please any one help me.
E/AndroidRuntime( 365): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime( 365): java.lang.ExceptionInInitializerError
E/AndroidRuntime( 365): at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime( 365): at java.lang.Class.newInstance(Class.java:1472)
E/AndroidRuntime( 365): at android.app.Instrumentation.newActivity(Instrumentation.java:1097)
E/AndroidRuntime( 365): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2316)
E/AndroidRuntime( 365): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
E/AndroidRuntime( 365): at android.app.ActivityThread.access$2100(ActivityThread.java:116)
E/AndroidRuntime( 365): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
E/AndroidRuntime( 365): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 365): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 365): at android.app.ActivityThread.main(ActivityThread.java:4203)
E/AndroidRuntime( 365): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 365): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 365): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
E/AndroidRuntime( 365): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
E/AndroidRuntime( 365): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 365): Caused by: java.lang.UnsatisfiedLinkError: Library navit not found
E/AndroidRuntime( 365): at java.lang.Runtime.loadLibrary(Runtime.java:489)
E/AndroidRuntime( 365): at java.lang.System.loadLibrary(System.java:557)
i downloaded the Navit code from , navit svn.ttps://navit.svn.sourceforge.net/svnroot/navit/trunk/navit But unable to run the code.
i want to run this code in Eclipse for Android Project.
You need to download Android NDK
Create standalong tools for your ARCH
Cross compile to ARM
Run make apkg
This error is due to missing libnavit.so.
Put libnavit.so it in /data/local
Change System.LoadLibrary to System.Load("/data/local/libnavit.so");
make apkg
Install
This exception should go away.
This code makes call successfully from my app
Intent dialer = new Intent("android.intent.action.CALL_PRIVILEGED");
mail.setData(Uri.parse("tel:65465446"));
startActivity(dialer);
But when trying to use an activity chooser like this:
Intent dialer = new Intent("android.intent.action.CALL_PRIVILEGED");
dialer.setData(Uri.parse("tel:65465446"));
Intent chooser = null;
chooser = Intent.createChooser(dialer,"Select Dialing Software...");
startActivity(chooser);
it throws following Logcat error if I select Dialer option, whereas SkypeOut works just fine
E/AndroidRuntime( 384): FATAL EXCEPTION: main
E/AndroidRuntime( 384): java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.CALL_PRIVILEGED dat=tel:65465446 flg=0x3000000 cmp=com.android.phone/.PrivilegedOutgoingCallBroadcaster } from ProcessRecord{44f4de30 384:com.dialer/10036} (pid=384, uid=10036) requires android.permission.CALL_PRIVILEGED
E/AndroidRuntime( 384): at android.os.Parcel.readException(Parcel.java:1247)
E/AndroidRuntime( 384): at android.os.Parcel.readException(Parcel.java:1235)
E/AndroidRuntime( 384): at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:1298)
E/AndroidRuntime( 384): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1373)
E/AndroidRuntime( 384): at android.app.Activity.startActivityForResult(Activity.java:2817)
E/AndroidRuntime( 384): at android.app.Activity.startActivity(Activity.java:2923)
E/AndroidRuntime( 384): at com.android.internal.app.ResolverActivity.onClick(ResolverActivity.java:190)
E/AndroidRuntime( 384): at com.android.internal.app.AlertController$AlertParams$3.onItemClick(AlertController.java:874)
E/AndroidRuntime( 384): at android.widget.AdapterView.performItemClick(AdapterView.java:284)
E/AndroidRuntime( 384): at android.widget.ListView.performItemClick(ListView.java:3382)
E/AndroidRuntime( 384): at android.widget.AbsListView$PerformClick.run(AbsListView.java:1696)
E/AndroidRuntime( 384): at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 384): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 384): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 384): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 384): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 384): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 384): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 384): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 384): at dalvik.system.NativeStart.main(Native Method)
manifest has <uses-permission android:name="android.permission.CALL_PRIVILEGED"/> added
Thanks for your any help.
Do you need to make use of CALL_PRIVILEGED? I think the only difference versus CALL_PHONE is that it can call emergency numbers (65465446 does not look like one). Replace it all with CALL_PHONE and it will work just fine, I believe.