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
Related
I am working on an Android application. when I run my App below api 16 it works fine but when it runs on a post api 16 phone it crashes. Here is a the logact log which appears when it crashes.
06-19 20:20:05.096 5812-5812/com.ets.medecord W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x42011898)
06-19 20:20:05.106 5812-5812/com.ets.medecord E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ets.medecord/com.ets.medecord.SignupActivity2}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2218)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2268)
at android.app.ActivityThread.access$600(ActivityThread.java:148)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1263)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5162)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:756)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:572)
at miui.dexspy.DexspyInstaller.main(DexspyInstaller.java:171)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.ets.medecord.SignupActivity2.onCreate(SignupActivity2.java:72)
at android.app.Activity.performCreate(Activity.java:5135)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at com.lbe.security.service.core.client.b.x.callActivityOnCreate(Unknown Source)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2182)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2268)
at android.app.ActivityThread.access$600(ActivityThread.java:148)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1263)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5162)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:756)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:572)
at miui.dexspy.DexspyInstaller.main(DexspyInstaller.java:171)
at dalvik.system.NativeStart.main(Native Method)
To see code of the activity you can checkout this gist https://gist.github.com/darthvish/873dc292c841e5c86312
As you are using some deprecated features, so it may not supported for some API levels. For this you can check the api level as well as version before using the deprecated features using if condition. For example :
if(Build.VERSION.RELEASE.equals("4.4.4")) {
//Do somthing
}
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
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?
I've been seeing a crash on the ZTE Z993 (Android 4.1.1) that occurs in apps that use a MapView or SupportMapFragment (e.g. Lyft, Yelp, Airbnb). It looks like the crash occurs in the initialization of EdgeEffect within a ListView that Google Maps uses. The link below points to a git repo that reproduces the crash. I've also included the stacktrace. Has anyone seen this? Can anyone suggest a fix? Thanks!
github repo for a project that reproduces the crash
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.test.googlemapstest/com.test.googlemapstest.MapsActivity}: android.view.InflateException: Binary XML file line #1: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2080)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2105)
at android.app.ActivityThread.access$600(ActivityThread.java:133)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1211)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4795)
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 #1: Error inflating class fragment
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
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:256)
at android.app.Activity.setContentView(Activity.java:1867)
at com.test.googlemapstest.MapsActivity.onCreate(MapsActivity.java:18)
at android.app.Activity.performCreate(Activity.java:5008)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2044)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2105)
at android.app.ActivityThread.access$600(ActivityThread.java:133)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1211)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4795)
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 android.widget.EdgeEffect.<init>(EdgeEffect.java:153)
at android.widget.AbsListView.setOverScrollMode(AbsListView.java:824)
at android.view.View.<init>(View.java:3237)
at android.view.View.<init>(View.java:3295)
at android.view.ViewGroup.<init>(ViewGroup.java:427)
at android.widget.AdapterView.<init>(AdapterView.java:235)
at android.widget.AbsListView.<init>(AbsListView.java:758)
at android.widget.ListView.<init>(ListView.java:141)
at android.widget.ListView.<init>(ListView.java:137)
at com.google.maps.api.android.lib6.c.p.<init>(Unknown Source)
at com.google.maps.api.android.lib6.c.p.<init>(Unknown Source)
at com.google.maps.api.android.lib6.c.dd.<init>(Unknown Source)
at com.google.maps.api.android.lib6.c.el.a(Unknown Source)
at com.google.maps.api.android.lib6.c.ab.a(Unknown Source)
at com.google.maps.api.android.lib6.c.aa.a(Unknown Source)
at com.google.android.gms.maps.internal.x.onTransact(SourceFile:107)
at android.os.Binder.transact(Binder.java:326)
at com.google.android.gms.maps.internal.IMapFragmentDelegate$zza$zza.onCreateView(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment$zza.onCreateView(Unknown Source)
at com.google.android.gms.dynamic.zza$4.zzb(Unknown Source)
at com.google.android.gms.dynamic.zza.zza(Unknown Source)
at com.google.android.gms.dynamic.zza.onCreateView(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment.onCreateView(Unknown Source)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1786)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:922)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1114)
at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1216)
at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2169)
at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:297)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:676)
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:256)
at android.app.Activity.setContentView(Activity.java:1867)
at com.test.googlemapstest.MapsActivity.onCreate(MapsActivity.java:18)
at android.app.Activity.performCreate(Activity.java:5008)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2044)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2105)
at android.app.ActivityThread.access$600(ActivityThread.java:133)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1211)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4795)
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)
Bug reported here:
https://code.google.com/p/gmaps-api-issues/issues/detail?id=7915
the error occurred when imported the osmand project :
Error:Execution failed for task ':OsmAnd:preDexFreeLegacyArmv5Debug'.
com.android.ide.common.internal.LoggedErrorException: Failed to run command:
E:\Android\sdk\build-tools\21.1.2\dx.bat --dex --force-jumbo --output E:\Android_test_projects\Osmand-master2\Osmand-master\OsmAnd\build\intermediates\pre-dexed\freelegacyarmv5\debug\OsmAnd-java-android-9c283cd307dbfef07359ccbde68a116b21ff0b4f.jar E:\Android_test_projects\Osmand-master2\Osmand-master\OsmAnd-java\build\libs\OsmAnd-java-android.jar
Error Code:
1
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)
at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:472)
at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
at com.android.dx.command.dexer.Main.processClass(Main.java:704)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673)
at com.android.dx.command.dexer.Main.access$300(Main.java:83)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:602)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:632)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
at com.android.dx.command.dexer.Main.run(Main.java:246)
at com.android.dx.command.dexer.Main.main(Main.java:215)
at com.android.dx.command.Main.main(Main.java:106)
...while parsing com/google/protobuf/AbstractMessage$1.class
1 error; aborting
the cause of above error was java 1.8. after changing it to 1.7 i got this run time error
2-11 10:28:55.160 26327-26327/net.osmand V/Zygote﹕ Switching descriptor 34 to /dev/null
02-11 10:28:55.160 26327-26327/net.osmand V/Zygote﹕ Switching descriptor 9 to /dev/null
02-11 10:28:55.160 26327-26327/net.osmand D/dalvikvm﹕ Late-enabling CheckJNI
02-11 10:28:55.200 26327-26327/net.osmand D/ActivityThread﹕ handleBindApplication:net.osmand
02-11 10:28:55.200 26327-26327/net.osmand D/ActivityThread﹕ setTargetHeapUtilization:0.75
02-11 10:28:55.200 26327-26327/net.osmand D/ActivityThread﹕ setTargetHeapMinFree:2097152
02-11 10:28:55.260 26327-26327/net.osmand I/net.osmand﹕ ResourceManager Tiles to load in memory : 162.0
02-11 10:28:55.350 26327-26327/net.osmand D/AndroidRuntime﹕ Shutting down VM
02-11 10:28:55.350 26327-26327/net.osmand W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41653db8)
02-11 10:28:55.350 26327-26327/net.osmand E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: net.osmand, PID: 26327
java.lang.RuntimeException: Unable to create application net.osmand.plus.OsmandApplication: java.lang.IllegalStateException: java.lang.IllegalArgumentException: is == null
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4476)
at android.app.ActivityThread.access$1500(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5146)
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:796)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: java.lang.IllegalArgumentException: is == null
at net.osmand.router.RoutingConfiguration.getDefault(RoutingConfiguration.java:171)
at net.osmand.plus.helpers.AvoidSpecificRoads.getBuilder(AvoidSpecificRoads.java:44)
at net.osmand.plus.helpers.AvoidSpecificRoads.<init>(AvoidSpecificRoads.java:38)
at net.osmand.plus.OsmandApplication.onCreate(OsmandApplication.java:165)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4473)
at android.app.ActivityThread.access$1500(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5146)
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:796)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalArgumentException: is == null
at org.kxml2.io.KXmlParser.setInput(KXmlParser.java:1625)
at net.osmand.router.RoutingConfiguration.parseFromInputStream(RoutingConfiguration.java:184)
at net.osmand.router.RoutingConfiguration.getDefault(RoutingConfiguration.java:169)
at net.osmand.plus.helpers.AvoidSpecificRoads.getBuilder(AvoidSpecificRoads.java:44)
at net.osmand.plus.helpers.AvoidSpecificRoads.<init>(AvoidSpecificRoads.java:38)
at net.osmand.plus.OsmandApplication.onCreate(OsmandApplication.java:165)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4473)
at android.app.ActivityThread.access$1500(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5146)
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:796)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612)
at dalvik.system.NativeStart.main(Native Method)
02-11 10:29:42.570 26327-26334/net.osmand D/dalvikvm﹕ null clazz in OP_INSTANCE_OF, single-stepping
02-11 10:33:27.190 26327-26327/net.osmand I/Process﹕ Sending signal. PID: 26327 SIG: 9
02-11 10:34:10.670 26873-26873/net.osmand D/ActivityThread﹕ handleBindApplication:net.osmand
02-11 10:34:10.670 26873-26873/net.osmand D/ActivityThread﹕ setTargetHeapUtilization:0.75
02-11 10:34:10.670 26873-26873/net.osmand D/ActivityThread﹕ setTargetHeapMinFree:2097152
02-11 10:34:10.740 26873-26873/net.osmand I/net.osmand﹕ ResourceManager Tiles to load in memory : 162.0
02-11 10:34:10.840 26873-26873/net.osmand D/AndroidRuntime﹕ Shutting down VM
02-11 10:34:10.840 26873-26873/net.osmand W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41653db8)
02-11 10:34:10.840 26873-26873/net.osmand E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: net.osmand, PID: 26873
java.lang.RuntimeException: Unable to create application net.osmand.plus.OsmandApplication: java.lang.IllegalStateException: java.lang.IllegalArgumentException: is == null
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4476)
at android.app.ActivityThread.access$1500(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5146)
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:796)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: java.lang.IllegalArgumentException: is == null
at net.osmand.router.RoutingConfiguration.getDefault(RoutingConfiguration.java:171)
at net.osmand.plus.helpers.AvoidSpecificRoads.getBuilder(AvoidSpecificRoads.java:44)
at net.osmand.plus.helpers.AvoidSpecificRoads.<init>(AvoidSpecificRoads.java:38)
at net.osmand.plus.OsmandApplication.onCreate(OsmandApplication.java:165)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4473)
at android.app.ActivityThread.access$1500(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5146)
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:796)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalArgumentException: is == null
at org.kxml2.io.KXmlParser.setInput(KXmlParser.java:1625)
at net.osmand.router.RoutingConfiguration.parseFromInputStream(RoutingConfiguration.java:184)
at net.osmand.router.RoutingConfiguration.getDefault(RoutingConfiguration.java:169)
at net.osmand.plus.helpers.AvoidSpecificRoads.getBuilder(AvoidSpecificRoads.java:44)
at net.osmand.plus.helpers.AvoidSpecificRoads.<init>(AvoidSpecificRoads.java:38)
at net.osmand.plus.OsmandApplication.onCreate(OsmandApplication.java:165)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4473)
at android.app.ActivityThread.access$1500(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5146)
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:796)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612)
at dalvik.system.NativeStart.main(Native Method)
02-11 10:34:58.010 26873-26880/net.osmand D/dalvikvm﹕ null clazz in OP_INSTANCE_OF, single-stepping
I`ve got same issue, i moved all the .java class files to the root package and all errors were gone...