I just added the GreenDroid Library into my Application. I extended the startview with GDActivity and added the NFFApplication and added into the Manifest under the application tag android:name=".logic.NFFApplication".
NFFAplication:
public class NFFApplication extends GDApplication {
#Override
public Class<?> getHomeActivityClass() {
return NFFApplication.class;
}
#Override
public Intent getMainApplicationIntent() {
return new Intent(NFFApplication.this,MainView.class);
}
}
Login Activity:
public class LoginView extends GDActivity {
private ProgressDialog pd = null;
Editor editor = null;
#Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setTitle("Movie");
setActionBarContentView(R.layout.loginlayout);
LogCat:
04-05 16:12:16.714: E/AndroidRuntime(443): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.korn.nff/com.korn.nff.view.LoginView}: android.view.InflateException: Binary XML file line #27: Error inflating class greendroid.widget.ActionBar
04-05 16:12:16.714: E/AndroidRuntime(443): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.os.Handler.dispatchMessage(Handler.java:99)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.os.Looper.loop(Looper.java:123)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.app.ActivityThread.main(ActivityThread.java:4363)
04-05 16:12:16.714: E/AndroidRuntime(443): at java.lang.reflect.Method.invokeNative(Native Method)
04-05 16:12:16.714: E/AndroidRuntime(443): at java.lang.reflect.Method.invoke(Method.java:521)
04-05 16:12:16.714: E/AndroidRuntime(443): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
04-05 16:12:16.714: E/AndroidRuntime(443): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
04-05 16:12:16.714: E/AndroidRuntime(443): at dalvik.system.NativeStart.main(Native Method)
04-05 16:12:16.714: E/AndroidRuntime(443): Caused by: android.view.InflateException: Binary XML file line #27: Error inflating class greendroid.widget.ActionBar
04-05 16:12:16.714: E/AndroidRuntime(443): at android.view.LayoutInflater.createView(LayoutInflater.java:513)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
04-05 16:12:16.714: E/AndroidRuntime(443): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.app.Activity.setContentView(Activity.java:1622)
04-05 16:12:16.714: E/AndroidRuntime(443): at greendroid.app.GDActivity.ensureLayout(GDActivity.java:187)
04-05 16:12:16.714: E/AndroidRuntime(443): at greendroid.app.GDActivity.getActionBar(GDActivity.java:265)
04-05 16:12:16.714: E/AndroidRuntime(443): at greendroid.app.GDActivity.setTitle(GDActivity.java:256)
04-05 16:12:16.714: E/AndroidRuntime(443): at com.korn.nff.view.LoginView.onCreate(LoginView.java:39)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
04-05 16:12:16.714: E/AndroidRuntime(443): ... 11 more
04-05 16:12:16.714: E/AndroidRuntime(443): Caused by: java.lang.reflect.InvocationTargetException
04-05 16:12:16.714: E/AndroidRuntime(443): at greendroid.widget.ActionBar.<init>(ActionBar.java:130)
04-05 16:12:16.714: E/AndroidRuntime(443): at java.lang.reflect.Constructor.constructNative(Native Method)
04-05 16:12:16.714: E/AndroidRuntime(443): at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.view.LayoutInflater.createView(LayoutInflater.java:500)
04-05 16:12:16.714: E/AndroidRuntime(443): ... 24 more
04-05 16:12:16.714: E/AndroidRuntime(443): Caused by: android.content.res.Resources$NotFoundException: File res/drawable-hdpi/title_bar_shadow.9.png from drawable resource ID #0x0
04-05 16:12:16.714: E/AndroidRuntime(443): at android.content.res.Resources.loadDrawable(Resources.java:1710)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.content.res.TypedArray.getDrawable(TypedArray.java:548)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.view.View.<init>(View.java:1850)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.view.View.<init>(View.java:1799)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.view.ViewGroup.<init>(ViewGroup.java:284)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.widget.LinearLayout.<init>(LinearLayout.java:92)
04-05 16:12:16.714: E/AndroidRuntime(443): at greendroid.widget.ActionBar.<init>(ActionBar.java:134)
04-05 16:12:16.714: E/AndroidRuntime(443): ... 28 more
04-05 16:12:16.714: E/AndroidRuntime(443): Caused by: java.io.FileNotFoundException: res/drawable-hdpi/title_bar_shadow.9.png
04-05 16:12:16.714: E/AndroidRuntime(443): at android.content.res.AssetManager.openNonAssetNative(Native Method)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.content.res.AssetManager.openNonAsset(AssetManager.java:390)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.content.res.Resources.loadDrawable(Resources.java:1702)
I'm not 100% sure if this is the issue, but can it be that you've forgotten to override the theme? Greendroid needs a custom theme for the application to run.
Here's the line in the greendroid documentation:
You finally need to make your project use the GreenDroid base theme. In your AndroidManifest.xml, go to the application tag and add android:theme="#style/Theme.GreenDroid" as a new attribute.
Steps you have to follow:
Download the GreenDroid library on your computer with a simple: git
clone http://github.com/cyrilmottier/GreenDroid.git. As usual, Git
will clone the GreenDroid repository and create a folder GreenDroid
that contains a 3 folders:
GreenDroid: the core library. This is the code that will be mostly linked to your code
GreenDroid-GoogleAPIs: GreenDroid's extension including Google APIs related features (GDMapActivity for instance)
GDCatalog: the demonstration application. This project contains a lot of snippet of code showing you how to use GreenDroid.
Since May 2010, the ADT plugin added an amazing new feature: the
ability to work with library projects. Using GreenDroid consists on
applying the GreenDroid project as a library to your application. A
complete description on how to use library projects is given on the
Android documentation website. Make sure your development
environment uses the latest tools and platforms, since older
releases of the tools and platforms do not support building with
library project.
In case you want to use some Google APIs features, make sure you are
using the GreenDroid-GoogleAPIs library. GreenDroid-GoogleAPIs is
based on GreenDroid. As a result, you don't need to link GreenDroid
as an Android library to your project. By default, the GreenDroid
theme inherits from #android:style/Theme. If your project inherits
from a different theme, you'll have to modify the GreenDroid library
on your own (and do that everytime you are updating GreenDroid as
updating deletes all of your changes - still working on a way to
overcome that problem). Open the res/values/gd_themes.xml and
replace the parent theme #android:style/Theme with your own theme.
A lot of GreenDroid's feature (GDActivity, GDListActivity or
GDTabActivity for instance) requires your application to be a
GDApplication so make sure your application is a GDApplication
class. In order to do that, simply add
android:name="greendroid.app.GDApplication (where
greendroid.app.GDApplication may be replaced by your own class that
inherits from GDApplication) in the application tag of your
AndroidManifest.xml.
You finally need to make your project use the GreenDroid base theme.
In your AndroidManifest.xml, go to the application tag and add
android:theme="#style/Theme.GreenDroid" as a new attribute.
Related
In an app with minSdkLevel=9 a splash screen is displayed by the following code:
public class SplashActivity extends Activity {
private static final int DELAY = 3000;
#Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
try {
setContentView(R.layout.activity_splash);
} catch (OutOfMemoryError e) {
// ignore
}
new Handler().postDelayed(new Runnable() {
#Override
public void run() {
final Intent intent = new Intent(
SplashActivity.this, MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
startActivity(intent);
finish();
}
}, DELAY);
Utils.init(this);
}
#Override
public void onBackPressed() {
// protect from exiting the application when splash screen is shown
}
}
The activity_splash.xml layout file consists mainly of an ImageView:
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:contentDescription="#string/app_name"
android:scaleType="centerInside"
android:src="#drawable/splash" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:text="#string/copyright" />
</FrameLayout>
Unfortunately, on Nexus 1 the app crashes with out of memory error:
There are 2 variants of splash.png - for mdpi (280 KByte) and xxhdpi:
Surely the splash image could be scaled down more and more variants of it could be provided (ldpi, xhdpi, ...) - but why does not the try/catch in above Java code help here?
And is there maybe a better way to handle this - maybe some directive for AndroidManifest.xml to skip SplashActivity and load MainActivity on low-memory devices?
Here the full crash trace:
java.lang.RuntimeException: Unable to start activity ComponentInfo{XXX/XXX.SplashActivity}: android.view.InflateException: Binary XML file line #9: Error inflating class android.widget.ImageView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class android.widget.ImageView
at android.view.LayoutInflater.createView(LayoutInflater.java:518)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
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:207)
at android.app.Activity.setContentView(Activity.java:1657)
at XXX.SplashActivity.onCreate(SplashActivity.java:16)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
at android.view.LayoutInflater.createView(LayoutInflater.java:505)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
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:207)
at android.app.Activity.setContentView(Activity.java:1657)
at XXX.SplashActivity.onCreate(SplashActivity.java:16)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:460)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:336)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
at android.content.res.Resources.loadDrawable(Resources.java:1709)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.widget.ImageView.<init>(ImageView.java:118)
at android.widget.ImageView.<init>(ImageView.java:108)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
at android.view.LayoutInflater.createView(LayoutInflater.java:505)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
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:207)
at android.app.Activity.setContentView(Activity.java:1657)
at XXX.SplashActivity.onCreate(SplashActivity.java:16)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
This is the relavant bit of the stack that tells me it's an InflateException:
Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class android.widget.ImageView
at android.view.LayoutInflater.createView(LayoutInflater.java:518)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
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:207)
at android.app.Activity.setContentView(Activity.java:1657)
at XXX.SplashActivity.onCreate(SplashActivity.java:16)
^ your method is here
The other "Caused by:s" below are the inner exceptions.
java.lang.RuntimeException: Unable to start activity ComponentInfo{XXX/XXX.SplashActivity}: android.view.InflateException: Binary XML file line #9: Error inflating class android.widget.ImageView
Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class android.widget.ImageView
Caused by: java.lang.reflect.InvocationTargetException
Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
Try to re-size the Image from .png to .jpg format. This will decrease the size at nearly half scale. Then use a largeHeap tag in your Activities manifest file,
<application
....
android:largeHeap="true">
Also remember to make a try catch block so that you can bypass showing the Splash screen and redirect to the main activity.
While( ! success ) {
try {
// load resources
} catch (OutOfMemoryError E) {
// do something to use less memory and try again
}
}
First of all, why would you even show this Splash screen? It's not good practice, it's code doesn't do anything other than just waiting for 3 seconds to pass, it's clearly causing problems yet you insist on fixing it rather than getting rid of it altogether. Silly!
Second of all, devices like N1 that came many years ago do not have the RAM capabilities like modern devices do. With just one bitmap you're exhausting it's resources. Either optimize your bitmap usage or get rid of it altogether and find an alternative if you have to have a Splash screen.
Recently I've added ActionBarSherlock to my android project. After adding it and testing application on AVD version 4.1 everything was fine, but launching application at 2.3.3 gives the next type of errors when starting activity at setContentView:
> 04-05 18:55:03.277: E/AndroidRuntime(659): FATAL EXCEPTION: main
04-05 18:55:03.277: E/AndroidRuntime(659): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.fitness.calculator/com.fitness.calculator.ProportionsActivity}: android.view.InflateException: Binary XML file line #26: Error inflating class com.actionbarsherlock.internal.widget.ActionBarContainer
04-05 18:55:03.277: E/AndroidRuntime(659): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.os.Handler.dispatchMessage(Handler.java:99)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.os.Looper.loop(Looper.java:123)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.app.ActivityThread.main(ActivityThread.java:3683)
04-05 18:55:03.277: E/AndroidRuntime(659): at java.lang.reflect.Method.invokeNative(Native Method)
04-05 18:55:03.277: E/AndroidRuntime(659): at java.lang.reflect.Method.invoke(Method.java:507)
04-05 18:55:03.277: E/AndroidRuntime(659): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
04-05 18:55:03.277: E/AndroidRuntime(659): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
04-05 18:55:03.277: E/AndroidRuntime(659): at dalvik.system.NativeStart.main(Native Method)
04-05 18:55:03.277: E/AndroidRuntime(659): Caused by: android.view.InflateException: Binary XML file line #26: Error inflating class com.actionbarsherlock.internal.widget.ActionBarContainer
04-05 18:55:03.277: E/AndroidRuntime(659): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
04-05 18:55:03.277: E/AndroidRuntime(659): at com.actionbarsherlock.internal.ActionBarSherlockCompat.generateLayout(ActionBarSherlockCompat.java:1045)
04-05 18:55:03.277: E/AndroidRuntime(659): at com.actionbarsherlock.internal.ActionBarSherlockCompat.installDecor(ActionBarSherlockCompat.java:915)
04-05 18:55:03.277: E/AndroidRuntime(659): at com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:849)
04-05 18:55:03.277: E/AndroidRuntime(659): at com.actionbarsherlock.app.SherlockActivity.setContentView(SherlockActivity.java:229)
04-05 18:55:03.277: E/AndroidRuntime(659): at com.fitness.calculator.MainMenuActivity.onCreate(MainMenuActivity.java:45)
04-05 18:55:03.277: E/AndroidRuntime(659): at com.fitness.calculator.ProportionsActivity.onCreate(ProportionsActivity.java:90)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
04-05 18:55:03.277: E/AndroidRuntime(659): ... 11 more
04-05 18:55:03.277: E/AndroidRuntime(659): Caused by: java.lang.reflect.InvocationTargetException
04-05 18:55:03.277: E/AndroidRuntime(659): at java.lang.reflect.Constructor.constructNative(Native Method)
04-05 18:55:03.277: E/AndroidRuntime(659): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.view.LayoutInflater.createView(LayoutInflater.java:505)
04-05 18:55:03.277: E/AndroidRuntime(659): ... 24 more
04-05 18:55:03.277: E/AndroidRuntime(659): Caused by: java.lang.NoSuchMethodError: com.actionbarsherlock.internal.widget.ActionBarContainer.setBackground
04-05 18:55:03.277: E/AndroidRuntime(659): at com.actionbarsherlock.internal.widget.ActionBarContainer.<init>(ActionBarContainer.java:58)
04-05 18:55:03.277: E/AndroidRuntime(659): ... 27 more
Does anybody have an idea what could cause that type of error? Any ideas? I can't find a solution for this problem.
I fixed this problem by re-adding clear ActionBarSherlock library. First time I have fixed all warnings in library, and that caused the problem. So don't try to fix warnings in ActionBarSherlock. Hope this will help somebody.
My reports provide me this error but I can't understand how is it possible?
java.lang.RuntimeException: Unable to start activity ComponentInfo{net.aviascanner.aviascanner/net.aviascanner.aviascanner.ui.activities.GetCitiesActivity}: android.view.InflateException: Binary XML file line #11: Error inflating class <unknown>
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2753)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3905)
at android.app.ActivityThread.access$2600(ActivityThread.java:129)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2121)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4717)
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:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:513)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
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.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:853)
at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:262)
at net.aviascanner.aviascanner.ui.activities.GetCitiesActivity.onCreate(GetCitiesActivity.java:115)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2717)
... 12 more
Caused by: java.lang.reflect.InvocationTargetException
at android.widget.EditText.<init>(EditText.java:51)
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)
... 25 more
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/selector_edittext.xml from drawable resource ID #0x7f0200c4
at android.content.res.Resources.loadDrawable(Resources.java:1725)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:1901)
at android.widget.TextView.<init>(TextView.java:440)
at android.widget.EditText.<init>(EditText.java:55)
... 29 more
Caused by: java.lang.NullPointerException
at android.graphics.drawable.DrawableContainer$DrawableContainerState.addChild(DrawableContainer.java:349)
at android.graphics.drawable.StateListDrawable$StateListState.addStateSet(StateListDrawable.java:265)
at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:796)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:737)
at android.content.res.Resources.loadDrawable(Resources.java:1722)
... 33 more
android.view.InflateException: Binary XML file line #11: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:513)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
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.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:853)
at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:262)
at net.aviascanner.aviascanner.ui.activities.GetCitiesActivity.onCreate(GetCitiesActivity.java:115)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2717)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3905)
at android.app.ActivityThread.access$2600(ActivityThread.java:129)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2121)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4717)
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:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at android.widget.EditText.<init>(EditText.java:51)
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)
... 25 more
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/selector_edittext.xml from drawable resource ID #0x7f0200c4
at android.content.res.Resources.loadDrawable(Resources.java:1725)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:1901)
at android.widget.TextView.<init>(TextView.java:440)
at android.widget.EditText.<init>(EditText.java:55)
... 29 more
Caused by: java.lang.NullPointerException
at android.graphics.drawable.DrawableContainer$DrawableContainerState.addChild(DrawableContainer.java:349)
at android.graphics.drawable.StateListDrawable$StateListState.addStateSet(StateListDrawable.java:265)
at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:796)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:737)
at android.content.res.Resources.loadDrawable(Resources.java:1722)
... 33 more
java.lang.reflect.InvocationTargetException
at android.widget.EditText.<init>(EditText.java:51)
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)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
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.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:853)
at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:262)
at net.aviascanner.aviascanner.ui.activities.GetCitiesActivity.onCreate(GetCitiesActivity.java:115)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2717)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3905)
at android.app.ActivityThread.access$2600(ActivityThread.java:129)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2121)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4717)
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:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/selector_edittext.xml from drawable resource ID #0x7f0200c4
at android.content.res.Resources.loadDrawable(Resources.java:1725)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:1901)
at android.widget.TextView.<init>(TextView.java:440)
at android.widget.EditText.<init>(EditText.java:55)
... 29 more
Caused by: java.lang.NullPointerException
at android.graphics.drawable.DrawableContainer$DrawableContainerState.addChild(DrawableContainer.java:349)
at android.graphics.drawable.StateListDrawable$StateListState.addStateSet(StateListDrawable.java:265)
at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:796)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:737)
at android.content.res.Resources.loadDrawable(Resources.java:1722)
... 33 more
android.content.res.Resources$NotFoundException: File res/drawable/selector_edittext.xml from drawable resource ID #0x7f0200c4
at android.content.res.Resources.loadDrawable(Resources.java:1725)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:1901)
at android.widget.TextView.<init>(TextView.java:440)
at android.widget.EditText.<init>(EditText.java:55)
at android.widget.EditText.<init>(EditText.java:51)
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)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
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.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:853)
at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:262)
at net.aviascanner.aviascanner.ui.activities.GetCitiesActivity.onCreate(GetCitiesActivity.java:115)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2717)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3905)
at android.app.ActivityThread.access$2600(ActivityThread.java:129)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2121)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4717)
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:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.graphics.drawable.DrawableContainer$DrawableContainerState.addChild(DrawableContainer.java:349)
at android.graphics.drawable.StateListDrawable$StateListState.addStateSet(StateListDrawable.java:265)
at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:796)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:737)
at android.content.res.Resources.loadDrawable(Resources.java:1722)
... 33 more
java.lang.NullPointerException
at android.graphics.drawable.DrawableContainer$DrawableContainerState.addChild(DrawableContainer.java:349)
at android.graphics.drawable.StateListDrawable$StateListState.addStateSet(StateListDrawable.java:265)
at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:796)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:737)
at android.content.res.Resources.loadDrawable(Resources.java:1722)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:1901)
at android.widget.TextView.<init>(TextView.java:440)
at android.widget.EditText.<init>(EditText.java:55)
at android.widget.EditText.<init>(EditText.java:51)
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)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
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.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:853)
at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:262)
at net.aviascanner.aviascanner.ui.activities.GetCitiesActivity.onCreate(GetCitiesActivity.java:115)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2717)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3905)
at android.app.ActivityThread.access$2600(ActivityThread.java:129)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2121)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4717)
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:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
I have found this error in my application also. In my application I solved my problem by making the copies of the drawables in all the folders of the drawables i.e. drawable-ldpi, drawable-mdpi, drawable-hdpi, drawable-xhdpi. This works correctly in my application. Hope this will solve your problem if u have not kept the drawables into all the provided drawable folders.
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
Ok so i update to eclipse adt to version 17 and I get this error
04-05 12:28:55.810: E/AndroidRuntime(5470): FATAL EXCEPTION: main
04-05 12:28:55.810: E/AndroidRuntime(5470): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.galeola.agentis/com.galeola.agentis.activity.GestionaleActivity}: java.lang.ClassNotFoundException: com.galeola.agentis.activity.GestionaleActivity in loader dalvik.system.PathClassLoader[/system/framework/com.google.android.maps.jar:/data/app/com.galeola.agentis-1.apk]
04-05 12:28:55.810: E/AndroidRuntime(5470): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1742)
04-05 12:28:55.810: E/AndroidRuntime(5470): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1834)
04-05 12:28:55.810: E/AndroidRuntime(5470): at android.app.ActivityThread.access$500(ActivityThread.java:122)
04-05 12:28:55.810: E/AndroidRuntime(5470): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1027)
04-05 12:28:55.810: E/AndroidRuntime(5470): at android.os.Handler.dispatchMessage(Handler.java:99)
04-05 12:28:55.810: E/AndroidRuntime(5470): at android.os.Looper.loop(Looper.java:132)
04-05 12:28:55.810: E/AndroidRuntime(5470): at android.app.ActivityThread.main(ActivityThread.java:4126)
04-05 12:28:55.810: E/AndroidRuntime(5470): at java.lang.reflect.Method.invokeNative(Native Method)
04-05 12:28:55.810: E/AndroidRuntime(5470): at java.lang.reflect.Method.invoke(Method.java:491)
04-05 12:28:55.810: E/AndroidRuntime(5470): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
04-05 12:28:55.810: E/AndroidRuntime(5470): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
04-05 12:28:55.810: E/AndroidRuntime(5470): at dalvik.system.NativeStart.main(Native Method)
04-05 12:28:55.810: E/AndroidRuntime(5470): Caused by: java.lang.ClassNotFoundException: com.galeola.agentis.activity.GestionaleActivity in loader dalvik.system.PathClassLoader[/system/framework/com.google.android.maps.jar:/data/app/com.galeola.agentis-1.apk]
04-05 12:28:55.810: E/AndroidRuntime(5470): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:251)
04-05 12:28:55.810: E/AndroidRuntime(5470): at java.lang.ClassLoader.loadClass(ClassLoader.java:540)
04-05 12:28:55.810: E/AndroidRuntime(5470): at java.lang.ClassLoader.loadClass(ClassLoader.java:500)
04-05 12:28:55.810: E/AndroidRuntime(5470): at android.app.Instrumentation.newActivity(Instrumentation.java:1022)
04-05 12:28:55.810: E/AndroidRuntime(5470): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1733)
04-05 12:28:55.810: E/AndroidRuntime(5470): ... 11 more
however if i move my libraries to /libs i can start the applications, but with the libraries in /libs javadoc and javasources stops working, while if they are not in /libs javadoc and javasource works, so I don't understand why.
Have a look at Xavier Ducrohet's answers here. But basically, with adt17 you cannot attach Javadoc to your dependencies.
For non library projects:
As mentioned in the original question comment 8 in this android issue fixes the build, runtime and javadoc issues, albeit by way of a kludge.
Unfortunately Ant builds are broken. To fix Ant builds which use Proguard, move jars to lib as described in comment 8 and to ant.properties add:
jar.libs.dir=lib
and to proguard.cfg add:
-injars lib
The second addition is necessary to fix runtime crashes.
I've not tested this for projects that use instrumentation or emma tasks, but it seems OK for non-library projects where you want both an Eclipse and an Ant build.
Maybe the ADK update has messed-up with your project's build-path. Try removing the JAR and add it again to your libs folder, add it to your Build Path and do a Clean Project.
check my Question once -- New android SDK 17 issue
Ok so this is the bug and the solution is comment #8 http://code.google.com/p/android/issues/detail?id=27490#c8
Well, after hours of research , I found a simple solution.
Click on your Android Project
Select Properties
Select Java Build
Path Select Order and Export
Check all your references
Thats all !