While running my app, LogCat suddenly shows this barrage of orange-colored messages (warnings) which seem to be totally unrelated to my app (and certainly not having the same pid):
05-01 12:00:03.732: WARN/System.err(1836): java.io.FileNotFoundException: http://gh-pages.clockworkmod.com/ROMManagerManifest/premium_imei.js
05-01 12:00:03.752: WARN/System.err(1836): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:1162)
05-01 12:00:03.752: WARN/System.err(1836): at java.net.URL.openStream(URL.java:653)
05-01 12:00:03.752: WARN/System.err(1836): at com.koushikdutta.rommanager.StreamUtility.downloadUrl(StreamUtility.java:46)
05-01 12:00:03.752: WARN/System.err(1836): at com.koushikdutta.rommanager.Helper$1.run(Helper.java:164)
05-01 12:00:03.752: WARN/System.err(1836): at com.koushikdutta.rommanager.Helper.isPremium(Helper.java:178)
05-01 12:00:03.752: WARN/System.err(1836): at com.koushikdutta.rommanager.DownloadService.checkForUpdates(DownloadService.java:314)
05-01 12:00:03.762: WARN/System.err(1836): at com.koushikdutta.rommanager.DownloadService.onStart(DownloadService.java:401)
05-01 12:00:03.762: WARN/System.err(1836): at android.app.Service.onStartCommand(Service.java:420)
05-01 12:00:03.762: WARN/System.err(1836): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3053)
05-01 12:00:03.762: WARN/System.err(1836): at android.app.ActivityThread.access$3600(ActivityThread.java:125)
05-01 12:00:03.762: WARN/System.err(1836): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2096)
05-01 12:00:03.762: WARN/System.err(1836): at android.os.Handler.dispatchMessage(Handler.java:99)
05-01 12:00:03.762: WARN/System.err(1836): at android.os.Looper.loop(Looper.java:123)
05-01 12:00:03.762: WARN/System.err(1836): at android.app.ActivityThread.main(ActivityThread.java:4627)
05-01 12:00:03.762: WARN/System.err(1836): at java.lang.reflect.Method.invokeNative(Native Method)
05-01 12:00:03.762: WARN/System.err(1836): at java.lang.reflect.Method.invoke(Method.java:521)
05-01 12:00:03.762: WARN/System.err(1836): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
05-01 12:00:03.762: WARN/System.err(1836): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
05-01 12:00:03.762: WARN/System.err(1836): at dalvik.system.NativeStart.main(Native Method)
05-01 12:00:14.202: WARN/System.err(1836): java.lang.NullPointerException
05-01 12:00:14.202: WARN/System.err(1836): at com.paypal.android.a.h.a(Unknown Source)
05-01 12:00:14.202: WARN/System.err(1836): at com.paypal.android.a.a.j(Unknown Source)
05-01 12:00:14.202: WARN/System.err(1836): at com.paypal.android.a.f.run(Unknown Source)
What does this mean? Is this is a bug in Android? A bug in some other external app or service running in the background?
How do I tell whether this has anything to do with my app-in-development?
(Note: My app doesn't use PayPal or ROM Manager in any way)
There's some kind of error occurring in what the ROM Manager is trying to do - probably a periodic check for new releases.
I wouldn't expect this has anything to do with your application, unless you see it happen during your application multiple times. And even then, I'd leave a logcat open when your app is not running and see if it's happening frequently.
You might want to think if you want to leave that rom manager installed/enabled...
If you aren't using them then it's just those services running in the background. Nothing you have to worry about.
Maybe you should filter to 'Show only selected application'?
That way you'll see only stuff related to your app.
Related
can we use owasp-ESAPI for logging android application, as I have tried to search on google and then as per my understanding I found OWASP-ESAPI can be used with JAVA-EE.
can someone help me to integrate secure logger with OWASP-ESAPI on android application?
For better understanding my problem please go though following :
"esapi-2.1.0.jar" allow us to write
Following code that I am trying:
private final Logger logger = ESAPI.getLogger(MyActivity.class.getName());
logger.error(Logger.SECURITY_FAILURE, "session has expired, log out user");
when I run my project it gives following on logcat:
05-01 13:02:52.455: D/ResourcesManager(9936): creating new AssetManager and set to /data/app/com.example.loggerlatestjar-1/base.apk
05-01 13:02:52.555: I/System.out(9936): Attempting to load ESAPI.properties via file I/O.
05-01 13:02:52.555: I/System.out(9936): Attempting to load ESAPI.properties as resource file via file I/O.
05-01 13:02:52.555: I/System.out(9936): Not found in 'org.owasp.esapi.resources' directory or file not readable: /ESAPI.properties
05-01 13:02:52.565: I/System.out(9936): Not found in SystemResource Directory/resourceDirectory: .esapi/ESAPI.properties
05-01 13:02:52.565: I/System.out(9936): Not found in 'user.home' () directory: /esapi/ESAPI.properties
05-01 13:02:52.565: I/System.out(9936): Loading ESAPI.properties via file I/O failed. Exception was: java.io.FileNotFoundException
05-01 13:02:52.565: I/System.out(9936): Attempting to load ESAPI.properties via the classpath.
05-01 13:02:52.615: I/System.out(9936): ESAPI.properties could not be loaded by any means. Fail. Exception was: java.lang.IllegalArgumentException: Failed to load ESAPI.properties as a classloader resource.
05-01 13:02:52.615: D/AndroidRuntime(9936): Shutting down VM
05-01 13:02:52.620: E/AndroidRuntime(9936): FATAL EXCEPTION: main
05-01 13:02:52.620: E/AndroidRuntime(9936): Process: com.example.loggerlatestjar, PID: 9936
05-01 13:02:52.620: E/AndroidRuntime(9936): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.loggerlatestjar/com.example.loggerlatestjar.MainActivity}: org.owasp.esapi.errors.ConfigurationException: java.lang.reflect.InvocationTargetException SecurityConfiguration class (org.owasp.esapi.reference.DefaultSecurityConfiguration) CTOR threw exception.
05-01 13:02:52.620: E/AndroidRuntime(9936): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2702)
05-01 13:02:52.620: E/AndroidRuntime(9936): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2767)
05-01 13:02:52.620: E/AndroidRuntime(9936): at android.app.ActivityThread.access$900(ActivityThread.java:177)
05-01 13:02:52.620: E/AndroidRuntime(9936): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1449)
05-01 13:02:52.620: E/AndroidRuntime(9936): at android.os.Handler.dispatchMessage(Handler.java:102)
05-01 13:02:52.620: E/AndroidRuntime(9936): at android.os.Looper.loop(Looper.java:145)
05-01 13:02:52.620: E/AndroidRuntime(9936): at android.app.ActivityThread.main(ActivityThread.java:5951)
05-01 13:02:52.620: E/AndroidRuntime(9936): at java.lang.reflect.Method.invoke(Native Method)
05-01 13:02:52.620: E/AndroidRuntime(9936): at java.lang.reflect.Method.invoke(Method.java:372)
05-01 13:02:52.620: E/AndroidRuntime(9936): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)
05-01 13:02:52.620: E/AndroidRuntime(9936): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)
05-01 13:02:52.620: E/AndroidRuntime(9936): Caused by: org.owasp.esapi.errors.ConfigurationException: java.lang.reflect.InvocationTargetException SecurityConfiguration class (org.owasp.esapi.reference.DefaultSecurityConfiguration) CTOR threw exception.
05-01 13:02:52.620: E/AndroidRuntime(9936): at org.owasp.esapi.util.ObjFactory.make(ObjFactory.java:129)
05-01 13:02:52.620: E/AndroidRuntime(9936): at org.owasp.esapi.ESAPI.securityConfiguration(ESAPI.java:184)
05-01 13:02:52.620: E/AndroidRuntime(9936): at org.owasp.esapi.ESAPI.logFactory(ESAPI.java:137)
05-01 13:02:52.620: E/AndroidRuntime(9936): at org.owasp.esapi.ESAPI.getLogger(ESAPI.java:154)
05-01 13:02:52.620: E/AndroidRuntime(9936): at com.example.loggerlatestjar.MainActivity.onCreate(MainActivity.java:23)
05-01 13:02:52.620: E/AndroidRuntime(9936): at android.app.Activity.performCreate(Activity.java:6289)
05-01 13:02:52.620: E/AndroidRuntime(9936): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
05-01 13:02:52.620: E/AndroidRuntime(9936): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2655)
05-01 13:02:52.620: E/AndroidRuntime(9936): ... 10 more
05-01 13:02:52.620: E/AndroidRuntime(9936): Caused by: java.lang.reflect.InvocationTargetException
05-01 13:02:52.620: E/AndroidRuntime(9936): at java.lang.reflect.Method.invoke(Native Method)
05-01 13:02:52.620: E/AndroidRuntime(9936): at java.lang.reflect.Method.invoke(Method.java:372)
05-01 13:02:52.620: E/AndroidRuntime(9936): at org.owasp.esapi.util.ObjFactory.make(ObjFactory.java:86)
05-01 13:02:52.620: E/AndroidRuntime(9936): ... 17 more
05-01 13:02:52.620: E/AndroidRuntime(9936): Caused by: org.owasp.esapi.errors.ConfigurationException: ESAPI.properties could not be loaded by any means. Fail.
05-01 13:02:52.620: E/AndroidRuntime(9936): at org.owasp.esapi.reference.DefaultSecurityConfiguration.loadConfiguration(DefaultSecurityConfiguration.java:439)
05-01 13:02:52.620: E/AndroidRuntime(9936): at org.owasp.esapi.reference.DefaultSecurityConfiguration.<init>(DefaultSecurityConfiguration.java:227)
05-01 13:02:52.620: E/AndroidRuntime(9936): at org.owasp.esapi.reference.DefaultSecurityConfiguration.getInstance(DefaultSecurityConfiguration.java:75)
05-01 13:02:52.620: E/AndroidRuntime(9936): ... 20 more
05-01 13:02:52.620: E/AndroidRuntime(9936): Caused by: java.lang.IllegalArgumentException: Failed to load ESAPI.properties as a classloader resource.
05-01 13:02:52.620: E/AndroidRuntime(9936): at org.owasp.esapi.reference.DefaultSecurityConfiguration.loadConfigurationFromClasspath(DefaultSecurityConfiguration.java:667)
05-01 13:02:52.620: E/AndroidRuntime(9936): at org.owasp.esapi.reference.DefaultSecurityConfiguration.loadConfiguration(DefaultSecurityConfiguration.java:436)
05-01 13:02:52.620: E/AndroidRuntime(9936): ... 22 more
Note : I am not using ESAPI.property file. because i do not know how to use it in android app.
i just added AdMob to my app. Everything seem to work well when i debug or install release version of app (HTC m7). The problem occurs on CHUWI VX2 device (esky82_tb_cn_kk, Android 4.4). It is very strange because on this device my App works in debug mode but doesn't works in release version. I try turn of pro-gourd but it doesn't help me.
Any one have idea for that?
my manifest
instruction inside my onCreate method:
mAdView = (AdView) findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.setAdListener(new AdListener() {
#Override
public void onAdClosed() {
super.onAdClosed();
mAdView.setVisibility(View.GONE);
}
#Override
public void onAdOpened() {
super.onAdOpened();
mAdView.startAnimation(fade_in);
mAdView.setVisibility(View.VISIBLE);
}
#Override
public void onAdFailedToLoad(int errorCode) {
super.onAdFailedToLoad(errorCode);
mAdView.setVisibility(View.GONE);
}
#Override
public void onAdLoaded() {
super.onAdLoaded();
mAdView.startAnimation(fade_in);
mAdView.setVisibility(View.VISIBLE);
}
#Override
public void onAdLeftApplication() {
super.onAdLeftApplication();
mAdView.setVisibility(View.GONE);
}
});
mAdView.loadAd(adRequest);
code inside layout.xml
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<com.google.android.gms.ads.AdView android:id="#+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
ads:adSize="SMART_BANNER"
ads:adUnitId="#string/banner_ad_unit_id"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:visibility="gone">
</com.google.android.gms.ads.AdView>
</RelativeLayout>
Crash log:
05-01 19:39:16.305 124-124/? I/SurfaceFlinger﹕ Skip composition for [Built-in Screen (type:0)] since dirtyRegion is empty
05-01 19:39:16.321 124-124/? I/SurfaceFlinger﹕ Skip composition for [Built-in Screen (type:0)] since dirtyRegion is empty
05-01 19:39:16.330 2162-2162/? D/AndroidRuntime﹕ Shutting down VM
05-01 19:39:16.330 2162-2162/? W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41d79c98)
05-01 19:39:16.330 2162-2162/? W/dalvikvm﹕ threadid=1: uncaught exception occurred
05-01 19:39:16.331 2162-2162/? W/System.err﹕ java.lang.RuntimeException: Unable to start activity ComponentInfo{freshfrog.pytomat/freshfrog.pytomat.Main}: java.lang.NullPointerException
05-01 19:39:16.332 2162-2162/? W/System.err﹕ at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2338)
05-01 19:39:16.332 2162-2162/? W/System.err﹕ at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
05-01 19:39:16.332 2162-2162/? W/System.err﹕ at android.app.ActivityThread.access$800(ActivityThread.java:151)
05-01 19:39:16.332 2162-2162/? W/System.err﹕ at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
05-01 19:39:16.332 2162-2162/? W/System.err﹕ at android.os.Handler.dispatchMessage(Handler.java:110)
05-01 19:39:16.332 2162-2162/? W/System.err﹕ at android.os.Looper.loop(Looper.java:193)
05-01 19:39:16.333 2162-2162/? W/System.err﹕ at android.app.ActivityThread.main(ActivityThread.java:5292)
05-01 19:39:16.333 2162-2162/? W/System.err﹕ at java.lang.reflect.Method.invokeNative(Native Method)
05-01 19:39:16.333 2162-2162/? W/System.err﹕ at java.lang.reflect.Method.invoke(Method.java:515)
05-01 19:39:16.333 2162-2162/? W/System.err﹕ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
05-01 19:39:16.333 2162-2162/? W/System.err﹕ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
05-01 19:39:16.333 2162-2162/? W/System.err﹕ at dalvik.system.NativeStart.main(Native Method)
05-01 19:39:16.334 2162-2162/? W/System.err﹕ Caused by: java.lang.NullPointerException
05-01 19:39:16.334 2162-2162/? W/System.err﹕ at freshfrog.pytomat.Main.onCreate(Main.java:450)
05-01 19:39:16.334 2162-2162/? W/System.err﹕ at android.app.Activity.performCreate(Activity.java:5264)
05-01 19:39:16.334 2162-2162/? W/System.err﹕ at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1088)
05-01 19:39:16.334 2162-2162/? W/System.err﹕ at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2302)
05-01 19:39:16.335 2162-2162/? W/System.err﹕ ... 11 more
05-01 19:39:16.335 2162-2162/? W/dalvikvm﹕ threadid=1: calling UncaughtExceptionHandler
05-01 19:39:16.336 124-124/? I/SurfaceFlinger﹕ Skip composition for [Built-in Screen (type:0)] since dirtyRegion is empty
05-01 19:39:16.339 2162-2162/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: freshfrog.pytomat, PID: 2162
java.lang.RuntimeException: Unable to start activity ComponentInfo{freshfrog.pytomat/freshfrog.pytomat.Main}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2338)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5292)
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:824)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at freshfrog.pytomat.Main.onCreate(Main.java:450)
at android.app.Activity.performCreate(Activity.java:5264)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1088)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2302)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5292)
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:824)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
at dalvik.system.NativeStart.main(Native Method)
05-01 19:39:16.341 654-669/? V/Provider/Settings﹕ from settings cache , name = dropbox:data_app_crash , value = null
05-01 19:39:16.342 654-669/? D/dalvikvm﹕ create interp thread : stack size=128KB
05-01 19:39:16.342 654-669/? D/dalvikvm﹕ create new thread
05-01 19:39:16.343 654-669/? D/dalvikvm﹕ new thread created
05-01 19:39:16.343 654-669/? D/dalvikvm﹕ update thread list
05-01 19:39:16.343 916-2188/? D/dalvikvm﹕ create interp thread : stack size=128KB
05-01 19:39:16.343 916-2188/? D/dalvikvm﹕ create new thread
05-01 19:39:16.343 916-2188/? D/dalvikvm﹕ new thread created
05-01 19:39:16.343 916-2188/? D/dalvikvm﹕ update thread list
05-01 19:39:16.343 654-2191/? D/dalvikvm﹕ threadid=82: interp stack at 0x64403000
05-01 19:39:16.343 654-2191/? D/dalvikvm﹕ threadid=82: created from interp
05-01 19:39:16.343 654-669/? D/dalvikvm﹕ start new thread
05-01 19:39:16.343 654-669/? V/Provider/Settings﹕ from settings cache , name = send_action_app_error , value = 1
05-01 19:39:16.343 654-669/? W/ActivityManager﹕ Force finishing activity freshfrog.pytomat/.Main
Logcat indicate this line (Main.java:450)
mAdView.setAdListener(new AdListener() {
what is this ?
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
what were you expecting? to hit both sides?
try this
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
and let the rest go
You are getting a NullPointerException on line 450 of Main.
Look at that line. Something there has not been initialised.
I solve my problem. This issue isn't connect with AdView. It was problem with project. I made small mistakes. I don't have this line
<?xml version="1.0" encoding="utf-8"?>
on the start of xml layout file. I don't know how it can event works.
I reboot device
I added missing line to xml
I clean project (Build > Clean Project)
I rebuild project (Build > Rebuild Project)
Then my apk starts work without progourd but crash when I enable this feature. So i find this solution
I configure progourd configuration file like this.
My target is to use youtube instead of server, to store videos.
I need youtube provide the following function
1. upload video and get his url .
2. search for video that match developer tag.
to do so, i find here those posts
Using YouTube Data Api in Android
Creating a playlist with Youtube DATA API on Android
after i read those posts i install eclipse youtube data plug in
and downloaded those file
https://code.google.com/p/gdata-java-client/downloads/detail?name=gdata-samples.java-1.47.1.zip&can=2&q=
gdata-samples.java-1.47.1
mail.jar
activation.jar
servlet-api.jar
as mention here
https://developers.google.com/gdata/articles/eclipse?hl=iw
those zip file i add to libs folder on my android project exactly like youtube mention in the link above...
to my project i add internet permission, import packages, and add this line :
YouTubeService service = new YouTubeService(clientID, developer_key);
like mention here :
https://developers.google.com/youtube/2.0/developers_guide_java?hl=iw#Authentication
in this time my project look like this :
package com.example.youtubeuploaddata;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import com.google.gdata.client.*;
import com.google.gdata.client.youtube.*;
import com.google.gdata.data.*;
import com.google.gdata.data.geo.impl.*;
import com.google.gdata.data.media.*;
import com.google.gdata.data.media.mediarss.*;
import com.google.gdata.data.youtube.*;
import com.google.gdata.data.extensions.*;
import com.google.gdata.util.*;
import java.io.IOException;
import java.io.File;
import java.net.URL;
public class YoutubeUploadData extends Activity {
String clientID = "xxxxxxxxxxxxxxx";
String developer_key = "xxxxxxxxxxxxxxxxxxxxxxx";
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_youtube_upload_data);
YouTubeService service = new YouTubeService(clientID, developer_key);
}
#Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.youtube_upload_data, menu);
return true;
}
}
and my project contein this jar
at this time i test the app on my device and recieve those errors :
05-01 21:10:43.993: W/dalvikvm(12171): Unable to resolve superclass of Lcom/google/gdata/util/common/net/UriParameterMap; (26)
05-01 21:10:43.993: W/dalvikvm(12171): Link of class 'Lcom/google/gdata/util/common/net/UriParameterMap;' failed
05-01 21:10:43.993: W/dalvikvm(12171): VFY: unable to find class referenced in signature (Lcom/google/gdata/util/common/net/UriParameterMap;)
05-01 21:10:43.993: W/dalvikvm(12171): Unable to resolve superclass of Lcom/google/gdata/util/common/net/UriParameterMap; (26)
05-01 21:10:43.993: W/dalvikvm(12171): Link of class 'Lcom/google/gdata/util/common/net/UriParameterMap;' failed
05-01 21:10:43.993: W/dalvikvm(12171): VFY: unable to find class referenced in signature (Lcom/google/gdata/util/common/net/UriParameterMap;)
05-01 21:10:43.993: W/dalvikvm(12171): Unable to resolve superclass of Lcom/google/gdata/util/common/net/UriParameterMap; (26)
05-01 21:10:44.003: W/dalvikvm(12171): Link of class 'Lcom/google/gdata/util/common/net/UriParameterMap;' failed
05-01 21:10:44.003: W/dalvikvm(12171): VFY: unable to resolve static field 2621 (EMPTY_MAP) in Lcom/google/gdata/util/common/net/UriParameterMap;
05-01 21:10:44.003: W/dalvikvm(12171): Unable to resolve superclass of Lcom/google/gdata/util/common/net/UriParameterMap; (26)
05-01 21:10:44.003: W/dalvikvm(12171): Link of class 'Lcom/google/gdata/util/common/net/UriParameterMap;' failed
05-01 21:10:44.003: W/dalvikvm(12171): VFY: unable to resolve static method 8229: Lcom/google/gdata/util/common/net/UriParameterMap;.parse (Ljava/lang/String;)Lcom/google/gdata/util/common/net/UriParameterMap;
05-01 21:10:44.033: W/dalvikvm(12171): VFY: unable to resolve static method 65: Lcom/google/common/collect/Maps;.newHashMap (Ljava/util/Map;)Ljava/util/HashMap;
05-01 21:10:44.033: W/dalvikvm(12171): VFY: unable to resolve static method 64: Lcom/google/common/collect/Maps;.newHashMap ()Ljava/util/HashMap;
05-01 21:10:44.033: W/dalvikvm(12171): Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lcom/google/gdata/client/Service;
05-01 21:10:44.033: W/dalvikvm(12171): threadid=1: thread exiting with uncaught exception (group=0x40d9f1f8)
05-01 21:10:44.043: E/AndroidRuntime(12171): FATAL EXCEPTION: main
05-01 21:10:44.043: E/AndroidRuntime(12171): java.lang.ExceptionInInitializerError
05-01 21:10:44.043: E/AndroidRuntime(12171): at com.example.youtubeuploaddata.YoutubeUploadData.onCreate(YoutubeUploadData.java:55)
05-01 21:10:44.043: E/AndroidRuntime(12171): at android.app.Activity.performCreate(Activity.java:4519)
05-01 21:10:44.043: E/AndroidRuntime(12171): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
05-01 21:10:44.043: E/AndroidRuntime(12171): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
05-01 21:10:44.043: E/AndroidRuntime(12171): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
05-01 21:10:44.043: E/AndroidRuntime(12171): at android.app.ActivityThread.access$600(ActivityThread.java:123)
05-01 21:10:44.043: E/AndroidRuntime(12171): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
05-01 21:10:44.043: E/AndroidRuntime(12171): at android.os.Handler.dispatchMessage(Handler.java:99)
05-01 21:10:44.043: E/AndroidRuntime(12171): at android.os.Looper.loop(Looper.java:137)
05-01 21:10:44.043: E/AndroidRuntime(12171): at android.app.ActivityThread.main(ActivityThread.java:4464)
05-01 21:10:44.043: E/AndroidRuntime(12171): at java.lang.reflect.Method.invokeNative(Native Method)
05-01 21:10:44.043: E/AndroidRuntime(12171): at java.lang.reflect.Method.invoke(Method.java:511)
05-01 21:10:44.043: E/AndroidRuntime(12171): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:822)
05-01 21:10:44.043: E/AndroidRuntime(12171): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:589)
05-01 21:10:44.043: E/AndroidRuntime(12171): at dalvik.system.NativeStart.main(Native Method)
05-01 21:10:44.043: E/AndroidRuntime(12171): Caused by: java.lang.NoClassDefFoundError: com.google.common.collect.Maps
05-01 21:10:44.043: E/AndroidRuntime(12171): at com.google.gdata.wireformats.AltRegistry.<init>(AltRegistry.java:118)
05-01 21:10:44.043: E/AndroidRuntime(12171): at com.google.gdata.wireformats.AltRegistry.<init>(AltRegistry.java:100)
05-01 21:10:44.043: E/AndroidRuntime(12171): at com.google.gdata.client.Service.<clinit>(Service.java:555)
05-01 21:10:44.043: E/AndroidRuntime(12171): ... 15 more
in this state i understand that, youtube data not work on android project
what i need to do to order this target???
please help...
Your problem is this:
Caused by: java.lang.NoClassDefFoundError: com.google.common.collect.Maps
com.google.common.collect.Maps is not found. You ether missing a library or have some problem with the manifest.
Feel free to go through my example open source project, it utilizes Data API v3 for this..
https://code.google.com/p/ytd-android/
I am having a terrible time, this error happens on only one particular phone LG E405, has android version 2.3.6. The app works on every other device and emulator. All solution suggested in other cases dont apply to mine.
05-01 14:10:31.549: W/dalvikvm(3060): threadid=1: thread exiting with uncaught exception (group=0x401ff560)
05-01 14:10:31.569: E/AndroidRuntime(3060): FATAL EXCEPTION: main
05-01 14:10:31.569: E/AndroidRuntime(3060): java.lang.RuntimeException: Unable to start activity ComponentInfo{mf.sgh.activity/mf.sgh.activity.LoginScreenActivity}: android.view.InflateException: Binary XML file line #29: Error inflating class
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1658)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1674)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:942)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.os.Handler.dispatchMessage(Handler.java:99)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.os.Looper.loop(Looper.java:130)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.app.ActivityThread.main(ActivityThread.java:3735)
05-01 14:10:31.569: E/AndroidRuntime(3060): at java.lang.reflect.Method.invokeNative(Native Method)
05-01 14:10:31.569: E/AndroidRuntime(3060): at java.lang.reflect.Method.invoke(Method.java:507)
05-01 14:10:31.569: E/AndroidRuntime(3060): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
05-01 14:10:31.569: E/AndroidRuntime(3060): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:662)
05-01 14:10:31.569: E/AndroidRuntime(3060): at dalvik.system.NativeStart.main(Native Method)
05-01 14:10:31.569: E/AndroidRuntime(3060): Caused by: android.view.InflateException: Binary XML file line #29: Error inflating class
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
05-01 14:10:31.569: E/AndroidRuntime(3060): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
05-01 14:10:31.569: E/AndroidRuntime(3060): at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2240)
05-01 14:10:31.569: E/AndroidRuntime(3060): at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:2295)
05-01 14:10:31.569: E/AndroidRuntime(3060): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:203)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.app.Activity.setContentView(Activity.java:1657)
05-01 14:10:31.569: E/AndroidRuntime(3060): at mf.sgh.activity.LoginScreenActivity.onCreate(LoginScreenActivity.java:40)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1622)
05-01 14:10:31.569: E/AndroidRuntime(3060): ... 11 more
05-01 14:10:31.569: E/AndroidRuntime(3060): Caused by: java.lang.reflect.InvocationTargetException
05-01 14:10:31.569: E/AndroidRuntime(3060): at java.lang.reflect.Constructor.constructNative(Native Method)
05-01 14:10:31.569: E/AndroidRuntime(3060): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.view.LayoutInflater.createView(LayoutInflater.java:505)
05-01 14:10:31.569: E/AndroidRuntime(3060): ... 25 more
05-01 14:10:31.569: E/AndroidRuntime(3060): Caused by: java.lang.StringIndexOutOfBoundsException
05-01 14:10:31.569: E/AndroidRuntime(3060): at java.lang.String.substring(String.java:1651)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.provider.Settings$System.getSystemLocaleR2L(Settings.java:884)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.provider.Settings$System.getCursorDirection(Settings.java:878)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.widget.TextView.getImeWritingLanguageR2L(TextView.java:1045)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.widget.TextView.chkCurrentDirection(TextView.java:1031)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.widget.TextView.setPadding(TextView.java:1751)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.view.View.(View.java:2264)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.widget.TextView.(TextView.java:390)
05-01 14:10:31.569: E/AndroidRuntime(3060): at android.widget.TextView.(TextView.java:383)
05-01 14:10:31.569: E/AndroidRuntime(3060): ... 28 more
05-01 14:10:31.579: E/AndroidRuntime(3060): [Blue Error Handler] Make Debugging Report file for main
05-01 14:10:31.579: E/AndroidRuntime(3060): java.lang.RuntimeException: Unable to start activity ComponentInfo{mf.sgh.activity/mf.sgh.activity.LoginScreenActivity}: android.view.InflateException: Binary XML file line #29: Error inflating class
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1658)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1674)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:942)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.os.Handler.dispatchMessage(Handler.java:99)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.os.Looper.loop(Looper.java:130)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.app.ActivityThread.main(ActivityThread.java:3735)
05-01 14:10:31.579: E/AndroidRuntime(3060): at java.lang.reflect.Method.invokeNative(Native Method)
05-01 14:10:31.579: E/AndroidRuntime(3060): at java.lang.reflect.Method.invoke(Method.java:507)
05-01 14:10:31.579: E/AndroidRuntime(3060): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
05-01 14:10:31.579: E/AndroidRuntime(3060): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:662)
05-01 14:10:31.579: E/AndroidRuntime(3060): at dalvik.system.NativeStart.main(Native Method)
05-01 14:10:31.579: E/AndroidRuntime(3060): Caused by: android.view.InflateException: Binary XML file line #29: Error inflating class
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
05-01 14:10:31.579: E/AndroidRuntime(3060): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
05-01 14:10:31.579: E/AndroidRuntime(3060): at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2240)
05-01 14:10:31.579: E/AndroidRuntime(3060): at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:2295)
05-01 14:10:31.579: E/AndroidRuntime(3060): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:203)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.app.Activity.setContentView(Activity.java:1657)
05-01 14:10:31.579: E/AndroidRuntime(3060): at mf.sgh.activity.LoginScreenActivity.onCreate(LoginScreenActivity.java:40)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1622)
05-01 14:10:31.579: E/AndroidRuntime(3060): ... 11 more
05-01 14:10:31.579: E/AndroidRuntime(3060): Caused by: java.lang.reflect.InvocationTargetException
05-01 14:10:31.579: E/AndroidRuntime(3060): at java.lang.reflect.Constructor.constructNative(Native Method)
05-01 14:10:31.579: E/AndroidRuntime(3060): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.view.LayoutInflater.createView(LayoutInflater.java:505)
05-01 14:10:31.579: E/AndroidRuntime(3060): ... 25 more
05-01 14:10:31.579: E/AndroidRuntime(3060): Caused by: java.lang.StringIndexOutOfBoundsException
05-01 14:10:31.579: E/AndroidRuntime(3060): at java.lang.String.substring(String.java:1651)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.provider.Settings$System.getSystemLocaleR2L(Settings.java:884)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.provider.Settings$System.getCursorDirection(Settings.java:878)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.widget.TextView.getImeWritingLanguageR2L(TextView.java:1045)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.widget.TextView.chkCurrentDirection(TextView.java:1031)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.widget.TextView.setPadding(TextView.java:1751)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.view.View.(View.java:2264)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.widget.TextView.(TextView.java:390)
05-01 14:10:31.579: E/AndroidRuntime(3060): at android.widget.TextView.(TextView.java:383)
05-01 14:10:31.579: E/AndroidRuntime(3060): ... 28 more
I really need help
Suggestion : It may be possible that xml is not able to load the images due to which it goes Out of Memory and not able to Inflate the xml at the run time. Decrease the size of Images.
The solution is to first make sure all strings are in the default language before entering them in the locale file.
I am developing application on music player .
I am facing error like.
'*.MusicPlayerTabWidget has leaked ServiceConnection *
Please gave you comments regarding this.
I share my Logcat for this also.
05-01 10:38:03.226: W/KeyCharacterMap(4225): Using default keymap
05-01 10:38:03.429: E/ActivityThread(4225): Activity com.pvMusic.pvm.MusicPlayerTabWidget has leaked ServiceConnection com.pvMusic.pvm.MusicPlayerTabWidget$1#4051c6f0 that was originally bound here
05-01 10:38:03.429: E/ActivityThread(4225): android.app.ServiceConnectionLeaked: Activity com.pvMusic.pvm.MusicPlayerTabWidget has leaked ServiceConnection com.pvMusic.pvm.MusicPlayerTabWidget$1#4051c6f0 that was originally bound here
05-01 10:38:03.429: E/ActivityThread(4225): at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:938)
05-01 10:38:03.429: E/ActivityThread(4225): at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:833)
05-01 10:38:03.429: E/ActivityThread(4225): at android.app.ContextImpl.bindService(ContextImpl.java:879)
05-01 10:38:03.429: E/ActivityThread(4225): at android.content.ContextWrapper.bindService(ContextWrapper.java:347)
05-01 10:38:03.429: E/ActivityThread(4225): at com.pvMusic.pvm.MusicPlayerTabWidget.onStart(MusicPlayerTabWidget.java:175)
05-01 10:38:03.429: E/ActivityThread(4225): at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1129)
05-01 10:38:03.429: E/ActivityThread(4225): at android.app.Activity.performStart(Activity.java:3791)
05-01 10:38:03.429: E/ActivityThread(4225): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1624)
05-01 10:38:03.429: E/ActivityThread(4225): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
05-01 10:38:03.429: E/ActivityThread(4225): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
05-01 10:38:03.429: E/ActivityThread(4225): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
05-01 10:38:03.429: E/ActivityThread(4225): at android.os.Handler.dispatchMessage(Handler.java:99)
05-01 10:38:03.429: E/ActivityThread(4225): at android.os.Looper.loop(Looper.java:130)
05-01 10:38:03.429: E/ActivityThread(4225): at android.app.ActivityThread.main(ActivityThread.java:3687)
05-01 10:38:03.429: E/ActivityThread(4225): at java.lang.reflect.Method.invokeNative(Native Method)
05-01 10:38:03.429: E/ActivityThread(4225): at java.lang.reflect.Method.invoke(Method.java:507)
05-01 10:38:03.429: E/ActivityThread(4225): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
05-01 10:38:03.429: E/ActivityThread(4225): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
05-01 10:38:03.429: E/ActivityThread(4225): at dalvik.system.NativeStart.main(Native Method)
05-01 10:39:31.859: D/dalvikvm(4225): GC_EXPLICIT freed 166K, 46% free 3022K/5575K, external 557K/1031K, paused 52ms
05-01 10:39:31.906: D/dalvikvm(4225): GC_CONCURRENT freed 0K, 46% free 3022K/5575K, external 557K/1031K, paused 4ms+3ms
More over that if you have any reference tutorials for the music player please share with me..
Add unbindService(mConnection); in your onstop() method. The code will start working properly.
If you are doing a local binding to the service inside you activity , you need to make sure that you are disconnecting from the service whenever your activity is getting closed. Otherwise the app will start leaking the connection as in your error.
You're trying to show something after you're exit activity ( your thread came back ).
as shown here, you should override the onDestroy and dismiss the dialog that is running after the activity closes.
This can also happen when your Service has registered a BroadcastReceiver and didn't unregister.
So please unregister it in onDestroy
unregisterReceiver(mReceiver);
If you bind to getApplicationContext() instead, the binding will run as long as your app is running. If you bind to getContext(), and the Activity's context is destroyed, android notices that you didn't close the connection related to that context.