App is crashing while intending navigation drawer activity - android

I want to start the navigation drawer activity when pressing a button.
Here's my code:-
public void logdinScreen(View view) {
codeM = (EditText)findViewById(R.id.editText2);
if(codeM.getText().toString().equals("0000"))
{
//Toast.makeText(getBaseContext(),"LogedIn",Toast.LENGTH_LONG).show();
Intent intent2 = new Intent(OTPScreen.this,HomeScreen.class);
startActivity(intent2);
}
}
Android Manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.harpreet.btp_project" >
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".OTPScreen"
android:label="#string/title_activity_otpscreen" >
</activity>
<activity
android:name=".HomeScreen"
android:label="#string/title_activity_home_screen" >
</activity>
</application>
</manifest>
logcat:-
05-23 01:08:23.999 3326-3326/? D/dalvikvm﹕ Late-enabling CheckJNI
05-23 01:08:24.059 3326-3326/? E/Trace﹕ error opening trace file: No such file or directory (2)
05-23 01:08:24.059 3326-3326/? D/ActivityThread﹕ setTargetHeapUtilization:0.25
05-23 01:08:24.059 3326-3326/? D/ActivityThread﹕ setTargetHeapIdealFree:8388608
05-23 01:08:24.059 3326-3326/com.example.harpreet.btp_project D/ActivityThread﹕ setTargetHeapConcurrentStart:2097152
05-23 01:08:24.239 3326-3326/com.example.harpreet.btp_project D/dalvikvm﹕ GC_FOR_ALLOC freed 70K, 35% free 12967K/19779K, paused 21ms, total 22ms
05-23 01:08:24.259 3326-3326/com.example.harpreet.btp_project I/dalvikvm-heap﹕ Grow heap (frag case) to 29.330MB for 8294416-byte allocation
05-23 01:08:24.289 3326-3328/com.example.harpreet.btp_project D/dalvikvm﹕ GC_CONCURRENT freed 1K, 25% free 21066K/27911K, paused 12ms+1ms, total 35ms
05-23 01:08:24.429 3326-3326/com.example.harpreet.btp_project D/libEGL﹕ loaded /system/lib/egl/libEGL_adreno200.so
05-23 01:08:24.449 3326-3326/com.example.harpreet.btp_project D/libEGL﹕ loaded /system/lib/egl/libGLESv1_CM_adreno200.so
05-23 01:08:24.459 3326-3326/com.example.harpreet.btp_project D/libEGL﹕ loaded /system/lib/egl/libGLESv2_adreno200.so
05-23 01:08:24.469 3326-3326/com.example.harpreet.btp_project I/Adreno200-EGL﹕ <qeglDrvAPI_eglInitialize:299>: EGL 1.4 QUALCOMM build: (Merge)
Build Date: 07/09/13 Tue
Local Branch: AU_41
Remote Branch:
Local Patches:
Reconstruct Branch:
05-23 01:08:24.529 3326-3326/com.example.harpreet.btp_project D/OpenGLRenderer﹕ Enabling debug mode 0
05-23 01:08:39.009 3326-3326/com.example.harpreet.btp_project D/AndroidRuntime﹕ Shutting down VM
05-23 01:08:39.009 3326-3326/com.example.harpreet.btp_project W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x413e2378)
05-23 01:08:39.029 3326-3326/com.example.harpreet.btp_project E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.harpreet.btp_project/com.example.harpreet.btp_project.HomeScreen}: android.view.InflateException: Binary XML file line #19: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2071)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2096)
at android.app.ActivityThread.access$600(ActivityThread.java:138)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1207)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:4787)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #19: Error inflating class fragment
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:249)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:106)
at com.example.harpreet.btp_project.HomeScreen.onCreate(HomeScreen.java:39)
at android.app.Activity.performCreate(Activity.java:5008)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2035)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2096)
            at android.app.ActivityThread.access$600(ActivityThread.java:138)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1207)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:213)
            at android.app.ActivityThread.main(ActivityThread.java:4787)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
            at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.example.harpreet.btp_project.NavigationDrawerFragment.onCreateView(NavigationDrawerFragment.java:100)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1789)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:924)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1116)
at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1218)
at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2170)
at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:300)
at android.support.v7.app.AppCompatDelegateImplV7.callActivityOnCreateView(AppCompatDelegateImplV7.java:816)
at android.support.v7.app.AppCompatDelegateImplV11.callActivityOnCreateView(AppCompatDelegateImplV11.java:72)
at android.support.v7.app.AppCompatDelegateImplV7.onCreateView(AppCompatDelegateImplV7.java:804)
at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:675)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
            at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:249)
            at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:106)
            at com.example.harpreet.btp_project.HomeScreen.onCreate(HomeScreen.java:39)
            at android.app.Activity.performCreate(Activity.java:5008)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2035)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2096)
            at android.app.ActivityThread.access$600(ActivityThread.java:138)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1207)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:213)
            at android.app.ActivityThread.main(ActivityThread.java:4787)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
            at dalvik.system.NativeStart.main(Native Method)
The app is working untill i press that button. When i comment the intent part and uncomment the Toast part, it is working perfect.
Am i doing it wrong?

Related

fragment not working properly in lower versions of android

I'm using fragment in my project the single fragment class is called in all other classes of the project.Now the problem is my app runs only in lollipop device and it stops at lower versions of android.I have attached the error message below. As a Beginner I have tried my best but I can't find the right solution. Need your help friends.Suggest some possible solution to solve it.
Errors shown while running in lower versions of android
09-16 14:57:40.976 13600-13604/com.sentientit.theiWedplanner D/dalvikvm﹕ GC_CONCURRENT freed 354K, 28% free 6018K/8344K, paused 4ms+3ms, total 37ms
09-16 14:57:42.218 13600-13600/com.sentientit.theiWedplanner E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2135)
at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:300)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:682)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:752)
at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:350)
at android.app.Activity.setContentView(Activity.java:1930)
at com.sentientit.theiWedplanner.Frontpage.onCreate(Frontpage.java:41)
at android.app.Activity.performCreate(Activity.java:5283)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2209)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2295)
at android.app.ActivityThread.access$700(ActivityThread.java:150)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:175)
at android.app.ActivityThread.main(ActivityThread.java:5279)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NoClassDefFoundError: android.support.v4.util.ContainerHelpers
at android.support.v4.util.SimpleArrayMap.<init>(SimpleArrayMap.java:209)
at android.support.v4.app.Fragment.<clinit>(Fragment.java:169)
            at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2135)
            at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:300)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:682)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:752)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:350)
            at android.app.Activity.setContentView(Activity.java:1930)
            at com.sentientit.theiWedplanner.Frontpage.onCreate(Frontpage.java:41)
            at android.app.Activity.performCreate(Activity.java:5283)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2209)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2295)
            at android.app.ActivityThread.access$700(ActivityThread.java:150)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:175)
            at android.app.ActivityThread.main(ActivityThread.java:5279)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
            at dalvik.system.NativeStart.main(Native Method)
This is my fragment xml file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="#+id/adview153613"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#drawable/aagr_background2">
<ImageView
android:id="#+id/addviewimage"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:src="#drawable/adview1536132" />
<com.google.android.gms.ads.AdView
android:id="#+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
ads:adSize="SMART_BANNER"
ads:adUnitId="-----------------"
/>
<ImageView
android:id="#+id/addviewimage1"
android:layout_width="#dimen/fwh"
android:layout_height="#dimen/fwh"
android:layout_alignParentRight="true"
android:layout_marginRight="23dp"
android:src="#drawable/close" />
</RelativeLayout>
Seems like you have updated the SDK Tools but not SDK build tools. Try updating SDK Build tools then restart the IDE then try again.

Using parse.com and having allocation memory issue

I'm new to programming, I've been making an app for the last 3 months and learned a few things. But I haven't come across to how to solve this issue. I've been using Parse.com as my server, sending pictures, saving user data etc. With all of this data the app keeps crashing if I open some activities more than a few times, particularly activities with pictures. Now I have compressed the pictures and made them max 400x400 in resolution. But somehow the allocation is out of memory keeps popping up. Does anyone know any methods with which you can solve this? Because when the app crashes in Android Studio the previous memory which was on my phone seems to get deleted (Not all of the cache data).
Thanks.
// EDIT this is the Logcat
**
Out of memory: Heap Size=43591KB, Allocated=14395KB, Limit=49152KB
06-10 03:39:26.220 9344-9344/com.parseapp.eseen.eseen E/dalvikvm﹕ Extra info: Footprint=43591KB, Allowed Footprint=43591KB, Trimmed=21928KB
06-10 03:39:26.220 9344-9344/com.parseapp.eseen.eseen D/skia﹕ --- Unable to allocate space, reportSizeToVM = true
06-10 03:39:26.220 9344-9344/com.parseapp.eseen.eseen W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x40d90390)
06-10 03:39:26.230 9344-9344/com.parseapp.eseen.eseen E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.parseapp.eseen.eseen/com.parseapp.eseen.eseen.LoginActivity}: android.view.InflateException: Binary XML file line #1: Error inflating class <unknown>
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2355)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2391)
at android.app.ActivityThread.access$600(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1335)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:155)
at android.app.ActivityThread.main(ActivityThread.java:5511)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1029)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:796)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #1: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:613)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:369)
at android.app.Activity.setContentView(Activity.java:1912)
at com.parseapp.eseen.eseen.LoginActivity.onCreate(LoginActivity.java:29)
at android.app.Activity.performCreate(Activity.java:5066)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1101)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2311)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2391)
            at android.app.ActivityThread.access$600(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1335)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:155)
            at android.app.ActivityThread.main(ActivityThread.java:5511)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1029)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:796)
            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:417)
at android.view.LayoutInflater.createView(LayoutInflater.java:587)
            at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
            at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:369)
            at android.app.Activity.setContentView(Activity.java:1912)
            at com.parseapp.eseen.eseen.LoginActivity.onCreate(LoginActivity.java:29)
            at android.app.Activity.performCreate(Activity.java:5066)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1101)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2311)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2391)
            at android.app.ActivityThread.access$600(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1335)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:155)
            at android.app.ActivityThread.main(ActivityThread.java:5511)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1029)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:796)
            at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.OutOfMemoryError: (Heap Size=43591KB, Allocated=14395KB)
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:626)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:473)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:781)
at android.content.res.Resources.loadDrawable(Resources.java:1959)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:3354)
at android.view.View.<init>(View.java:3291)
at android.view.ViewGroup.<init>(ViewGroup.java:432)
at android.widget.RelativeLayout.<init>(RelativeLayout.java:184)
            at java.lang.reflect.Constructor.constructNative(Native Method)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
            at android.view.LayoutInflater.createView(LayoutInflater.java:587)
            at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
            at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:369)
            at android.app.Activity.setContentView(Activity.java:1912)
            at com.parseapp.eseen.eseen.LoginActivity.onCreate(LoginActivity.java:29)
            at android.app.Activity.performCreate(Activity.java:5066)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1101)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2311)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2391)
            at android.app.ActivityThread.access$600(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1335)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:155)
            at android.app.ActivityThread.main(ActivityThread.java:5511)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1029)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:796)
            at dalvik.system.NativeStart.main(Native Method)
**
The code is too long to put it here since it's limited to 30,000 chars
If you are using parse.com and getting the Images from database and converting it to bitmaps it will crash your app..
what you should do is, get the image of the URL from parse.com there is method called..
ParseFile.getUrl();
For that implement the Picasso library, which is perfect solution for loading images from database.
To implement picasso in your app,
compile 'com.squareup.picasso:picasso:2.5.2'
Then get the file from parse database
ParseFile file = getParseFile("ImageColumn");
To load the file
Uri url = Uri.parse(file.getUrl());
then just get context and ..add following passing your file url..
Picasso.with(context)
.load(url) //load from your URL of parseFile
.into(imageView); //set it to your ImageView
Here is the reason, why you should implement this..
Getting Bitmap file will consume so much memory, and it will give you
OutOfMemory Exception, which you are getting right now. So instead you
just get the URL of file and that's it. Loading image will be
dependent on the Internet. so you are saving the memory by not converting
every single bit into image.
Also you will do in loop for every image will cause your app to crash.
ALSO full tutorial will be available from Official website
Picasso Library

google map api v2 - first steps

I am new in using google map api v2.
i do every thing base on this tutorial:
Android SDK: Working with Google Maps - Application Setup
but in 5 :
Add a Map to the App
when i add fragment to may layout, i got some rendering error in my preview and show me stack overflow error.
and when I Run my code this i see this errors:
02-20 21:36:37.601 11893-11893/com.example.gmt3 I/Process﹕ Sending signal. PID: 11893 SIG: 9
02-20 21:41:30.941 12732-12732/com.example.gmt3 D/dalvikvm﹕ Late-enabling CheckJNI
02-20 21:41:31.021 12732-12732/com.example.gmt3 W/ResourceType﹕ CREATING STRING CACHE OF 44 bytes
02-20 21:41:31.041 12732-12732/com.example.gmt3 D/AndroidRuntime﹕ Shutting down VM
02-20 21:41:31.041 12732-12732/com.example.gmt3 W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41662d88)
02-20 21:41:31.051 12732-12732/com.example.gmt3 E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.gmt3, PID: 12732
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.gmt3/com.example.gmt3.MyActivity}: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2237)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2286)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1246)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:212)
at android.app.ActivityThread.main(ActivityThread.java:5137)
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:902)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:718)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:713)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:297)
at android.app.Activity.setContentView(Activity.java:1929)
at com.example.gmt3.MyActivity.onCreate(MyActivity.java:14)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2201)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2286)
            at android.app.ActivityThread.access$800(ActivityThread.java:144)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1246)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:212)
            at android.app.ActivityThread.main(ActivityThread.java:5137)
            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:902)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:718)
            at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 5077000 but found 0. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
at com.google.android.gms.common.GooglePlayServicesUtil.x(Unknown Source)
at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
at com.google.android.gms.maps.internal.u.F(Unknown Source)
at com.google.android.gms.maps.internal.u.E(Unknown Source)
at com.google.android.gms.maps.MapsInitializer.initialize(Unknown Source)
at com.google.android.gms.maps.MapFragment$b.ju(Unknown Source)
at com.google.android.gms.maps.MapFragment$b.a(Unknown Source)
at com.google.android.gms.dynamic.a.a(Unknown Source)
at com.google.android.gms.dynamic.a.onInflate(Unknown Source)
at com.google.android.gms.maps.MapFragment.onInflate(Unknown Source)
at android.app.Activity.onCreateView(Activity.java:4785)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:689)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:297)
            at android.app.Activity.setContentView(Activity.java:1929)
            at com.example.gmt3.MyActivity.onCreate(MyActivity.java:14)
            at android.app.Activity.performCreate(Activity.java:5231)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2201)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2286)
            at android.app.ActivityThread.access$800(ActivityThread.java:144)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1246)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:212)
            at android.app.ActivityThread.main(ActivityThread.java:5137)
            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:902)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:718)
            at dalvik.system.NativeStart.main(Native Method)
02-20 21:42:01.901 13963-13963/com.example.gmt3 W/ResourceType﹕ CREATING STRING CACHE OF 44 bytes
02-20 21:42:01.921 13963-13963/com.example.gmt3 D/AndroidRuntime﹕ Shutting down VM
02-20 21:42:01.921 13963-13963/com.example.gmt3 W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41662d88)
02-20 21:44:41.511 15098-15098/com.example.gmt3 D/dalvikvm﹕ Late-enabling CheckJNI
02-20 21:44:41.641 15098-15098/com.example.gmt3 W/ResourceType﹕ CREATING STRING CACHE OF 44 bytes
02-20 21:44:41.671 15098-15098/com.example.gmt3 I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: RGURRAM_AU_LINUX_ANDROID_LNX.LA.3.5.2.2_RB1.04.04.04.087.030+PATCH[ES]_msm8974_LNX.LA.3.5.2.2_RB1__release_ENGG ()
OpenGL ES Shader Compiler Version: E031.24.00.15
Build Date: 08/12/14 Tue
Local Branch:
Remote Branch: quic/LNX.LA.3.5.2.2_rb1
Local Patches: 8b00bd16f3c1d9d35a2fa902df5e679888d2b2e3 Fixes an llvm crash with mini dEQP apk
38bad22e162dead4e008444520a0144c78a347bd Fixes a potential dEQP crash.
ce345e1c45c2ae2d1fb2cb125c8d2574f1af5f95 Rev
02-20 21:44:41.701 15098-15098/com.example.gmt3 D/OpenGLRenderer﹕ Enabling debug mode 0
02-20 21:44:41.761 15098-15098/com.example.gmt3 I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy#42e245d8 time:70662662
02-20 21:51:39.711 15098-15098/com.example.gmt3 I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy#42e245d8 time:71080619
02-20 21:51:45.771 16948-16948/com.example.gmt3 W/ResourceType﹕ CREATING STRING CACHE OF 44 bytes
02-20 21:51:45.811 16948-16948/com.example.gmt3 I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: RGURRAM_AU_LINUX_ANDROID_LNX.LA.3.5.2.2_RB1.04.04.04.087.030+PATCH[ES]_msm8974_LNX.LA.3.5.2.2_RB1__release_ENGG ()
OpenGL ES Shader Compiler Version: E031.24.00.15
Build Date: 08/12/14 Tue
Local Branch:
Remote Branch: quic/LNX.LA.3.5.2.2_rb1
Local Patches: 8b00bd16f3c1d9d35a2fa902df5e679888d2b2e3 Fixes an llvm crash with mini dEQP apk
38bad22e162dead4e008444520a0144c78a347bd Fixes a potential dEQP crash.
ce345e1c45c2ae2d1fb2cb125c8d2574f1af5f95 Rev
02-20 21:51:45.851 16948-16948/com.example.gmt3 D/OpenGLRenderer﹕ Enabling debug mode 0
02-20 21:51:45.921 16948-16948/com.example.gmt3 I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy#428164f0 time:71086820
02-20 21:52:30.821 18305-18305/com.example.gmt3 D/dalvikvm﹕ Late-enabling CheckJNI
02-20 21:52:30.911 18305-18305/com.example.gmt3 W/ResourceType﹕ CREATING STRING CACHE OF 44 bytes
02-20 21:52:30.931 18305-18305/com.example.gmt3 D/AndroidRuntime﹕ Shutting down VM
02-20 21:52:30.931 18305-18305/com.example.gmt3 W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41662d88)
02-20 21:52:30.941 18305-18305/com.example.gmt3 E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.gmt3, PID: 18305
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.gmt3/com.example.gmt3.MyActivity}: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2237)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2286)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1246)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:212)
at android.app.ActivityThread.main(ActivityThread.java:5137)
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:902)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:718)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:713)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:297)
at android.app.Activity.setContentView(Activity.java:1929)
at com.example.gmt3.MyActivity.onCreate(MyActivity.java:14)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2201)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2286)
            at android.app.ActivityThread.access$800(ActivityThread.java:144)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1246)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:212)
            at android.app.ActivityThread.main(ActivityThread.java:5137)
            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:902)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:718)
            at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 5077000 but found 0. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
at com.google.android.gms.common.GooglePlayServicesUtil.x(Unknown Source)
at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
at com.google.android.gms.maps.internal.u.F(Unknown Source)
at com.google.android.gms.maps.internal.u.E(Unknown Source)
at com.google.android.gms.maps.MapsInitializer.initialize(Unknown Source)
at com.google.android.gms.maps.MapFragment$b.ju(Unknown Source)
at com.google.android.gms.maps.MapFragment$b.a(Unknown Source)
at com.google.android.gms.dynamic.a.a(Unknown Source)
at com.google.android.gms.dynamic.a.onInflate(Unknown Source)
at com.google.android.gms.maps.MapFragment.onInflate(Unknown Source)
at android.app.Activity.onCreateView(Activity.java:4785)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:689)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:297)
            at android.app.Activity.setContentView(Activity.java:1929)
            at com.example.gmt3.MyActivity.onCreate(MyActivity.java:14)
            at android.app.Activity.performCreate(Activity.java:5231)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2201)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2286)
            at android.app.ActivityThread.access$800(ActivityThread.java:144)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1246)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:212)
            at android.app.ActivityThread.main(ActivityThread.java:5137)
            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:902)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:718)
            at dalvik.system.NativeStart.main(Native Method)
can some one guide me about this?
pn: sorry for such a silly q.
Edit:
my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.gmt3"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="17"/>
<permission android:name="com.example.gmt3.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
<uses-permission android:name="com.example.gmt3.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
<application android:label="#string/app_name" android:icon="#drawable/ic_launcher">
<activity android:name="MyActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyDg3mKRpkNhYeyxdrv2xjnkoS8mDt3qsmo" />
</application>
</manifest>
The answer is in the error log
The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 5077000 but found 0. You must have the following declaration within the <application> element:
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
Maybe you have only forgotten to add this refference to your manifest

Facebook-sdk not working after androidstudio update to 0.8.1

I'm working on an android application that uses facebook sdk 3.6.0, in android studio 0.5.7, after update to 0.8.1 ... facebook sdk does not work,
the following error appears :
07-14 11:39:59.808 544-544/com.example.testdrawer E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.testdrawer/com.example.testdrawer.LoginActivity}: android.view.InflateException: Binary XML file line #36: Error inflating class com.facebook.widget.LoginButton
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1955)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1980)
at android.app.ActivityThread.access$600(ActivityThread.java:122)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1146)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4340)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at comm.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #36: Error inflating class com.facebook.widget.LoginButton
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:691)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)
at android.app.Activity.setContentView(Activity.java:1835)
at com.example.testdrawer.LoginActivity.onCreate(LoginActivity.java:65)
at android.app.Activity.performCreate(Activity.java:4465)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1919)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1980)
 
at android.app.ActivityThread.access$600(ActivityThread.java:122)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1146)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4340)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
            at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.facebook.widget.LoginButton
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.view.LayoutInflater.createView(LayoutInflater.java:552)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)
            at android.app.Activity.setContentView(Activity.java:1835)
            at com.example.testdrawer.LoginActivity.onCreate(LoginActivity.java:65)
            at android.app.Activity.performCreate(Activity.java:4465)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1919)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1980)
            at android.app.ActivityThread.access$600(ActivityThread.java:122)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1146)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4340)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
            at dalvik.system.NativeStart.main(Native Method)
I also changed gradle from 9 to 12
dependencies {
classpath 'com.android.tools.build:gradle:0.12.+'
}
How to solve this problem?
thank you!
I do not know exactly what I did, but it works !
I cleaned the project (build-clear project) and I changed something in build.grandle
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion '19.1.0'
defaultConfig {
minSdkVersion 10
targetSdkVersion 14
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:+'
compile project(':libraries:facebook')
compile 'com.google.android.gms:play-services:4.2.42'
compile 'com.android.support:appcompat-v7:+'
}

NumberFormatException: Invalid int: "8.0dip" only on Galaxy Tab 2

I'm currently facing to a glitch from an Galaxy Tab 10.1 2 (GT-P5110) which give me that error, but just on that device. I tried on divers emulators (I use genymotion: Nexus 5-7-10, Galaxy S3-4-5, Galaxy Note 2-3) and devices (Galaxy S -2-3-4, Nexus 5-7).
But just on that Galaxy tab 2 10.1 (GT-P5110) I have this error.
I found this link, but this didn't really help me out to solve that problem.
07-01 11:06:58.832 14227-14227/com.********.********.com E/AndroidRuntime﹕ FATAL EXCEPTION: main
android.view.InflateException: Binary XML file line #36: Error inflating class com.package.fr.views.SofiaLiTextView
at android.view.LayoutInflater.createView(LayoutInflater.java:613)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at com.package.fr.fragments.TestFragment.onCreateView(TestFragment.java:82)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1500)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:927)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1467)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:440)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4895)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
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:417)
at android.view.LayoutInflater.createView(LayoutInflater.java:587)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
            at com.package.fr.fragments.TestFragment.onCreateView(TestFragment.java:82)
            at android.support.v4.app.Fragment.performCreateView(Fragment.java:1500)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:927)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)
            at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
            at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1467)
            at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:440)
            at android.os.Handler.handleCallback(Handler.java:615)
            at android.os.Handler.dispatchMessage(Handler.java:92)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4895)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
            at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NumberFormatException: Invalid int: "8.0dip"
at java.lang.Integer.invalidInt(Integer.java:138)
at java.lang.Integer.parse(Integer.java:375)
at java.lang.Integer.parseInt(Integer.java:366)
at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:123)
at android.content.res.TypedArray.getInt(TypedArray.java:254)
at android.widget.TextView.<init>(TextView.java:997)
at android.widget.TextView.<init>(TextView.java:562)
at com.package.fr.views.SofiaLiTextView.<init>(SofiaLiTextView.java:55)
            at java.lang.reflect.Constructor.constructNative(Native Method)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
            at android.view.LayoutInflater.createView(LayoutInflater.java:587)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
            at com.package.fr.fragments.TestFragment.onCreateView(TestFragment.java:82)
            at android.support.v4.app.Fragment.performCreateView(Fragment.java:1500)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:927)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)
            at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
            at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1467)
            at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:440)
            at android.os.Handler.handleCallback(Handler.java:615)
            at android.os.Handler.dispatchMessage(Handler.java:92)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4895)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
            at dalvik.system.NativeStart.main(Native Method)
Apparently this would be a bug from the Samsung's Android like said here
Very frustrating >:)>:)
If you are using android:paddingstart attribute, make sure that your target api level is below 17, else try remove this attribute and run the app. It will work.

Categories

Resources