Increasing minSdkVersion causes Out Of Memory errors - android

I developed my app with minSdkVersion set to 3, targetSdkVersion set to 8.
My app is published, and runs on everything from Android 1.5 to 3.0 Though devices it will run on with anything older than 2.0 is always spotty, some it will and some it won't
It works perfect on my Incredible, Android 2.2. It uses 5-8mb memory when running.
However I decided I wanted to split it into two different apps, one for Android 1.5 and 1.6 compatibility and another with higher quality images optimized for tablets.
The only line I changed was setting minSdkVersion from 3 to 5, and all of a sudden it won't run on any phone or emulator?
Now on my Incredible, it uses 7mb just to show the menu background, and gives me an out of memory error every time when loading another image.
Any ideas? Thanks
04-25 17:19:45.476: ERROR/dalvikvm-heap(20145): 7094850-byte external allocation too large for this process.
04-25 17:19:45.476: ERROR/dalvikvm(20145): Out of memory: Heap Size=4871KB, Allocated=2517KB, Bitmap Size=19170KB
04-25 17:19:45.476: ERROR/GraphicsJNI(20145): VM won't let us allocate 7094850 bytes
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): FATAL EXCEPTION: main
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): java.lang.RuntimeException: Unable to resume activity {com.ht/com.ht.Garage}: android.view.InflateException: Binary XML file line #10: Error inflating class com.ht.Panel
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3347)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3362)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2808)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at android.app.ActivityThread.access$2300(ActivityThread.java:135)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at android.os.Handler.dispatchMessage(Handler.java:99)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at android.os.Looper.loop(Looper.java:144)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at android.app.ActivityThread.main(ActivityThread.java:4937)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at java.lang.reflect.Method.invokeNative(Native Method)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at java.lang.reflect.Method.invoke(Method.java:521)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at dalvik.system.NativeStart.main(Native Method)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): Caused by: android.view.InflateException: Binary XML file line #10: Error inflating class com.ht.Panel
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at android.view.LayoutInflater.createView(LayoutInflater.java:513)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at android.app.Activity.setContentView(Activity.java:1654)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at com.ht.Garage.onResume(Garage.java:165)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1255)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at android.app.Activity.performResume(Activity.java:3864)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3337)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): ... 12 more
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): Caused by: java.lang.reflect.InvocationTargetException
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at com.ht.Panel.<init>(Panel.java:107)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at java.lang.reflect.Constructor.constructNative(Native Method)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at android.view.LayoutInflater.createView(LayoutInflater.java:500)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): ... 23 more
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at android.graphics.Bitmap.nativeCreate(Native Method)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): at android.graphics.Bitmap.createBitmap(Bitmap.java:574)
04-25 17:19:45.506: ERROR/AndroidRuntime(20145): ... 27 more
04-25 17:19:48.066: ERROR/ActivityManager(97): fail to set top app changed!

Set your minSdkVersion to API level 7, API level 5 and 6 are no longer available as 2.0 has been completely phased out. The Android SDK manager does not offer those API's any longer as an available package because they have been marked as obsolete. I just did a new install on a new system and found the API's unavailable.

I found how to fix it, setting anyDensity to false works. I don't understand why it works though.
With API 3, anyDensity has a default value of false, but I was setting it to true!
With an API of 4 (or is it 5) or higher, anyDensity has a default value of true.
How is it any different between it defaulting to true with API 7, and me setting it to true with API 3?
That should not affect memory usage at all, it ends up being the same value no matter what!
Oh well, my app hasn't needed anyDensity set to true since I put in code to dynamically scale the images based on screen size and density anyway.

Related

Cordova hello world app crashing

I am new in Android Development. I am working on cordova platform
I have created a sample hello world app and getting this error when i am trying to open it in genymotion. ALthough the app compile succesfully but when i run it in genymotion it just shows the prompt with text "Unfortunately "APP" has stopped."
The Error log shows.
01-12 08:16:04.867 2073-2073/com.technoserves.crudnew D/dalvikvm﹕ Late-enabling CheckJNI
01-12 08:16:06.107 2073-2073/com.technoserves.crudnew W/dalvikvm﹕ Unable to resolve superclass of Lcom/technoserves/crudnew/CordovaApp; (14)
01-12 08:16:06.119 2073-2073/com.technoserves.crudnew W/dalvikvm﹕ Link of class 'Lcom/technoserves/crudnew/CordovaApp;' failed
01-12 08:16:06.135 2073-2073/com.technoserves.crudnew D/AndroidRuntime﹕ Shutting down VM
01-12 08:16:06.135 2073-2073/com.technoserves.crudnew W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0xa6142908)
01-12 08:16:06.155 2073-2073/com.technoserves.crudnew E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.technoserves.crudnew/com.technoserves.crudnew.CordovaApp}: java.lang.ClassNotFoundException: Didn't find class "com.technoserves.crudnew.CordovaApp" on path: /data/app/com.technoserves.crudnew-1.apk
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2106)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.technoserves.crudnew.CordovaApp" on path: /data/app/com.technoserves.crudnew-1.apk
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
            at android.app.ActivityThread.access$600(ActivityThread.java:141)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:5041)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
            at dalvik.system.NativeStart.main(Native Method)
01-12 08:16:22.399 2073-2073/com.technoserves.crudnew I/Process﹕ Sending signal. PID: 2073 SIG: 9
I have updated my cordova to resolve but still same error however a few days ago it was working fine and i have build some apps.
First download Cordova jar file from following link:
http://www.java2s.com/Code/JarDownload/cordova/cordova-1.8.1.jar.zip
after that extract the folder and put cordova-1.8.1 inside your libs folder of project in eclipse
And right click on your project--> properties and Select Android from left pane and scroll to bottom remove the cordova library if added.
then clean and build your project.

master/detail actionbar fragments

I have found this https://github.com/abidk/android_masterdetail_tab_issue and it is exactly the base for my app, great work from abidk. It executes perfect on tablet and adding more fragments is very easy but on phone it is producing an error: what could be the reason and how to fix it?
D/dalvikvm(3695): Late-enabling CheckJNI
D/AndroidRuntime(3695): Shutting down VM
W/dalvikvm(3695): threadid=1: thread exiting with uncaught exception (group=0x41b192a0)
E/AndroidRuntime(3695): FATAL EXCEPTION: main
E/AndroidRuntime(3695): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.example.masterdetail_tabs/com.example.example.masterdetail_tabs.ItemListActivity}: android.view.InflateException: Binary XML file line #1: Error inflating class fragment
E/AndroidRuntime(3695): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2092)
E/AndroidRuntime(3695): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2117)
E/AndroidRuntime(3695): at android.app.ActivityThread.access$700(ActivityThread.java:134)
E/AndroidRuntime(3695): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1218)
E/AndroidRuntime(3695): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(3695): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(3695): at android.app.ActivityThread.main(ActivityThread.java:4867)
E/AndroidRuntime(3695): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(3695): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(3695): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007)
E/AndroidRuntime(3695): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774)
E/AndroidRuntime(3695): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(3695): Caused by: android.view.InflateException: Binary XML file line #1: Error inflating class fragment
E/AndroidRuntime(3695): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
E/AndroidRuntime(3695): at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
E/AndroidRuntime(3695): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
E/AndroidRuntime(3695): at com.example.example.masterdetail_tabs.Tab1Fragment.onCreateView(Tab1Fragment.java:18)
E/AndroidRuntime(3695): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:829)
E/AndroidRuntime(3695): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1035)
E/AndroidRuntime(3695): at android.app.BackStackRecord.run(BackStackRecord.java:635)
E/AndroidRuntime(3695): at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1399)
E/AndroidRuntime(3695): at android.app.Activity.performStart(Activity.java:5056)
E/AndroidRuntime(3695): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2065)
E/AndroidRuntime(3695): ... 11 more
E/AndroidRuntime(3695): Caused by: java.lang.ClassCastException: com.example.example.masterdetail_tabs.ItemListFragment cannot be cast to android.support.v4.app.Fragment
E/AndroidRuntime(3695): at android.support.v4.app.Fragment.instantiate(Fragment.java:394)
E/AndroidRuntime(3695): at android.support.v4.app.Fragment.instantiate(Fragment.java:369)
E/AndroidRuntime(3695): at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:272)
E/AndroidRuntime(3695): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:676)
E/AndroidRuntime(3695): ... 20 more
I/Process(3695): Sending signal. PID: 3695 SIG: 9
It's hard to know for sure without seeing your code but it looks like you inherited or imported the wrong Fragment for either your ItemListFragment or the Activity using it.
Your logcat shows the exception as:
Caused by: java.lang.ClassCastException: com.example.example.masterdetail_tabs.ItemListFragment cannot be cast to android.support.v4.app.Fragment
Check your usages and imports etc
import android.support.v4.app.Fragment;
vs
import android.app.Fragment
Also be mindful of which variants of Activity and Fragment can make use of which types and are compatible with which versions of the API. You should read and follow the official Android tutorial on Fragments for further info and proper usages.

Issues while consuming webservice

Installing Apache Tomcat, Apache Axis2, Create web project, Convert to service, Deploy it in Tomcat, Create client project then, Create client with stub of our services and finally, access the service.
I think these are all the steps to consume web service on Android Eclipse.
Here I have completed up to the step deploying the web project on tomcat server, it shown about the services successfully, but server option shown up as SYNCHRONIZED. It's given below
server
Tomcat v6.0 server at localhost[Started,Synchronized]
AndBack[Synchronized].
Meanwhile after creating client project it shown up during run time as:
Sorry! The application has stopped unexpectedly. Please try again. Force close
Please refer my logcat given below.
LOGCAT
04-25 16:46:51.153: E/dalvikvm(273): Could not find class 'org.ksoap2.serialization.SoapObject', referenced from method org.test.Frontend.AndFrontActivity.onCreate
04-25 16:46:51.153: W/dalvikvm(273): VFY: unable to resolve new-instance 25 (Lorg/ksoap2/serialization/SoapObject;) in Lorg/test/Frontend/AndFrontActivity;
04-25 16:46:51.153: D/dalvikvm(273): VFY: replacing opcode 0x22 at 0x0010
04-25 16:46:51.164: D/dalvikvm(273): VFY: dead code 0x0012-0081 in Lorg/test/Frontend/AndFrontActivity;.onCreate (Landroid/os/Bundle;)V
04-25 16:46:51.243: D/AndroidRuntime(273): Shutting down VM
04-25 16:46:51.243: W/dalvikvm(273): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
04-25 16:46:51.273: E/AndroidRuntime(273): FATAL EXCEPTION: main
04-25 16:46:51.273: E/AndroidRuntime(273): java.lang.NoClassDefFoundError: org.ksoap2.serialization.SoapObject
04-25 16:46:51.273: E/AndroidRuntime(273): at org.test.Frontend.AndFrontActivity.onCreate(AndFrontActivity.java:28)
04-25 16:46:51.273: E/AndroidRuntime(273): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-25 16:46:51.273: E/AndroidRuntime(273): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
04-25 16:46:51.273: E/AndroidRuntime(273): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
04-25 16:46:51.273: E/AndroidRuntime(273): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
04-25 16:46:51.273: E/AndroidRuntime(273): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
04-25 16:46:51.273: E/AndroidRuntime(273): at android.os.Handler.dispatchMessage(Handler.java:99)
04-25 16:46:51.273: E/AndroidRuntime(273): at android.os.Looper.loop(Looper.java:123)
04-25 16:46:51.273: E/AndroidRuntime(273): at android.app.ActivityThread.main(ActivityThread.java:4627)
04-25 16:46:51.273: E/AndroidRuntime(273): at java.lang.reflect.Method.invokeNative(Native Method)
04-25 16:46:51.273: E/AndroidRuntime(273): at java.lang.reflect.Method.invoke(Method.java:521)
04-25 16:46:51.273: E/AndroidRuntime(273): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
04-25 16:46:51.273: E/AndroidRuntime(273): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
04-25 16:46:51.273: E/AndroidRuntime(273): at dalvik.system.NativeStart.main(Native Method)
Turns out external jars such as
ksoap2-android-assembly-2.6.2-jar-with-dependencies.jar
to be put under /libs folder so Eclipse ADT automatically adds your jars to the buildpath of your application. It was a buildpath missing defined class error after all.. I hope this will help you, too!
here or there

Facebook client crashes facebook SSO login dialog after changing facebook password

I have encountered a crash using SSO to login to facebook. I could not find any reports in any of the forums of anything similar.
When we change user password on facebook site, within about 15 seconds android facebook client will notify user via notification bar that facebook authentication failed. If user reacts and logs in, our application SSO will pick up new token with no problem.
If user changes the password, launches our app facebook request (like download of list of friends) before user reacted to facebook application notification and logged in with new password, we get the SSO crash, which erroneously notifies our application that user cancelled login.
Somehow facebook application login dialog (blue dialog) and SSO login dialog (white dialog) can't live together. If they are opened at the same time, SSO initiated instance of Facebook client crashes with following exception:
04-25 10:40:39.790: E/AndroidRuntime(5991): FATAL EXCEPTION: main
04-25 10:40:39.790: E/AndroidRuntime(5991): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.facebook.katana/com.facebook.katana.ProxyAuth}: java.lang.NullPointerException
04-25 10:40:39.790: E/AndroidRuntime(5991): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
04-25 10:40:39.790: E/AndroidRuntime(5991): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
04-25 10:40:39.790: E/AndroidRuntime(5991): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
04-25 10:40:39.790: E/AndroidRuntime(5991): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
04-25 10:40:39.790: E/AndroidRuntime(5991): at android.os.Handler.dispatchMessage(Handler.java:99)
04-25 10:40:39.790: E/AndroidRuntime(5991): at android.os.Looper.loop(Looper.java:130)
04-25 10:40:39.790: E/AndroidRuntime(5991): at android.app.ActivityThread.main(ActivityThread.java:3691)
04-25 10:40:39.790: E/AndroidRuntime(5991): at java.lang.reflect.Method.invokeNative(Native Method)
04-25 10:40:39.790: E/AndroidRuntime(5991): at java.lang.reflect.Method.invoke(Method.java:507)
04-25 10:40:39.790: E/AndroidRuntime(5991): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
04-25 10:40:39.790: E/AndroidRuntime(5991): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
04-25 10:40:39.790: E/AndroidRuntime(5991): at dalvik.system.NativeStart.main(Native Method)
04-25 10:40:39.790: E/AndroidRuntime(5991): Caused by: java.lang.NullPointerException
04-25 10:40:39.790: E/AndroidRuntime(5991): at com.facebook.orca.common.util.Base64.c(Base64.java:497)
04-25 10:40:39.790: E/AndroidRuntime(5991): at com.facebook.orca.common.util.Base64.b(Base64.java:459)
04-25 10:40:39.790: E/AndroidRuntime(5991): at com.facebook.katana.ProxyAuth.b(ProxyAuth.java:36)
04-25 10:40:39.790: E/AndroidRuntime(5991): at com.facebook.katana.activity.PlatformDialogActivity.a(PlatformDialogActivity.java:127)
04-25 10:40:39.790: E/AndroidRuntime(5991): at com.facebook.orca.activity.FbFragmentActivity.onCreate(FbFragmentActivity.java:48)
04-25 10:40:39.790: E/AndroidRuntime(5991): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-25 10:40:39.790: E/AndroidRuntime(5991): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
04-25 10:40:39.790: E/AndroidRuntime(5991): ... 11 more
Another hint is that little bit above that there is a window leaked non fatal exception within facebook application:
Activity com.facebook.katana.ProxyAuth has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView#406eecf0 that was originally added here
Did anyone encounter similar crashes? I am really puzzled that nobody refers to those crashes, as far as google can find. I followed hackbook example when implementing this. I really don't have a clue what could be causing it.
Might not have to do with password changing but removing:
android:launchMode="singleInstance" from the AndroidManifest.xml
solved a similar bug for me (also java.lang.NullPointerException in com.facebook.katana/com.facebook.katana.ProxyAuth)

Could not find class 'com.google.ads.AdRequest'

I've switched from Windows to Ubuntu this week.
I have imported my Android project into Eclipse, and it shows no errors, the project can be built normally.
However, when I try to run the application on a device, the app crashes with the following messages:
04-25 14:14:15.700: E/dalvikvm(12640): Could not find class
'com.google.ads.AdRequest', referenced from method
com.myApp.initAds
and
04-25 14:14:15.790: E/AndroidRuntime(12640): Caused by:
java.lang.ClassNotFoundException: com.google.ads.AdView in loader
dalvik.system.PathClassLoader[/data/app/com.busybits.treinverkeer-2.apk]
04-25 14:14:15.790: E/AndroidRuntime(12640): at
dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
04-25 14:14:15.790: E/AndroidRuntime(12640): at
java.lang.ClassLoader.loadClass(ClassLoader.java:551) 04-25
14:14:15.790: E/AndroidRuntime(12640): at
java.lang.ClassLoader.loadClass(ClassLoader.java:511) 04-25
14:14:15.790: E/AndroidRuntime(12640): at
android.view.LayoutInflater.createView(LayoutInflater.java:471) 04-25
14:14:15.790: E/AndroidRuntime(12640): at
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
04-25 14:14:15.790: E/AndroidRuntime(12640): ... 22 more
My build-path is as follows:
FlurryAgent.jar
GoogleAdmobAdsSdk-4.1.0.jar
Android 2.2
How can I fix this?
Did you installed Android SDK 18 or later? If so, check where is your jar files. They should be in project_home/libs folder.

Categories

Resources