Why Is This Crashing? Android AdView Problems? - android

I am trying to setup ad in my game but I am having a problem. It seems to be crashing. I have included the logcat below and it has something to do with the ad it seems.
06-07 18:49:54.594: E/dalvikvm(308): Could not find class 'com.google.ads.AdView', referenced from method com.blockyblaine.bobhoil.BlockyBlaine.onCreate
06-07 18:49:54.594: W/dalvikvm(308): VFY: unable to resolve check-cast 17 (Lcom/google/ads/AdView;) in Lcom/blockyblaine/bobhoil/BlockyBlaine;
06-07 18:49:54.603: D/dalvikvm(308): VFY: replacing opcode 0x1f at 0x0011
06-07 18:49:54.603: D/dalvikvm(308): VFY: dead code 0x0013-0069 in Lcom/blockyblaine/bobhoil/BlockyBlaine;.onCreate (Landroid/os/Bundle;)V
06-07 18:49:54.933: D/AndroidRuntime(308): Shutting down VM
06-07 18:49:54.933: W/dalvikvm(308): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
06-07 18:49:55.014: E/AndroidRuntime(308): FATAL EXCEPTION: main
06-07 18:49:55.014: E/AndroidRuntime(308): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.blockyblaine.bobhoil/com.blockyblaine.bobhoil.BlockyBlaine}: android.view.InflateException: Binary XML file line #8: Error inflating class com.google.ads.AdView
06-07 18:49:55.014: E/AndroidRuntime(308): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.os.Handler.dispatchMessage(Handler.java:99)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.os.Looper.loop(Looper.java:123)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.app.ActivityThread.main(ActivityThread.java:4627)
06-07 18:49:55.014: E/AndroidRuntime(308): at java.lang.reflect.Method.invokeNative(Native Method)
06-07 18:49:55.014: E/AndroidRuntime(308): at java.lang.reflect.Method.invoke(Method.java:521)
06-07 18:49:55.014: E/AndroidRuntime(308): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
06-07 18:49:55.014: E/AndroidRuntime(308): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
06-07 18:49:55.014: E/AndroidRuntime(308): at dalvik.system.NativeStart.main(Native Method)
06-07 18:49:55.014: E/AndroidRuntime(308): Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class com.google.ads.AdView
06-07 18:49:55.014: E/AndroidRuntime(308): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
06-07 18:49:55.014: E/AndroidRuntime(308): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.app.Activity.setContentView(Activity.java:1647)
06-07 18:49:55.014: E/AndroidRuntime(308): at com.blockyblaine.bobhoil.BlockyBlaine.onCreate(BlockyBlaine.java:27)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
06-07 18:49:55.014: E/AndroidRuntime(308): ... 11 more
06-07 18:49:55.014: E/AndroidRuntime(308): Caused by: java.lang.ClassNotFoundException: com.google.ads.AdView in loader dalvik.system.PathClassLoader[/data/app/com.blockyblaine.bobhoil-2.apk]
06-07 18:49:55.014: E/AndroidRuntime(308): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
06-07 18:49:55.014: E/AndroidRuntime(308): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
06-07 18:49:55.014: E/AndroidRuntime(308): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.view.LayoutInflater.createView(LayoutInflater.java:466)
06-07 18:49:55.014: E/AndroidRuntime(308): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
06-07 18:49:55.014: E/AndroidRuntime(308): ... 20 more
06-07 18:50:01.593: I/Process(308): Sending signal. PID: 308 SIG: 9

This link will take you to the admob developers docs. You will need to be sure to follow the directions to have the admob JAR included in your project.
I found a couple of other mentions related to other google api's. The issue there (giving a similar logcat) was this step was missed:
2. Declare com.google.ads.AdActivity in AndroidManifest.xml.
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>

Related

Activity crashing when overriding SherlockActivity

why does my application crash whenever I inherit from SherlockActivity? It's probably a silly mistake but I really can't figure it out! Just inheriting from Activity does work. Here's the code, layout file, manifest and the logcat logs:
package com.p4p.joinme;
import android.os.Bundle;
import com.actionbarsherlock.app.SherlockActivity;
public class MainActivity extends SherlockActivity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
layout file:
<?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" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="I'm a textview." />
</LinearLayout>
manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.p4p.joinme"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
error logs:
06-07 12:03:22.613: E/ExternalAccountType(21992): Unsupported attribute readOnly
06-07 12:03:23.244: E/ExternalAccountType(21992): Unsupported attribute readOnly
06-07 12:03:25.316: E/AndroidRuntime(9285): FATAL EXCEPTION: main
06-07 12:03:25.316: E/AndroidRuntime(9285): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.p4p.joinme/com.p4p.joinme.MainActivity}: java.lang.ClassNotFoundException: com.p4p.joinme.MainActivity
06-07 12:03:25.316: E/AndroidRuntime(9285): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2110)
06-07 12:03:25.316: E/AndroidRuntime(9285): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2229)
06-07 12:03:25.316: E/AndroidRuntime(9285): at android.app.ActivityThread.access$600(ActivityThread.java:139)
06-07 12:03:25.316: E/AndroidRuntime(9285): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1261)
06-07 12:03:25.316: E/AndroidRuntime(9285): at android.os.Handler.dispatchMessage(Handler.java:99)
06-07 12:03:25.316: E/AndroidRuntime(9285): at android.os.Looper.loop(Looper.java:154)
06-07 12:03:25.316: E/AndroidRuntime(9285): at android.app.ActivityThread.main(ActivityThread.java:4945)
06-07 12:03:25.316: E/AndroidRuntime(9285): at java.lang.reflect.Method.invokeNative(Native Method)
06-07 12:03:25.316: E/AndroidRuntime(9285): at java.lang.reflect.Method.invoke(Method.java:511)
06-07 12:03:25.316: E/AndroidRuntime(9285): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
06-07 12:03:25.316: E/AndroidRuntime(9285): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
06-07 12:03:25.316: E/AndroidRuntime(9285): at dalvik.system.NativeStart.main(Native Method)
06-07 12:03:25.316: E/AndroidRuntime(9285): Caused by: java.lang.ClassNotFoundException: com.p4p.joinme.MainActivity
06-07 12:03:25.316: E/AndroidRuntime(9285): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
06-07 12:03:25.316: E/AndroidRuntime(9285): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
06-07 12:03:25.316: E/AndroidRuntime(9285): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
06-07 12:03:25.316: E/AndroidRuntime(9285): at android.app.Instrumentation.newActivity(Instrumentation.java:1039)
06-07 12:03:25.316: E/AndroidRuntime(9285): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2101)
06-07 12:03:25.316: E/AndroidRuntime(9285): ... 11 more
06-07 12:03:25.326: E/EmbeddedLogger(239): App crashed! Process: com.p4p.joinme
06-07 12:03:25.326: E/EmbeddedLogger(239): App crashed! Package: com.p4p.joinme v1 (1.0)
06-07 12:03:25.326: E/EmbeddedLogger(239): Application Label: JoinMe!
06-07 12:07:33.959: E/ExternalAccountType(21992): Unsupported attribute readOnly
06-07 12:07:34.299: E/ExternalAccountType(21992): Unsupported attribute readOnly
06-07 12:07:37.452: E/EmbeddedLogger(239): App crashed! Process: com.p4p.joinme
06-07 12:07:37.452: E/EmbeddedLogger(239): App crashed! Package: com.p4p.joinme v1 (1.0)
06-07 12:07:37.452: E/AndroidRuntime(9610): FATAL EXCEPTION: main
06-07 12:07:37.452: E/AndroidRuntime(9610): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.p4p.joinme/com.p4p.joinme.MainActivity}: java.lang.ClassNotFoundException: com.p4p.joinme.MainActivity
06-07 12:07:37.452: E/AndroidRuntime(9610): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2110)
06-07 12:07:37.452: E/AndroidRuntime(9610): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2229)
06-07 12:07:37.452: E/AndroidRuntime(9610): at android.app.ActivityThread.access$600(ActivityThread.java:139)
06-07 12:07:37.452: E/AndroidRuntime(9610): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1261)
06-07 12:07:37.452: E/AndroidRuntime(9610): at android.os.Handler.dispatchMessage(Handler.java:99)
06-07 12:07:37.452: E/AndroidRuntime(9610): at android.os.Looper.loop(Looper.java:154)
06-07 12:07:37.452: E/AndroidRuntime(9610): at android.app.ActivityThread.main(ActivityThread.java:4945)
06-07 12:07:37.452: E/AndroidRuntime(9610): at java.lang.reflect.Method.invokeNative(Native Method)
06-07 12:07:37.452: E/AndroidRuntime(9610): at java.lang.reflect.Method.invoke(Method.java:511)
06-07 12:07:37.452: E/AndroidRuntime(9610): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
06-07 12:07:37.452: E/AndroidRuntime(9610): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
06-07 12:07:37.452: E/AndroidRuntime(9610): at dalvik.system.NativeStart.main(Native Method)
06-07 12:07:37.452: E/AndroidRuntime(9610): Caused by: java.lang.ClassNotFoundException: com.p4p.joinme.MainActivity
06-07 12:07:37.452: E/AndroidRuntime(9610): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
06-07 12:07:37.452: E/AndroidRuntime(9610): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
06-07 12:07:37.452: E/AndroidRuntime(9610): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
06-07 12:07:37.452: E/AndroidRuntime(9610): at android.app.Instrumentation.newActivity(Instrumentation.java:1039)
06-07 12:07:37.452: E/AndroidRuntime(9610): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2101)
06-07 12:07:37.452: E/AndroidRuntime(9610): ... 11 more
06-07 12:07:37.472: E/EmbeddedLogger(239): Application Label: JoinMe!
06-07 12:07:38.933: E/ActivityManager(239): fail to set top app changed!
I have had the same issue about external library, maybe your external library is not exported to your apk, I suggest you to see this: Could not find class
You probably haven't linked the library correctly, make sure you added it to the library section in rightclick -> properies -> Android.
There is no issue on your code. Jst cross check with your library whether it is linked in your project.
Steps to cross check is rightclick on projct -> properies -> Android/ java build path
use below code:
<activity
android:name="com.p4p.joinme.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
clean your project and run..
I'm not sure if this has something to do with your error, but if you want to use Sherlock Action Bar you need to use their theme:
<application
android:allowBackup="false"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:theme="#style/Theme.Sherlock" >
Besides, if you just updated your ADT plugin you might need to check your Private Libraries in Java Build Path.
Right click on project->Properties->Java Build Path->Order and Export(tab)->Activate checkbox next to Andrid Private Libraries

ICS class not found Exception

I had updated my android sdk to ics(4.1) as i updated all my old projects which were developped in froyo(2.3) giving me error Like
08-16 19:16:32.284: E/AndroidRuntime(593): FATAL EXCEPTION: main
08-16 19:16:32.284: E/AndroidRuntime(593): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.abc.def/com.abc.def.defMain}: java.lang.ClassNotFoundException: com.abc.def.defMain in loader dalvik.system.PathClassLoader[/data/app/com.abc.def-1.apk]
08-16 19:16:32.284: E/AndroidRuntime(593): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
08-16 19:16:32.284: E/AndroidRuntime(593): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
08-16 19:16:32.284: E/AndroidRuntime(593): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
08-16 19:16:32.284: E/AndroidRuntime(593): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
08-16 19:16:32.284: E/AndroidRuntime(593): at android.os.Handler.dispatchMessage(Handler.java:99)
08-16 19:16:32.284: E/AndroidRuntime(593): at android.os.Looper.loop(Looper.java:123)
08-16 19:16:32.284: E/AndroidRuntime(593): at android.app.ActivityThread.main(ActivityThread.java:4627)
08-16 19:16:32.284: E/AndroidRuntime(593): at java.lang.reflect.Method.invokeNative(Native Method)
08-16 19:16:32.284: E/AndroidRuntime(593): at java.lang.reflect.Method.invoke(Method.java:521)
08-16 19:16:32.284: E/AndroidRuntime(593): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
08-16 19:16:32.284: E/AndroidRuntime(593): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
08-16 19:16:32.284: E/AndroidRuntime(593): at dalvik.system.NativeStart.main(Native Method)
08-16 19:16:32.284: E/AndroidRuntime(593): Caused by: java.lang.ClassNotFoundException: com.abc.def.defMain in loader dalvik.system.PathClassLoader[/data/app/com.abc.def-1.apk]
08-16 19:16:32.284: E/AndroidRuntime(593): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
08-16 19:16:32.284: E/AndroidRuntime(593): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
08-16 19:16:32.284: E/AndroidRuntime(593): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
08-16 19:16:32.284: E/AndroidRuntime(593): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
08-16 19:16:32.284: E/AndroidRuntime(593): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
08-16 19:16:32.284: E/AndroidRuntime(593): ... 11 more
before updating sdk all of these were running very without any error please help
I got the solution for this Exception this problem was occuring because i was using external libraries in my project and reffering them in build path but in ics the libraries should be contained in libs directory of project so as i copied the libraries in libs problem get solved

Exception while extend DroidGap

I done few phone gap projects before, This time a new exception raised in my code .
In my new project i include phonegap jar(cordova 1.5) and in the manifest i declared droidgap class(tried with both com.hb.DroidGap and org.apache.cordova.DroidGap).
now if i extend to Activity the debugger entering to onCreate method but if i extend to DroidGap
the below exception is coming and app geting force close (Debugger in not coming to onCreate) ...
Is there any thing i am missing ?
Thanks in advance and sorry for my poor English
06-07 10:03:54.954: E/AndroidRuntime(554): FATAL EXCEPTION: main
06-07 10:03:54.954: E/AndroidRuntime(554): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.hiddenbrains/com.hiddenbrains.HBPluginsActivity}: java.lang.ClassNotFoundException: com.hiddenbrains.HBPluginsActivity in loader dalvik.system.PathClassLoader[/data/app/com.hiddenbrains-1.apk]
06-07 10:03:54.954: E/AndroidRuntime(554): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
06-07 10:03:54.954: E/AndroidRuntime(554): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
06-07 10:03:54.954: E/AndroidRuntime(554): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
06-07 10:03:54.954: E/AndroidRuntime(554): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
06-07 10:03:54.954: E/AndroidRuntime(554): at android.os.Handler.dispatchMessage(Handler.java:99)
06-07 10:03:54.954: E/AndroidRuntime(554): at android.os.Looper.loop(Looper.java:123)
06-07 10:03:54.954: E/AndroidRuntime(554): at android.app.ActivityThread.main(ActivityThread.java:4627)
06-07 10:03:54.954: E/AndroidRuntime(554): at java.lang.reflect.Method.invokeNative(Native Method)
06-07 10:03:54.954: E/AndroidRuntime(554): at java.lang.reflect.Method.invoke(Method.java:521)
06-07 10:03:54.954: E/AndroidRuntime(554): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
06-07 10:03:54.954: E/AndroidRuntime(554): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
06-07 10:03:54.954: E/AndroidRuntime(554): at dalvik.system.NativeStart.main(Native Method)
06-07 10:03:54.954: E/AndroidRuntime(554): Caused by: java.lang.ClassNotFoundException: com.hiddenbrains.HBPluginsActivity in loader dalvik.system.PathClassLoader[/data/app/com.hiddenbrains-1.apk]
06-07 10:03:54.954: E/AndroidRuntime(554): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
06-07 10:03:54.954: E/AndroidRuntime(554): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
06-07 10:03:54.954: E/AndroidRuntime(554): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
06-07 10:03:54.954: E/AndroidRuntime(554): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
06-07 10:03:54.954: E/AndroidRuntime(554): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
06-07 10:03:54.954: E/AndroidRuntime(554): ... 11 more
I have this exact problem too. Everything was working until a specific time last night, then I started getting these errors. App crashes every time. I have traced the problem to the .java file in src>MyApp.name... if I remove the cordova line, eg. class MyApp extends DroidGap and set it to the default the app doesn't crash, but it doesn't work either.

following exception in android simulator 2.0

i got following strange exception on only andorid simulator 2.0
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.markupartist.android.example.pulltorefresh/com.markupartist.android.example.pulltorefresh.PullToRefreshActivity}: android.view.InflateException: Binary XML file line #10: Error inflating class com.markupartist.android.widget.PullToRefreshListView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
at android.app.ActivityThread.access$2300(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #10: Error inflating class com.markupartist.android.widget.PullToRefreshListView
at android.view.LayoutInflater.createView(LayoutInflater.java:513)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
at android.app.Activity.setContentView(Activity.java:1647)
at com.markupartist.android.example.pulltorefresh.PullToRefreshActivity.onCreate(PullToRefresh Activity.java:21)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
... 11 more
Caused by: java.lang.reflect.InvocationTargetException
at com.markupartist.android.widget.PullToRefreshListView. (PullToRefreshListView.java:54)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.view.LayoutInflater.createView(LayoutInflater.java:500)
... 21 more
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f030002
at android.content.res.Resources.getValue(Resources.java:892)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:1869)
at android.content.res.Resources.getLayout(Resources.java:731)
at android.view.LayoutInflater.inflate(LayoutInflater.java:318)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.markupartist.android.widget.PullToRefreshListView.init(PullToRefreshListView.java:80)
... 25 more
when i tested on andorid 1.6 , 2.01,2.1,2.2,2.3 ,4.0 it works completely,
is this a simulator bug of 2.0
please give me some information about this
Thanks

Android 2.1 - Video issue

Why does my video playing app crash when I try to run on a Droid 2.1 device, but works fine with myTouch 1.6?
Thanks
Chris
LogCat shows
06-07 18:13:13.444: ERROR/AndroidRuntime(4252): java.lang.IllegalStateException
06-07 18:13:13.444: ERROR/AndroidRuntime(4252): at android.media.MediaPlayer.getVideoWidth(Native Method)
06-07 18:13:13.444: ERROR/AndroidRuntime(4252): at android.widget.VideoView$2.onPrepared(VideoView.java:290)
06-07 18:13:13.444: ERROR/AndroidRuntime(4252): at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:1152)
06-07 18:13:13.444: ERROR/AndroidRuntime(4252): at android.os.Handler.dispatchMessage(Handler.java:99)
06-07 18:13:13.444: ERROR/AndroidRuntime(4252): at android.os.Looper.loop(Looper.java:123)
06-07 18:13:13.444: ERROR/AndroidRuntime(4252): at android.app.ActivityThread.main(ActivityThread.java:4363)
06-07 18:13:13.444: ERROR/AndroidRuntime(4252): at java.lang.reflect.Method.invokeNative(Native Method)
06-07 18:13:13.444: ERROR/AndroidRuntime(4252): at java.lang.reflect.Method.invoke(Method.java:521)
06-07 18:13:13.444: ERROR/AndroidRuntime(4252): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
06-07 18:13:13.444: ERROR/AndroidRuntime(4252): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
06-07 18:13:13.444: ERROR/AndroidRuntime(4252): at dalvik.system.NativeStart.main(Native Method)
This VideoView-based sample works fine on all Android devices I have tested it upon, including the Magic and DROID. Experiment with it and your media clip and see what happens.

Categories

Resources