Postgresql connection to Android app - android

I am trying to connect postgreSQL, using JBDC, to my Android app.
I have written a small program which will try to connect to the database and then the textView will change to connected.
I know for sure that the url is not correct but I followed this website: http://jdbc.postgresql.org/documentation/80/connect.html and used the first one.
Here is my code:
import android.app.Activity;
import android.content.Context;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import java.sql.*;
import java.util.Properties;
public class MainActivity extends Activity {
private static final String dbname = "postgres";
public static final String USER = " yOUR_DATABASE_USERNAME";
public static final String PASSWORD = "DATABASE_PASSWORD";
TextView text;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
text = (TextView) findViewById(R.id.tvConnect);
try {
Class.forName("org.postgresql.Driver");
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String url = "jdbc:postgresql:localhost:5432/postgres";
Connection conn;
try {
//conn = DriverManager.getConnection(url, USER, PASSWORD);
conn = DriverManager.getConnection(url);
text.setText("Connected");
} catch (SQLException e) {
// TODO Auto-generated catch block
Log.e("Tag", "Description", e);
}
}
}
These are the errors I am getting:
07-19 19:23:46.023: E/Tag(1246): Description
07-19 19:23:46.023: E/Tag(1246): org.postgresql.util.PSQLException: Something unusual has occurred to cause the driver to fail. Please report this exception.
07-19 19:23:46.023: E/Tag(1246): at org.postgresql.Driver.connect(Driver.java:300)
07-19 19:23:46.023: E/Tag(1246): at java.sql.DriverManager.getConnection(DriverManager.java:179)
07-19 19:23:46.023: E/Tag(1246): at java.sql.DriverManager.getConnection(DriverManager.java:144)
07-19 19:23:46.023: E/Tag(1246): at com.sql.postgre.MainActivity.onCreate(MainActivity.java:46)
07-19 19:23:46.023: E/Tag(1246): at android.app.Activity.performCreate(Activity.java:5231)
07-19 19:23:46.023: E/Tag(1246): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
07-19 19:23:46.023: E/Tag(1246): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
07-19 19:23:46.023: E/Tag(1246): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
07-19 19:23:46.023: E/Tag(1246): at android.app.ActivityThread.access$800(ActivityThread.java:135)
07-19 19:23:46.023: E/Tag(1246): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
07-19 19:23:46.023: E/Tag(1246): at android.os.Handler.dispatchMessage(Handler.java:102)
07-19 19:23:46.023: E/Tag(1246): at android.os.Looper.loop(Looper.java:136)
07-19 19:23:46.023: E/Tag(1246): at android.app.ActivityThread.main(ActivityThread.java:5017)
07-19 19:23:46.023: E/Tag(1246): at java.lang.reflect.Method.invokeNative(Native Method)
07-19 19:23:46.023: E/Tag(1246): at java.lang.reflect.Method.invoke(Method.java:515)
07-19 19:23:46.023: E/Tag(1246): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
07-19 19:23:46.023: E/Tag(1246): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
07-19 19:23:46.023: E/Tag(1246): at dalvik.system.NativeStart.main(Native Method)
07-19 19:23:46.023: E/Tag(1246): Caused by: android.os.NetworkOnMainThreadException
07-19 19:23:46.023: E/Tag(1246): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1145)
07-19 19:23:46.023: E/Tag(1246): at java.net.InetAddress.lookupHostByName(InetAddress.java:385)
07-19 19:23:46.023: E/Tag(1246): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
07-19 19:23:46.023: E/Tag(1246): at java.net.InetAddress.getByName(InetAddress.java:289)
07-19 19:23:46.023: E/Tag(1246): at java.net.InetSocketAddress.<init>(InetSocketAddress.java:105)
07-19 19:23:46.023: E/Tag(1246): at java.net.InetSocketAddress.<init>(InetSocketAddress.java:90)
07-19 19:23:46.023: E/Tag(1246): at org.postgresql.core.PGStream.<init>(PGStream.java:60)
07-19 19:23:46.023: E/Tag(1246): at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:101)
07-19 19:23:46.023: E/Tag(1246): at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:64)
07-19 19:23:46.023: E/Tag(1246): at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:136)
07-19 19:23:46.023: E/Tag(1246): at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:29)
07-19 19:23:46.023: E/Tag(1246): at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:21)
07-19 19:23:46.023: E/Tag(1246): at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:31)
07-19 19:23:46.023: E/Tag(1246): at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
07-19 19:23:46.023: E/Tag(1246): at org.postgresql.Driver.makeConnection(Driver.java:410)
07-19 19:23:46.023: E/Tag(1246): at org.postgresql.Driver.connect(Driver.java:280)

This might be a late answer but after reading about jdbc drivers for android many people have said that the jdbc jar does not work well at all for android and only one or two versions of the jar actually worked. Otherwise the best way of connecting your database with android is via a web service and using either Volley or Retrofit to talk to the database.

Android has built-in support for SQLite database. Please refer to android documentation or you may download this code demo to quickly check how to code it.
Still if it is required to access any other database server, that server must be running on a machine as android does not host any SQL server so localhost should not work, if you are testing your code with emulator use 10.0.2.2 instead of localhost to access your postgres server on host development machine.
Another important issue to take care of while accessing a database server involves network, executing network related code is not allowed to be executed as part of an activity class hence you must write your code in AsyncTask android API.

Related

app crash when first run on Android 4.4

I am using Android studio to build my app
I have 2 emulators the first uses Android 6.0 and the second uses Android 4.4
My app runs perfectly on the Android 6.0 but when I try it on 4.4 it crashes immediately.
I tried debugging the app by putting break point on the first like but it does not reach the first line. it crashes stright away.
The error message I got is not that clear, I dont know what the problem is and how to fix it.
01/23 17:26:16: Launching app
No apk changes detected since last installation, skipping installation of D:\__Schlogger\Android\Schlogger\app\build\outputs\apk\app-debug.apk
$ adb shell am force-stop com.asmgx.schlogger.app
$ adb shell am start -n "com.asmgx.schlogger.app/com.asmgx.schlogger.app.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Waiting for application to come online: com.asmgx.schlogger.app | com.asmgx.schlogger.app.test
Waiting for application to come online: com.asmgx.schlogger.app | com.asmgx.schlogger.app.test
Waiting for application to come online: com.asmgx.schlogger.app | com.asmgx.schlogger.app.test
Waiting for application to come online: com.asmgx.schlogger.app | com.asmgx.schlogger.app.test
Connecting to com.asmgx.schlogger.app
I/dalvikvm: Debugger is active
I/System.out: Debugger has connected
I/System.out: waiting for debugger to settle...
Connected to the target VM, address: 'localhost:8607', transport: 'socket'
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: debugger has settled (1368)
W/dalvikvm: VFY: unable to resolve static field 7536 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
D/dalvikvm: VFY: replacing opcode 0x60 at 0x000e
D/AndroidRuntime: Shutting down VM
W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x9cd52b20)
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.asmgx.schlogger.app, PID: 2822
java.lang.NoClassDefFoundError: com.google.android.gms.R$string
at com.google.android.gms.common.internal.zzai.<init>(Unknown Source)
at com.google.firebase.FirebaseOptions.fromResource(Unknown Source)
at com.google.firebase.FirebaseApp.zzek(Unknown Source)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1591)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1562)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Disconnected from the target VM, address: 'localhost:8607', transport: 'socket'
-----------------------------------------------------------------------------------------------------
After applying the solutions provided, I got another error, and still does not know what does it mean?
01-23 03:02:29.954 9105-9105/? I/dalvikvm: Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.widget.TintTypedArray.getType
01-23 03:02:29.954 9105-9105/? W/dalvikvm: VFY: unable to resolve virtual method 723: Landroid/content/res/TypedArray;.getType (I)I
01-23 03:02:29.954 9105-9105/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0008
01-23 03:02:29.964 9105-9105/? E/VdcInflateDelegate: Exception while inflating <vector>
org.xmlpull.v1.XmlPullParserException: Binary XML file line #17<vector> tag requires viewportHeight > 0
at android.support.graphics.drawable.VectorDrawableCompat.updateStateFromTypedArray(VectorDrawableCompat.java:720)
at android.support.graphics.drawable.VectorDrawableCompat.inflate(VectorDrawableCompat.java:654)
at android.support.graphics.drawable.VectorDrawableCompat.createFromXmlInner(VectorDrawableCompat.java:617)
at android.support.v7.widget.AppCompatDrawableManager$VdcInflateDelegate.createFromXmlInner(AppCompatDrawableManager.java:745)
at android.support.v7.widget.AppCompatDrawableManager.loadDrawableFromDelegates(AppCompatDrawableManager.java:365)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:195)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:188)
at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:723)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:193)
at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:81)
at android.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java:127)
at android.support.v7.app.AppCompatDelegateImplV9.<init>(AppCompatDelegateImplV9.java:147)
at android.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java:27)
at android.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java:53)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:205)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:185)
at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:525)
at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:74)
at com.asmgx.schlogger.app.MainActivity.onCreate(MainActivity.java:78)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
01-23 03:02:29.964 9105-9105/? D/AndroidRuntime: Shutting down VM
01-23 03:02:29.964 9105-9105/? W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x9cd52b20)
01-23 03:02:29.974 9105-9105/? D/dalvikvm: GC_FOR_ALLOC freed 365K, 12% free 3858K/4380K, paused 3ms, total 3ms
01-23 03:02:29.974 9105-9105/? E/UncaughtException: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.asmgx.schlogger.app/com.asmgx.schlogger.app.MainActivity}: android.content.res.Resources$NotFoundException: File res/drawable/abc_vector_test.xml from drawable resource ID #0x7f020054
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/abc_vector_test.xml from drawable resource ID #0x7f020054
at android.content.res.Resources.loadDrawable(Resources.java:2101)
at android.content.res.Resources.getDrawable(Resources.java:700)
at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:374)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:200)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:188)
at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:723)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:193)
at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:81)
at android.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java:127)
at android.support.v7.app.AppCompatDelegateImplV9.<init>(AppCompatDelegateImplV9.java:147)
at android.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java:27)
at android.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java:53)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:205)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:185)
at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:525)
at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:74)
at com.asmgx.schlogger.app.MainActivity.onCreate(MainActivity.java:78)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) 
at android.app.ActivityThread.access$800(ActivityThread.java:135) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:136) 
at android.app.ActivityThread.main(ActivityThread.java:5017) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 
at dalvik.system.NativeStart.main(Native Method) 
Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #17: invalid drawable tag vector
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:933)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:877)
at android.content.res.Resources.loadDrawable(Resources.java:2097)
at android.content.res.Resources.getDrawable(Resources.java:700) 
at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:374) 
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:200) 
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:188) 
at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:723) 
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:193) 
at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:81) 
at android.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java:127) 
at android.support.v7.app.AppCompatDelegateImplV9.<init>(AppCompatDelegateImplV9.java:147) 
at android.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java:27) 
at android.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java:53) 
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:205) 
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:185) 
at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:525) 
at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:74) 
at com.asmgx.schlogger.app.MainActivity.onCreate(MainActivity.java:78) 
at android.app.Activity.performCreate(Activity.java:5231) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) 
at android.app.ActivityThread.access$800(ActivityThread.java:135) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:136) 
at android.app.ActivityThread.main(ActivityThread.java:5017) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 
at dalvik.system.NativeStart.main(Native Method) 
01-23 03:02:29.974 9105-9130/? I/DynamiteModule: Considering local module com.google.android.gms.tagmanager:3 and remote module com.google.android.gms.tagmanager:8
01-23 03:02:29.974 9105-9130/? I/DynamiteModule: Selected remote version of com.google.android.gms.tagmanager, version >= 8
01-23 03:02:30.074 9105-9130/? W/GoogleTagManager: No container asset found in /assets/containers. Checking top level /assets directory for container assets.
01-23 03:02:30.194 9105-9130/? W/GoogleTagManager: Tag Manager's event handler WILL NOT be installed (no container loaded)
01-23 03:02:30.194 9105-9130/? I/GoogleTagManager: Tag Manager initilization took 218ms
01-23 03:02:30.194 9105-9130/? D/FA: Logging event (FE): _ae, Bundle[{_o=crash, timestamp=1485158549979, fatal=1}]
01-23 03:02:30.194 9105-9130/com.asmgx.schlogger.app V/FA: Using measurement service
01-23 03:02:30.204 9105-9130/com.asmgx.schlogger.app V/FA: Connection attempt already in progress
01-23 03:02:30.234 9105-9131/com.asmgx.schlogger.app D/dalvikvm: GC_FOR_ALLOC freed 454K, 14% free 3914K/4528K, paused 7ms, total 10ms
01-23 03:02:30.294 9105-9105/com.asmgx.schlogger.app E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.asmgx.schlogger.app, PID: 9105
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.asmgx.schlogger.app/com.asmgx.schlogger.app.MainActivity}: android.content.res.Resources$NotFoundException: File res/drawable/abc_vector_test.xml from drawable resource ID #0x7f020054
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/abc_vector_test.xml from drawable resource ID #0x7f020054
at android.content.res.Resources.loadDrawable(Resources.java:2101)
at android.content.res.Resources.getDrawable(Resources.java:700)
at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:374)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:200)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:188)
at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:723)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:193)
at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:81)
at android.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java:127)
at android.support.v7.app.AppCompatDelegateImplV9.<init>(AppCompatDelegateImplV9.java:147)
at android.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java:27)
at android.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java:53)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:205)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:185)
at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:525)
at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:74)
at com.asmgx.schlogger.app.MainActivity.onCreate(MainActivity.java:78)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) 
at android.app.ActivityThread.access$800(ActivityThread.java:135) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:136) 
at android.app.ActivityThread.main(ActivityThread.java:5017) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 
at dalvik.system.NativeStart.main(Native Method) 
Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #17: invalid drawable tag vector
Try to use this
STEP 1:
Go to your dependency and add this line
compile 'com.android.support:multidex:1.0.1'
and in the defaultConfig Section add this
defaultConfig {
minSdkVersion xx
targetSdkVersion xx
versionCode x
multiDexEnabled true
}
Then
Create a class called e.g MyApp.java
public class MyApp extends Application{
#Override
public void onCreate() {
super.onCreate();
}
#Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
}
STEP :2
Go to your manifest and do the following in the Application Tag
<application
android:name="MyApp"
.
.
.
in your gradle, set
multiDexEnabled true
and in Application class:
Extend Application class with MultiDexApplication
#Override
protected void attachBaseContext(Context base) {
MultiDex.install(this);
super.attachBaseContext(base);
}
because MultiDexApplication has not been extended so that it can't include gms and any other dex classes so it's giving error at starting of gms String.
You can refer here for more information on how to use multidex :
https://developer.android.com/studio/build/multidex.html

Android AlertDialog in AppCompatActivity

When I am using AlertDialog in ECLIPSE importing the followings
import android.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
My application builds but it's not the view I want. I want to use
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
But after installing the apk the application crashes. What I am doing wrong?
Crash log (perdon my long crash log)
07-19 13:09:13.273: I/Process(17722): Sending signal. PID: 17722 SIG: 9
07-19 13:09:20.993: D/ResourcesManager(17894): For user 0 new
overlays fetched Null
07-19 13:09:21.023: D/JniHelper(17894): JniHelper::setJavaVM
(0xb815f940), pthread_self() = -1225135284
07-19 13:09:21.063: D/Cocos2dxActivity(17894): model=SM-J510FN
07-19 13:09:21.063: D/Cocos2dxActivity(17894): product=j5xnltexx
07-19 13:09:21.063: D/Cocos2dxActivity(17894): isEmulator=false
07-19 13:09:21.073: E/SensorManager(17894): nativeGetSensorAtIndex:
name, vendor - 0, K2HH Acceleration , STM
07-19 13:09:21.083: E/SensorManager(17894): nativeGetSensorAtIndex:
name, vendor - 1, CM36672P Proximity Sensor, Capella Microsystems, Inc.
07-19 13:09:21.083: E/SensorManager(17894): nativeGetSensorAtIndex:
name, vendor - 2, SX9310 Grip Sensor, SEMTECH
07-19 13:09:21.083: E/SensorManager(17894): nativeGetSensorAtIndex:
name, vendor - 3, Screen Orientation Sensor, Samsung Electronics
07-19 13:09:21.093: V/PTServicesBridge(17894): PTServicesBridge -- INIT
07-19 13:09:21.113: W/PopupManager(17894): You have not specified a View
to use as content view for popups. Falling back to the Activity
content view. Note that this may not work as expected in multi-
screen environments
07-19 13:09:21.123: D/AndroidRuntime(17894): Shutting down VM
07-19 13:09:21.133: E/AndroidRuntime(17894): FATAL EXCEPTION: main
07-19 13:09:21.133: E/AndroidRuntime(17894): Process: com.tembo.huerun,
PID: 17894
07-19 13:09:21.133: E/AndroidRuntime(17894): java.lang.NoClassDefFoundError:
Failed resolution of: Landroid/support/v7/appcompat/R$attr;
07-19 13:09:21.133: E/AndroidRuntime(17894): at
android.support.v7.app.AlertDialog.resolveDialogTheme(AlertDialog.java:108)
07-19 13:09:21.133: E/AndroidRuntime(17894): at
android.support.v7.app.AlertDialog$Builder.<init>(AlertDialog.java:285)
07-19 13:09:21.133: E/AndroidRuntime(17894): at
com.tembo.huerun.AppRater.showRateDialog(AppRater.java:63)
07-19 13:09:21.133: E/AndroidRuntime(17894): at
com.tembo.huerun.AppRater.app_launched(AppRater.java:52)
07-19 13:09:21.133: E/AndroidRuntime(17894): at
com.tembo.huerun.PTPlayer.onCreate(PTPlayer.java:52)
07-19 13:09:21.133: E/AndroidRuntime(17894): at
android.app.Activity.performCreate(Activity.java:6877)
07-19 13:09:21.133: E/AndroidRuntime(17894): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1136)
07-19 13:09:21.133: E/AndroidRuntime(17894): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3209)
07-19 13:09:21.133: E/AndroidRuntime(17894): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3352)
07-19 13:09:21.133: E/AndroidRuntime(17894): at
android.app.ActivityThread.access$1100(ActivityThread.java:223)
07-19 13:09:21.133: E/AndroidRuntime(17894): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1797)
07-19 13:09:21.133: E/AndroidRuntime(17894): at
android.os.Handler.dispatchMessage(Handler.java:102)
07-19 13:09:21.133: E/AndroidRuntime(17894): at
android.os.Looper.loop(Looper.java:158)
07-19 13:09:21.133: E/AndroidRuntime(17894): at
android.app.ActivityThread.main(ActivityThread.java:7231)
07-19 13:09:21.133: E/AndroidRuntime(17894): at
java.lang.reflect.Method.invoke(Native Method)
07-19 13:09:21.133: E/AndroidRuntime(17894): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:1230)
07-19 13:09:21.133: E/AndroidRuntime(17894): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
07-19 13:09:21.133: E/AndroidRuntime(17894): Caused by:
java.lang.ClassNotFoundException: Didn't find class
"android.support.v7.appcompat.R$attr" on path: DexPathList[[zip file
"/data/app/com.tembo.huerun-1/base.apk"],nativeLibraryDirectories=
[/data/app/com.tembo.huerun-1/lib/arm, /data/app/com.tembo.huerun-
1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
07-19 13:09:21.133: E/AndroidRuntime(17894): at
dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
07-19 13:09:21.133: E/AndroidRuntime(17894): at
java.lang.ClassLoader.loadClass(ClassLoader.java:511)
07-19 13:09:21.133: E/AndroidRuntime(17894): at
java.lang.ClassLoader.loadClass(ClassLoader.java:469)
07-19 13:09:21.133: E/AndroidRuntime(17894): ... 17 more
07-19 13:09:21.133: E/AndroidRuntime(17894): Suppressed:
java.lang.ClassNotFoundException: android.support.v7.appcompat.R$attr
07-19 13:09:21.133: E/AndroidRuntime(17894): at
java.lang.Class.classForName(Native Method)
07-19 13:09:21.133: E/AndroidRuntime(17894): at
java.lang.BootClassLoader.findClass(ClassLoader.java:781)
07-19 13:09:21.133: E/AndroidRuntime(17894): at
java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
07-19 13:09:21.133: E/AndroidRuntime(17894): at
java.lang.ClassLoader.loadClass(ClassLoader.java:504)
07-19 13:09:21.133: E/AndroidRuntime(17894): ... 18 more
07-19 13:09:21.133: E/AndroidRuntime(17894): Caused by:
java.lang.NoClassDefFoundError: Class not found using the boot class loader;
no stack trace available
07-19 13:09:22.903: I/Process(17894): Sending signal. PID: 17894 SIG: 9
add the apcompact-v7 jar file in your lib folder.

Issue with imsdroid integration with my android application

We have problem related with Imsdroid Integration with my android application.During the application startup it gives error as follow..
ExceptionInInitializerError
My log file is:
07-19 19:55:58.047: E/AndroidRuntime(6858): FATAL EXCEPTION: main
07-19 19:55:58.047: E/AndroidRuntime(6858): java.lang.ExceptionInInitializerError
07-19 19:55:58.047: E/AndroidRuntime(6858): at org.doubango.imsdroid.MyMainClass.<init>(MyMainClass.java:43)
07-19 19:55:58.047: E/AndroidRuntime(6858): at java.lang.Class.newInstanceImpl(Native Method)
07-19 19:55:58.047: E/AndroidRuntime(6858): at java.lang.Class.newInstance(Class.java:1319)
07-19 19:55:58.047: E/AndroidRuntime(6858): at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
07-19 19:55:58.047: E/AndroidRuntime(6858): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2099)
07-19 19:55:58.047: E/AndroidRuntime(6858): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2211)
07-19 19:55:58.047: E/AndroidRuntime(6858): at android.app.ActivityThread.access$600(ActivityThread.java:149)
07-19 19:55:58.047: E/AndroidRuntime(6858): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1300)
07-19 19:55:58.047: E/AndroidRuntime(6858): at android.os.Handler.dispatchMessage(Handler.java:99)
07-19 19:55:58.047: E/AndroidRuntime(6858): at android.os.Looper.loop(Looper.java:153)
07-19 19:55:58.047: E/AndroidRuntime(6858): at android.app.ActivityThread.main(ActivityThread.java:4987)
07-19 19:55:58.047: E/AndroidRuntime(6858): at java.lang.reflect.Method.invokeNative(Native Method)
07-19 19:55:58.047: E/AndroidRuntime(6858): at java.lang.reflect.Method.invoke(Method.java:511)
07-19 19:55:58.047: E/AndroidRuntime(6858): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
07-19 19:55:58.047: E/AndroidRuntime(6858): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
07-19 19:55:58.047: E/AndroidRuntime(6858): at dalvik.system.NativeStart.main(Native Method)
07-19 19:55:58.047: E/AndroidRuntime(6858): Caused by: java.lang.NullPointerException
07-19 19:55:58.047: E/AndroidRuntime(6858): at org.doubango.ngn.NgnEngine.<clinit>(NgnEngine.java:75)
07-19 19:55:58.047: E/AndroidRuntime(6858): ... 16 more
I think its with your AndroidManifest. Try putting this on your Application tag
android:name="org.doubango.ngn.NgnApplication"
or
if you have a custom Application object extend NgnApplication object instead of Application object.
If you want to use imsdroid in your application then you need to use ChromeView instead of WebView in android xml file.
I found more information and at here
<us.costan.chrome.ChromeView
android:id="#+id/customWebView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>

app crashes while fetching images from server on some devices

I am fetching images from a server and setting it in a list view. The problem is that it is working properly in many devices but in some devices it crashes while downloading for first the time.
But when I try to do it again it opens without any problem. For the first time it says out of memory error. is this problem related to coding or its just related to heap memory of devices?
here's the log-
07-19 16:22:04.050: E/image_url(14776): http://siliconsoftwares.in/real_json/uploads/property/agent/three hindustani/DSC_0145.jpg
07-19 16:22:04.060: E/AndroidRuntime(14776): FATAL EXCEPTION: AsyncTask #4
07-19 16:22:04.060: E/AndroidRuntime(14776): java.lang.RuntimeException: An error occured while executing doInBackground()
07-19 16:22:04.060: E/AndroidRuntime(14776): at android.os.AsyncTask$3.done(AsyncTask.java:299)
07-19 16:22:04.060: E/AndroidRuntime(14776): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
07-19 16:22:04.060: E/AndroidRuntime(14776): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
07-19 16:22:04.060: E/AndroidRuntime(14776): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
07-19 16:22:04.060: E/AndroidRuntime(14776): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
07-19 16:22:04.060: E/AndroidRuntime(14776): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
07-19 16:22:04.060: E/AndroidRuntime(14776): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
07-19 16:22:04.060: E/AndroidRuntime(14776): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
07-19 16:22:04.060: E/AndroidRuntime(14776): at java.lang.Thread.run(Thread.java:856)
07-19 16:22:04.060: E/AndroidRuntime(14776): Caused by: java.lang.OutOfMemoryError
07-19 16:22:04.060: E/AndroidRuntime(14776): at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
07-19 16:22:04.060: E/AndroidRuntime(14776): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:527)
07-19 16:22:04.060: E/AndroidRuntime(14776): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:599)
07-19 16:22:04.060: E/AndroidRuntime(14776): at com.example.realstate.FeaturedPropertiesActivity$ImageLoader.doInBackground(FeaturedPropertiesActivity.java:235)
07-19 16:22:04.060: E/AndroidRuntime(14776): at com.example.realstate.FeaturedPropertiesActivity$ImageLoader.doInBackground(FeaturedPropertiesActivity.java:1)
07-19 16:22:04.060: E/AndroidRuntime(14776): at android.os.AsyncTask$2.call(AsyncTask.java:287)
07-19 16:22:04.060: E/AndroidRuntime(14776): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
07-19 16:22:04.060: E/AndroidRuntime(14776): ... 5 more
07-19 16:22:04.630: E/WindowManager(14776): Activity com.example.realstate.FeaturedPropertiesActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView#4442ee10 that was originally added here
07-19 16:22:04.630: E/WindowManager(14776): android.view.WindowLeaked: Activity com.example.realstate.FeaturedPropertiesActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView#4442ee10 that was originally added here
07-19 16:22:04.630: E/WindowManager(14776): at android.view.ViewRootImpl.<init>(ViewRootImpl.java:374)
07-19 16:22:04.630: E/WindowManager(14776): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:292)
07-19 16:22:04.630: E/WindowManager(14776): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:224)
07-19 16:22:04.630: E/WindowManager(14776): at android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:149)
07-19 16:22:04.630: E/WindowManager(14776): at android.view.Window$LocalWindowManager.addView(Window.java:547)
07-19 16:22:04.630: E/WindowManager(14776): at android.app.Dialog.show(Dialog.java:277)
07-19 16:22:04.630: E/WindowManager(14776): at com.example.realstate.FeaturedPropertiesActivity$DownloadPropertiesList.onPreExecute(FeaturedPropertiesActivity.java:174)
07-19 16:22:04.630: E/WindowManager(14776): at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:586)
07-19 16:22:04.630: E/WindowManager(14776): at android.os.AsyncTask.execute(AsyncTask.java:534)
07-19 16:22:04.630: E/WindowManager(14776): at com.example.realstate.FeaturedPropertiesActivity.downloadPropertiesList(FeaturedPropertiesActivity.java:98)
07-19 16:22:04.630: E/WindowManager(14776): at com.example.realstate.FeaturedPropertiesActivity.onCreate(FeaturedPropertiesActivity.java:62)
07-19 16:22:04.630: E/WindowManager(14776): at android.app.Activity.performCreate(Activity.java:5008)
07-19 16:22:04.630: E/WindowManager(14776): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
07-19 16:22:04.630: E/WindowManager(14776): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2031)
07-19 16:22:04.630: E/WindowManager(14776): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2092)
07-19 16:22:04.630: E/WindowManager(14776): at android.app.ActivityThread.access$600(ActivityThread.java:133)
07-19 16:22:04.630: E/WindowManager(14776): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203)
07-19 16:22:04.630: E/WindowManager(14776): at android.os.Handler.dispatchMessage(Handler.java:99)
07-19 16:22:04.630: E/WindowManager(14776): at android.os.Looper.loop(Looper.java:137)
07-19 16:22:04.630: E/WindowManager(14776): at android.app.ActivityThread.main(ActivityThread.java:4794)
07-19 16:22:04.630: E/WindowManager(14776): at java.lang.reflect.Method.invokeNative(Native Method)
07-19 16:22:04.630: E/WindowManager(14776): at java.lang.reflect.Method.invoke(Method.java:511)
07-19 16:22:04.630: E/WindowManager(14776): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
07-19 16:22:04.630: E/WindowManager(14776): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
07-19 16:22:04.630: E/WindowManager(14776): at dalvik.system.NativeStart.main(Native Method)
07-19 16:22:05.490: D/dalvikvm(14776): GC_FOR_ALLOC freed 121K, 8% free 43275K/46919K, paused 41ms, total 42ms
07-19 16:22:05.540: D/dalvikvm(14776): GC_BEFORE_OOM freed 17K, 8% free 43257K/46919K, paused 48ms, total 48ms
07-19 16:22:05.540: E/dalvikvm-heap(14776): Out of memory on a 21233680-byte allocation.

Why is findFragmentById() returning null?

In the method below, NasaDailyFragment is always null in the debugger. The method call NasaDailyFragment.onRefresh(); fails using because of this. I can't figure out why its null.
public class NasaAppActivity extends FragmentActivity {
//other methods
public void onRefreshClicked(View view){
Log.d("debug", "in run");
FragmentManager fragmentManager=getSupportFragmentManager();
NasaDailyImage NasaDailyFragment=(NasaDailyImage)fragmentManager.findFragmentById(R.id.fragment_iotd);
if(NasaDailyFragment!=null){
Log.d("debug", "fragment has been casted and is NOT null!!!");
}
NasaDailyFragment.onRefresh();//always crashes here because NasaDailyFragment is null, this is "line 40" of the code
}
}
Here's the xml for the fragment defined by R.id.fragment_iotd
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<fragment android:name="com.wajumbie.nasadailyimage.NasaDailyImage"
android:id="#+id/fragment_iotd"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</LinearLayout>
The logcat output
07-19 11:21:25.916: D/debug(534): in run
07-19 11:21:25.916: D/AndroidRuntime(534): Shutting down VM
07-19 11:21:25.916: W/dalvikvm(534): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
07-19 11:21:25.936: E/AndroidRuntime(534): FATAL EXCEPTION: main
07-19 11:21:25.936: E/AndroidRuntime(534): java.lang.IllegalStateException: Could not execute method of the activity
07-19 11:21:25.936: E/AndroidRuntime(534): at android.view.View$1.onClick(View.java:3044)
07-19 11:21:25.936: E/AndroidRuntime(534): at android.view.View.performClick(View.java:3511)
07-19 11:21:25.936: E/AndroidRuntime(534): at android.view.View$PerformClick.run(View.java:14105)
07-19 11:21:25.936: E/AndroidRuntime(534): at android.os.Handler.handleCallback(Handler.java:605)
07-19 11:21:25.936: E/AndroidRuntime(534): at android.os.Handler.dispatchMessage(Handler.java:92)
07-19 11:21:25.936: E/AndroidRuntime(534): at android.os.Looper.loop(Looper.java:137)
07-19 11:21:25.936: E/AndroidRuntime(534): at android.app.ActivityThread.main(ActivityThread.java:4424)
07-19 11:21:25.936: E/AndroidRuntime(534): at java.lang.reflect.Method.invokeNative(Native Method)
07-19 11:21:25.936: E/AndroidRuntime(534): at java.lang.reflect.Method.invoke(Method.java:511)
07-19 11:21:25.936: E/AndroidRuntime(534): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-19 11:21:25.936: E/AndroidRuntime(534): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-19 11:21:25.936: E/AndroidRuntime(534): at dalvik.system.NativeStart.main(Native Method)
07-19 11:21:25.936: E/AndroidRuntime(534): Caused by: java.lang.reflect.InvocationTargetException
07-19 11:21:25.936: E/AndroidRuntime(534): at java.lang.reflect.Method.invokeNative(Native Method)
07-19 11:21:25.936: E/AndroidRuntime(534): at java.lang.reflect.Method.invoke(Method.java:511)
07-19 11:21:25.936: E/AndroidRuntime(534): at android.view.View$1.onClick(View.java:3039)
07-19 11:21:25.936: E/AndroidRuntime(534): ... 11 more
07-19 11:21:25.936: E/AndroidRuntime(534): Caused by: java.lang.NullPointerException
07-19 11:21:25.936: E/AndroidRuntime(534): at com.wajumbie.nasadailyimage.NasaAppActivity.onRefreshClicked(NasaAppActivity.java:40)
07-19 11:21:25.936: E/AndroidRuntime(534): ... 14 more
07-19 11:21:26.556: I/dalvikvm(534): threadid=3: reacting to signal 3
07-19 11:21:26.586: I/dalvikvm(534): Wrote stack traces to '/data/anr/traces.txt'

Categories

Resources