Android Google maps crash when offline - android

I have a application that is about finished.
When the phone is online everything works as it should.
Since the application is soon to be released i tested it when the phone is offline.
This makes it crash.
After some debugging i found out that if i do not add any overlays it does not crash.
( i just get the grid, and that i can understand ;D )
As soon as a overlay tries to draw something it crashes.
This even includes the provided overlay "MyLocationOverlay", which crashes as soon as the GPS gets a fix (and therefore tries to draw the user location).
is there anything i am missing?
EDIT
By popular demand ;)
stack trace
I am sure that i do not add null objects into the overlay, which was the first thing i checked for
02-27 15:12:53.254: WARN/dalvikvm(5376): threadid=1: thread exiting with uncaught exception (group=0x400259f8)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): FATAL EXCEPTION: main
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): java.lang.NullPointerException
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at com.google.android.maps.ItemizedOverlay.getItemsAtLocation(ItemizedOverlay.java:617)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at com.google.android.maps.ItemizedOverlay.getItemAtLocation(ItemizedOverlay.java:586)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at com.google.android.maps.ItemizedOverlay.handleMotionEvent(ItemizedOverlay.java:498)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at com.google.android.maps.ItemizedOverlay.onTouchEvent(ItemizedOverlay.java:572)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at com.google.android.maps.OverlayBundle.onTouchEvent(OverlayBundle.java:63)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at com.google.android.maps.MapView.onTouchEvent(MapView.java:643)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at android.view.View.dispatchTouchEvent(View.java:3765)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:905)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:871)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:871)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:871)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:871)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1701)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1116)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at android.app.Activity.dispatchTouchEvent(Activity.java:2093)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1685)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at android.view.ViewRoot.handleMessage(ViewRoot.java:1802)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at android.os.Handler.dispatchMessage(Handler.java:99)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at android.os.Looper.loop(Looper.java:144)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at android.app.ActivityThread.main(ActivityThread.java:4937)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at java.lang.reflect.Method.invokeNative(Native Method)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at java.lang.reflect.Method.invoke(Method.java:521)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
02-27 15:12:53.264: ERROR/AndroidRuntime(5376): at dalvik.system.NativeStart.main(Native Method)

I had the same problem, I solved it by making sure that the overlay that I added actually has items on it. When adding overlays without items I get the same stacktrace you got and application stops working with a forced close.
This is on android 2.1, and might be fixed on other versions.

Related

java.lang.NullPointerException in login using sqlite

I am trying to login using the phone_no and password but its giving NullPointerException when I'm using this :
Cursor cursor=db.query("CitizenDetails", null, "phone=?", new String[]{phone}, null, null, null);
Where is it going wrong? My head is paining trying to figure this out for hours thanks.
Logcat :
02-27 12:10:58.783: E/AndroidRuntime(6586): FATAL EXCEPTION: main
02-27 12:10:58.783: E/AndroidRuntime(6586): java.lang.NullPointerException
02-27 12:10:58.783: E/AndroidRuntime(6586): at com.example.customdialogregistration.DatabaseHelper.getSinlgeEntry(DatabaseHelper.java:200)
02-27 12:10:58.783: E/AndroidRuntime(6586): at com.example.customdialogregistration.MainActivity$1$1.onClick(MainActivity.java:75)
02-27 12:10:58.783: E/AndroidRuntime(6586): at android.view.View.performClick(View.java:4204)
02-27 12:10:58.783: E/AndroidRuntime(6586): at android.view.View$PerformClick.run(View.java:17355)
02-27 12:10:58.783: E/AndroidRuntime(6586): at android.os.Handler.handleCallback(Handler.java:725)
02-27 12:10:58.783: E/AndroidRuntime(6586): at android.os.Handler.dispatchMessage(Handler.java:92)
02-27 12:10:58.783: E/AndroidRuntime(6586): at android.os.Looper.loop(Looper.java:137)
02-27 12:10:58.783: E/AndroidRuntime(6586): at android.app.ActivityThread.main(ActivityThread.java:5041)
02-27 12:10:58.783: E/AndroidRuntime(6586): at java.lang.reflect.Method.invokeNative(Native Method)
02-27 12:10:58.783: E/AndroidRuntime(6586): at java.lang.reflect.Method.invoke(Method.java:511)
02-27 12:10:58.783: E/AndroidRuntime(6586): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
02-27 12:10:58.783: E/AndroidRuntime(6586): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
02-27 12:10:58.783: E/AndroidRuntime(6586): at dalvik.system.NativeStart.main(Native Method)
Have you initialize this line before
SQLiteDatabase db = this.getWritableDatabase();
That row can NPE only if db is null.

NullPointerException when putting an EditText in XML Layout File

This is an Android Development related question.
I make use of the ADT and Eclipse Indigo in a Windows 7 64bits
First we have the xml layout file:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<EditText
android:id="#+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10" >
</EditText>
</LinearLayout>
Second, we have the class that makes a reference to the xml file right above
package com.example.test_table;
import android.os.Bundle;
import android.app.Activity;
public class Home extends Activity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
}
}
In third place, we got the declaration in the manifest of the class Home
<activity
android:name="com.example.test_table.Home"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
And then, when I try to run, Eclipse returns a nullpointerexception.
But when I remove the EditText from the xml layout file, the application works.
This problem suddenly appeared in my computer and I'm trying to do something about it.
LogCat:
02-27 22:42:39.051: E/AndroidRuntime(12164): FATAL EXCEPTION: main
02-27 22:42:39.051: E/AndroidRuntime(12164): java.lang.RuntimeException: Unable to start activity ComponentInfo {com.example.test_table/com.example.test_table.Home}: java.lang.NullPointerException
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1970)
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995)
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.app.ActivityThread.access$600(ActivityThread.java:128)
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1161)
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.os.Handler.dispatchMessage(Handler.java:99)
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.os.Looper.loop(Looper.java:137)
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.app.ActivityThread.main(ActivityThread.java:4514)
02-27 22:42:39.051: E/AndroidRuntime(12164): at java.lang.reflect.Method.invokeNative(Native Method)
02-27 22:42:39.051: E/AndroidRuntime(12164): at java.lang.reflect.Method.invoke(Method.java:511)
02-27 22:42:39.051: E/AndroidRuntime(12164): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
02-27 22:42:39.051: E/AndroidRuntime(12164): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
02-27 22:42:39.051: E/AndroidRuntime(12164): at dalvik.system.NativeStart.main(Native Method)
02-27 22:42:39.051: E/AndroidRuntime(12164): Caused by: java.lang.NullPointerException
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.sec.clipboard.ClipboardExManager.updateData(ClipboardExManager.java:241)
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.widget.EditText.onFocusChanged(EditText.java:134)
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.view.View.handleFocusGainInternal(View.java:3727)
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.view.View.requestFocus(View.java:5420)
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.view.View.requestFocus(View.java:5370)
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.view.View.requestFocus(View.java:5348)
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.view.LayoutInflater.parseRequestFocus(LayoutInflater.java:753)
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.view.LayoutInflater.rInflate(LayoutInflater.java:724)
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
02-27 22:42:39.051: E/AndroidRuntime(12164): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:273)
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.app.Activity.setContentView(Activity.java:1835)
02-27 22:42:39.051: E/AndroidRuntime(12164): at com.example.test_table.Home.onCreate(Home.java:11)
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.app.Activity.performCreate(Activity.java:4465)
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1053)
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1934)
02-27 22:42:39.051: E/AndroidRuntime(12164): ... 11 more
So, I'd like to know what causes the ADT to stop recognizing an Edittext?
What is strange to me is this log:
02-27 22:42:39.051: E/AndroidRuntime(12164): at android.sec.clipboard.ClipboardExManager.updateData(ClipboardExManager.java:241)
Putting that into a Google search seems to pull results about a bug in Samsung devices and the soft keyboard. I am assuming that is what you are using because it does not look like any non-Samsung results are appearing. I would look into this bug, and possibly try to disable the keyboard from appearing when the application is first launched. This may stop it from crashing in onCreate() until you actually focus the EditText by clicking it. Putting Something like this in onCreate() can help you out with that:
this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
Like I said in my comment, your code is correct. Try testing it on the emulator or another Android device. I will try to help you further if anything else comes up.
Here are some of the links I skimmed through:
https://code.google.com/p/android/issues/detail?id=35358
http://forum.xda-developers.com/showthread.php?t=1655619
https://code.google.com/p/android/issues/detail?id=36322
try using edit text in your java file and refer it
EditText edt = (EditText) findViewById(path);

ImageMagick for android...Program Crashing [duplicate]

i am using image magic in my project, i get it from this https://github.com/lilac/Android-ImageMagick , after editing some code from this. when i compile this i am getting this error
02-27 11:37:05.329: E/AndroidRuntime(339): java.lang.ExceptionInInitializerError
here final MagickImage img = new MagickImage(new ImageInfo("/sdcard/image.jpeg")); and this
02-27 11:37:05.329: E/AndroidRuntime(339): Caused by: java.lang.UnsatisfiedLinkError: Library android-magick not found
: init
here System.loadLibrary("android-magick"); i am new to this please help me..
this is the logcat
02-27 11:37:05.329: E/AndroidRuntime(339): FATAL EXCEPTION: main
02-27 11:37:05.329: E/AndroidRuntime(339): java.lang.ExceptionInInitializerError
02-27 11:37:05.329: E/AndroidRuntime(339): at magick.AndroidMagickActivity.onCreate(AndroidMagickActivity.java:44)
02-27 11:37:05.329: E/AndroidRuntime(339): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
02-27 11:37:05.329: E/AndroidRuntime(339): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
02-27 11:37:05.329: E/AndroidRuntime(339): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
02-27 11:37:05.329: E/AndroidRuntime(339): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
02-27 11:37:05.329: E/AndroidRuntime(339): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
02-27 11:37:05.329: E/AndroidRuntime(339): at android.os.Handler.dispatchMessage(Handler.java:99)
02-27 11:37:05.329: E/AndroidRuntime(339): at android.os.Looper.loop(Looper.java:123)
02-27 11:37:05.329: E/AndroidRuntime(339): at android.app.ActivityThread.main(ActivityThread.java:4627)
02-27 11:37:05.329: E/AndroidRuntime(339): at java.lang.reflect.Method.invokeNative(Native Method)
02-27 11:37:05.329: E/AndroidRuntime(339): at java.lang.reflect.Method.invoke(Method.java:521)
02-27 11:37:05.329: E/AndroidRuntime(339): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-27 11:37:05.329: E/AndroidRuntime(339): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
02-27 11:37:05.329: E/AndroidRuntime(339): at dalvik.system.NativeStart.main(Native Method)
02-27 11:37:05.329: E/AndroidRuntime(339): Caused by: java.lang.UnsatisfiedLinkError: Library android-magick not found
02-27 11:37:05.329: E/AndroidRuntime(339): at java.lang.Runtime.loadLibrary(Runtime.java:461)
02-27 11:37:05.329: E/AndroidRuntime(339): at java.lang.System.loadLibrary(System.java:557)
02-27 11:37:05.329: E/AndroidRuntime(339): at magick.Magick.(Magick.java:41)
02-27 11:37:05.329: E/AndroidRuntime(339): ... 14 more
Hey this is a common problem for Beginners. The library uses some of the Native methods.Follow the below steps
Download the library below link
https://github.com/puelocesar/android-lib-magick
Copy the contents of the libs folder of the downloaded library to
your libs folder
Copy the Folders "magick" and "fakeawt" to your projects src folder.
thats it now enjoy using it :)
i've just ported ImageMagick on android, this time with all CPU architectures, if they don't suit you. Rebuild with ndk-build simple.
All here https://github.com/tapaulo/Android-ImageMagick
Try to use this project : https://github.com/puelocesar/android-lib-magick
It work!

Unfortunately android application is stopped

05-10 22:12:43.572: E/dalvikvm(566): Could not find class 'com.commonsware.cwac.merge.MergeAdapter', referenced from method FXPAL.Unity.Android.UnityMain.updateView
05-10 22:12:43.862: E/dalvikvm(566): Could not find class 'com.xtify.android.sdk.PersistentLocationManager', referenced from method FXPAL.Unity.Android.ReportingService.onCreate
05-10 22:12:44.182: E/AndroidRuntime(566): FATAL EXCEPTION: main
05-10 22:12:44.182: E/AndroidRuntime(566): java.lang.NoClassDefFoundError: com.xtify.android.sdk.PersistentLocationManager
05-10 22:12:44.182: E/AndroidRuntime(566): at FXPAL.Unity.Android.ReportingService.onCreate(ReportingService.java:240)
05-10 22:12:44.182: E/AndroidRuntime(566): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2253)
05-10 22:12:44.182: E/AndroidRuntime(566): at android.app.ActivityThread.access$1600(ActivityThread.java:123)
05-10 22:12:44.182: E/AndroidRuntime(566): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1201)
05-10 22:12:44.182: E/AndroidRuntime(566): at android.os.Handler.dispatchMessage(Handler.java:99)
05-10 22:12:44.182: E/AndroidRuntime(566): at android.os.Looper.loop(Looper.java:137)
05-10 22:12:44.182: E/AndroidRuntime(566): at android.app.ActivityThread.main(ActivityThread.java:4424)
05-10 22:12:44.182: E/AndroidRuntime(566): at java.lang.reflect.Method.invokeNative(Native Method)
05-10 22:12:44.182: E/AndroidRuntime(566): at java.lang.reflect.Method.invoke(Method.java:511)
05-10 22:12:44.182: E/AndroidRuntime(566): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-10 22:12:44.182: E/AndroidRuntime(566): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-10 22:12:44.182: E/AndroidRuntime(566): at dalvik.system.NativeStart.main(Native Method)
05-10 22:12:55.702: E/dalvikvm(589): Could not find class 'com.xtify.android.sdk.PersistentLocationManager', referenced from method FXPAL.Unity.Android.ReportingService.onCreate
05-10 22:12:55.992: E/AndroidRuntime(589): FATAL EXCEPTION: main
05-10 22:12:55.992: E/AndroidRuntime(589): java.lang.NoClassDefFoundError: com.xtify.android.sdk.PersistentLocationManager
05-10 22:12:55.992: E/AndroidRuntime(589): at FXPAL.Unity.Android.ReportingService.onCreate(ReportingService.java:240)
05-10 22:12:55.992: E/AndroidRuntime(589): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2253)
05-10 22:12:55.992: E/AndroidRuntime(589): at android.app.ActivityThread.access$1600(ActivityThread.java:123)
05-10 22:12:55.992: E/AndroidRuntime(589): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1201)
05-10 22:12:55.992: E/AndroidRuntime(589): at android.os.Handler.dispatchMessage(Handler.java:99)
05-10 22:12:55.992: E/AndroidRuntime(589): at android.os.Looper.loop(Looper.java:137)
05-10 22:12:55.992: E/AndroidRuntime(589): at android.app.ActivityThread.main(ActivityThread.java:4424)
05-10 22:12:55.992: E/AndroidRuntime(589): at java.lang.reflect.Method.invokeNative(Native Method)
05-10 22:12:55.992: E/AndroidRuntime(589): at java.lang.reflect.Method.invoke(Method.java:511)
05-10 22:12:55.992: E/AndroidRuntime(589): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-10 22:12:55.992: E/AndroidRuntime(589): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-10 22:12:55.992: E/AndroidRuntime(589): at dalvik.system.NativeStart.main(Native Method)
05-10 22:13:01.262: E/dalvikvm(605): Could not find class 'com.commonsware.cwac.merge.MergeAdapter', referenced from method FXPAL.Unity.Android.UnityMain.updateView
05-10 22:13:01.502: E/dalvikvm(605): Could not find class 'com.xtify.android.sdk.PersistentLocationManager', referenced from method FXPAL.Unity.Android.ReportingService.onCreate
05-10 22:13:01.722: E/AndroidRuntime(605): FATAL EXCEPTION: main
05-10 22:13:01.722: E/AndroidRuntime(605): java.lang.NoClassDefFoundError: com.xtify.android.sdk.PersistentLocationManager
05-10 22:13:01.722: E/AndroidRuntime(605): at FXPAL.Unity.Android.ReportingService.onCreate(ReportingService.java:240)
05-10 22:13:01.722: E/AndroidRuntime(605): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2253)
05-10 22:13:01.722: E/AndroidRuntime(605): at android.app.ActivityThread.access$1600(ActivityThread.java:123)
05-10 22:13:01.722: E/AndroidRuntime(605): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1201)
05-10 22:13:01.722: E/AndroidRuntime(605): at android.os.Handler.dispatchMessage(Handler.java:99)
05-10 22:13:01.722: E/AndroidRuntime(605): at android.os.Looper.loop(Looper.java:137)
05-10 22:13:01.722: E/AndroidRuntime(605): at android.app.ActivityThread.main(ActivityThread.java:4424)
05-10 22:13:01.722: E/AndroidRuntime(605): at java.lang.reflect.Method.invokeNative(Native Method)
05-10 22:13:01.722: E/AndroidRuntime(605): at java.lang.reflect.Method.invoke(Method.java:511)
05-10 22:13:01.722: E/AndroidRuntime(605): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-10 22:13:01.722: E/AndroidRuntime(605): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-10 22:13:01.722: E/AndroidRuntime(605): at dalvik.system.NativeStart.main(Native Method)
I am new to android development.I am upgrading an android application from 2.2 Android to 4.0.3. The application is not starting and saying "Unfortunately myUnity application has stopped", but previously the application was good.The above is the error log i am getting while I debug the application.I am also pasting my manifest file below. Please help me out guys as I am facing this problem since many days.
Thanks in advance.
Android manifest file is
-->
Thanks in advance.... i am also new to stackflow... i am really sorry if I posted the question in wrong format.
Regards,
Rakesh.
LogCat
05-15 06:52:35.898: E/dalvikvm(1436): Could not find class 'com.commonsware.cwac.merge.MergeAdapter', referenced from method FXPAL.Unity.Android.UnityMain.updateView
05-15 06:52:36.187: E/dalvikvm(1436): Could not find class 'com.xtify.android.sdk.PersistentLocationManager', referenced from method FXPAL.Unity.Android.ReportingService.onCreate
The above is my logcat. Looking forward to your help guyz. The below is my android Manifest
Well I had made changes in my Android Environment. I was using some external libraries (JARs) and I was also getting this "NoClassDef" error. I made a folder by name of "libs" copied the libraries into it. Right clicked on "libs" then buildpath -> add as source folder.
I hope this helps :)
Your problem is `
java.lang.NoClassDefFoundError: com.xtify.android.sdk.PersistentLocationManager
`
Copied from documentation:
Thrown if the Java Virtual Machine or a ClassLoader instance tries to
load in the definition of a class (as part of a normal method call or
as part of creating a new instance using the new expression) and no
definition of the class could be found. The searched-for class
definition existed when the currently executing class was compiled,
but the definition can no longer be found.
Reason of NoClassDefFoundError is that a particular class is not available in Classpath, so u need to add that into Classpath. Try it.
No apologies needed, posting the logcat is the right thing to do. The first line says "Could not find class 'com.commonsware.cwac.merge.MergeAdapter', referenced from method FXPAL.Unity.Android.UnityMain.updateView". Be sure you are still linking that package into your app.
BTW, I can't see your manifest file.

Android image magick

i am using image magic in my project, i get it from this https://github.com/lilac/Android-ImageMagick , after editing some code from this. when i compile this i am getting this error
02-27 11:37:05.329: E/AndroidRuntime(339): java.lang.ExceptionInInitializerError
here final MagickImage img = new MagickImage(new ImageInfo("/sdcard/image.jpeg")); and this
02-27 11:37:05.329: E/AndroidRuntime(339): Caused by: java.lang.UnsatisfiedLinkError: Library android-magick not found
: init
here System.loadLibrary("android-magick"); i am new to this please help me..
this is the logcat
02-27 11:37:05.329: E/AndroidRuntime(339): FATAL EXCEPTION: main
02-27 11:37:05.329: E/AndroidRuntime(339): java.lang.ExceptionInInitializerError
02-27 11:37:05.329: E/AndroidRuntime(339): at magick.AndroidMagickActivity.onCreate(AndroidMagickActivity.java:44)
02-27 11:37:05.329: E/AndroidRuntime(339): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
02-27 11:37:05.329: E/AndroidRuntime(339): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
02-27 11:37:05.329: E/AndroidRuntime(339): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
02-27 11:37:05.329: E/AndroidRuntime(339): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
02-27 11:37:05.329: E/AndroidRuntime(339): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
02-27 11:37:05.329: E/AndroidRuntime(339): at android.os.Handler.dispatchMessage(Handler.java:99)
02-27 11:37:05.329: E/AndroidRuntime(339): at android.os.Looper.loop(Looper.java:123)
02-27 11:37:05.329: E/AndroidRuntime(339): at android.app.ActivityThread.main(ActivityThread.java:4627)
02-27 11:37:05.329: E/AndroidRuntime(339): at java.lang.reflect.Method.invokeNative(Native Method)
02-27 11:37:05.329: E/AndroidRuntime(339): at java.lang.reflect.Method.invoke(Method.java:521)
02-27 11:37:05.329: E/AndroidRuntime(339): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-27 11:37:05.329: E/AndroidRuntime(339): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
02-27 11:37:05.329: E/AndroidRuntime(339): at dalvik.system.NativeStart.main(Native Method)
02-27 11:37:05.329: E/AndroidRuntime(339): Caused by: java.lang.UnsatisfiedLinkError: Library android-magick not found
02-27 11:37:05.329: E/AndroidRuntime(339): at java.lang.Runtime.loadLibrary(Runtime.java:461)
02-27 11:37:05.329: E/AndroidRuntime(339): at java.lang.System.loadLibrary(System.java:557)
02-27 11:37:05.329: E/AndroidRuntime(339): at magick.Magick.(Magick.java:41)
02-27 11:37:05.329: E/AndroidRuntime(339): ... 14 more
Hey this is a common problem for Beginners. The library uses some of the Native methods.Follow the below steps
Download the library below link
https://github.com/puelocesar/android-lib-magick
Copy the contents of the libs folder of the downloaded library to
your libs folder
Copy the Folders "magick" and "fakeawt" to your projects src folder.
thats it now enjoy using it :)
i've just ported ImageMagick on android, this time with all CPU architectures, if they don't suit you. Rebuild with ndk-build simple.
All here https://github.com/tapaulo/Android-ImageMagick
Try to use this project : https://github.com/puelocesar/android-lib-magick
It work!

Categories

Resources