error while trying to receive email using javamail - android

I tried to receive email from gmail and outlook with IMAP and POP3 in Eclipse (with javamail). But every time I see the same error message.
Receiving using IMAP and Gmail:
Properties props = new Properties();
props.setProperty("mail.store.protocol", "imaps");
props.setProperty("mail.imap.host", "imap.gmail.com");
props.setProperty("mail.imap.port", "993");
props.setProperty("mail.imap.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
props.setProperty("mail.imap.socketFactory.fallback", "false");
Session imapSession=Session.getInstance(props);
Store store = imapSession.getStore("imaps");
store.connect("imap.gmail.com","gmail account", "pass");
Folder inbox = store.getFolder("Inbox");
inbox.open(Folder.READ_WRITE);
Message[] msgs =inbox.getMessages();
Message read=msgs[1];
String result=read.toString();
return result;
Error log:
05-15 20:40:58.822: W/dalvikvm(24130): method Lcom/sun/mail/imap/IMAPStore;.getSession incorrectly overrides package-private method with same name in Ljavax/mail/Service;
05-15 20:40:59.772: I/dalvikvm(24130): Failed resolving Ljavax/activation/DataHandler; interface 944 'Ljava/awt/datatransfer/Transferable;'
05-15 20:40:59.772: W/dalvikvm(24130): Link of class 'Ljavax/activation/DataHandler;' failed
05-15 20:40:59.772: W/dalvikvm(24130): VFY: unable to find class referenced in signature (Ljavax/activation/DataHandler;)
05-15 20:40:59.772: I/dalvikvm(24130): Failed resolving Ljavax/activation/DataHandler; interface 944 'Ljava/awt/datatransfer/Transferable;'
05-15 20:40:59.772: W/dalvikvm(24130): Link of class 'Ljavax/activation/DataHandler;' failed
05-15 20:40:59.772: I/dalvikvm(24130): Could not find method javax.activation.DataHandler.getName, referenced from method javax.mail.internet.MimeUtility.getEncoding
05-15 20:40:59.772: W/dalvikvm(24130): VFY: unable to resolve virtual method 7893: Ljavax/activation/DataHandler;.getName ()Ljava/lang/String;
05-15 20:40:59.772: D/dalvikvm(24130): VFY: replacing opcode 0x6e at 0x0004
05-15 20:41:02.122: I/dalvikvm(24130): Failed resolving Ljavax/activation/DataHandler; interface 944 'Ljava/awt/datatransfer/Transferable;'
05-15 20:41:02.122: W/dalvikvm(24130): Link of class 'Ljavax/activation/DataHandler;' failed
05-15 20:41:02.122: I/dalvikvm(24130): Failed resolving Ljavax/activation/DataHandler; interface 944 'Ljava/awt/datatransfer/Transferable;'
05-15 20:41:02.122: W/dalvikvm(24130): Link of class 'Ljavax/activation/DataHandler;' failed
05-15 20:41:02.122: E/dalvikvm(24130): Could not find class 'javax.activation.DataHandler', referenced from method com.sun.mail.imap.IMAPMessage.getDataHandler
05-15 20:41:02.122: W/dalvikvm(24130): VFY: unable to resolve new-instance 1177 (Ljavax/activation/DataHandler;) in Lcom/sun/mail/imap/IMAPMessage;
05-15 20:41:02.122: D/dalvikvm(24130): VFY: replacing opcode 0x22 at 0x0032
05-15 20:41:02.122: I/dalvikvm(24130): Failed resolving Ljavax/activation/DataHandler; interface 944 'Ljava/awt/datatransfer/Transferable;'
05-15 20:41:02.122: W/dalvikvm(24130): Link of class 'Ljavax/activation/DataHandler;' failed
05-15 20:41:02.122: W/dalvikvm(24130): VFY: unable to find class referenced in signature (Ljavax/activation/DataHandler;)
05-15 20:41:02.192: D/dalvikvm(24130): DexOpt: unable to opt direct call 0x1ec7 at 0x3f in Lcom/sun/mail/imap/IMAPMessage;.getDataHandler
Using POP3 and Outlook:
Properties properties = new Properties();
properties.put("mail.pop3.host", "pop-mail.outlook.com");
properties.put("mail.pop3.port", "995");
properties.put("mail.pop3.starttls.enable", "true");
Session emailSession = Session.getDefaultInstance(properties);
Store store = emailSession.getStore("pop3s");
store.connect("pop-mail.outlook.com", "username", "pass");
Folder emailFolder = store.getFolder("INBOX");
emailFolder.open(Folder.READ_ONLY);
Message[] messages = emailFolder.getMessages();
String result=messages[10].toString();
emailFolder.close(false);
store.close();
return result;
And my error log:
05-15 20:30:46.002: W/dalvikvm(21892): method Lcom/sun/mail/pop3/POP3Store;.getSession incorrectly overrides package-private method with same name in Ljavax/mail/Service;
05-15 20:30:49.312: I/dalvikvm(21892): Failed resolving Ljavax/activation/DataHandler; interface 944 'Ljava/awt/datatransfer/Transferable;'
05-15 20:30:49.312: W/dalvikvm(21892): Link of class 'Ljavax/activation/DataHandler;' failed
05-15 20:30:49.312: W/dalvikvm(21892): VFY: unable to find class referenced in signature (Ljavax/activation/DataHandler;)
05-15 20:30:49.312: I/dalvikvm(21892): Failed resolving Ljavax/activation/DataHandler; interface 944 'Ljava/awt/datatransfer/Transferable;'
05-15 20:30:49.312: W/dalvikvm(21892): Link of class 'Ljavax/activation/DataHandler;' failed
05-15 20:30:49.312: I/dalvikvm(21892): Could not find method javax.activation.DataHandler.getContent, referenced from method javax.mail.internet.MimeMessage.getContent
05-15 20:30:49.312: W/dalvikvm(21892): VFY: unable to resolve virtual method 7887: Ljavax/activation/DataHandler;.getContent ()Ljava/lang/Object;
05-15 20:30:49.312: D/dalvikvm(21892): VFY: replacing opcode 0x6e at 0x000b
I can count the number of received mails but no luck with reading them. I am almost new to android but as far as i can see, there's something wrong with the javamail library.

check mail.jar and activation.jar
also check this link:
https://code.google.com/p/javamail-android/downloads/list

Related

Can't integrate Firebase in my Android app

I added new project in my Firebase account like all the time and downloaded google-services.json setting file and successfully install it and the app works however not with firebase service the following is my debug , while the app crash.
please note that this error shows up when i try to add : implementation 'com.google.firebase:firebase-core:16.0.4' and in android studio it shows no error in gradle
10/08 19:55:40: Launching app
$ adb push C:\xxx\app\build\outputs\apk\debug\app-debug.apk /data/local/tmp/com.xxx.insidecartoon
$ adb shell pm install -t -r "/data/local/tmp/com.xxx.xxx"
pkg: /data/local/tmp/com.xxx.xxx
Success
APK installed in 27 s 241 ms
$ adb shell am start -n "com.xxx.xxx/com.xxx.xxx.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Waiting for application to come online: com.xxx.xxx.test | com.xxx.xxx
Connecting to com.xxx.xxx
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
I/System.out: Sending WAIT chunk
W/ActivityThread: Application com.xxx.xxx is waiting for the debugger on port 8100...
I/dalvikvm: Debugger is active
I/System.out: Debugger has connected
waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
Connected to the target VM, address: 'localhost:8602', transport: 'socket'
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: debugger has settled (1405)
I/dalvikvm: Could not find method android.content.Context.createDeviceProtectedStorageContext, referenced from method android.support.v4.content.ContextCompat.createDeviceProtectedStorageContext
W/dalvikvm: VFY: unable to resolve virtual method 565: Landroid/content/Context;.createDeviceProtectedStorageContext ()Landroid/content/Context;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm: Could not find method android.content.Context.getCodeCacheDir, referenced from method android.support.v4.content.ContextCompat.getCodeCacheDir
W/dalvikvm: VFY: unable to resolve virtual method 573: Landroid/content/Context;.getCodeCacheDir ()Ljava/io/File;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm: Could not find method android.content.Context.getColor, referenced from method android.support.v4.content.ContextCompat.getColor
W/dalvikvm: VFY: unable to resolve virtual method 574: Landroid/content/Context;.getColor (I)I
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm: Could not find method android.content.Context.getColorStateList, referenced from method android.support.v4.content.ContextCompat.getColorStateList
W/dalvikvm: VFY: unable to resolve virtual method 575: Landroid/content/Context;.getColorStateList (I)Landroid/content/res/ColorStateList;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm: Could not find method android.content.Context.getDataDir, referenced from method android.support.v4.content.ContextCompat.getDataDir
W/dalvikvm: VFY: unable to resolve virtual method 577: Landroid/content/Context;.getDataDir ()Ljava/io/File;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm: Could not find method android.content.Context.getDrawable, referenced from method android.support.v4.content.ContextCompat.getDrawable
W/dalvikvm: VFY: unable to resolve virtual method 580: Landroid/content/Context;.getDrawable (I)Landroid/graphics/drawable/Drawable;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm: Could not find method android.content.Context.getNoBackupFilesDir, referenced from method android.support.v4.content.ContextCompat.getNoBackupFilesDir
W/dalvikvm: VFY: unable to resolve virtual method 587: Landroid/content/Context;.getNoBackupFilesDir ()Ljava/io/File;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm: Could not find method android.content.Context.isDeviceProtectedStorage, referenced from method android.support.v4.content.ContextCompat.isDeviceProtectedStorage
W/dalvikvm: VFY: unable to resolve virtual method 600: Landroid/content/Context;.isDeviceProtectedStorage ()Z
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm: Could not find method android.content.Context.startForegroundService, referenced from method android.support.v4.content.ContextCompat.startForegroundService
W/dalvikvm: VFY: unable to resolve virtual method 615: Landroid/content/Context;.startForegroundService (Landroid/content/Intent;)Landroid/content/ComponentName;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm: Could not find method android.content.Context.isDeviceProtectedStorage, referenced from method com.google.android.gms.internal.measurement.zzsl.init
W/dalvikvm: VFY: unable to resolve virtual method 600: Landroid/content/Context;.isDeviceProtectedStorage ()Z
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0009
V/FA: Registered activity lifecycle callback
D/FirebaseApp: com.google.firebase.auth.FirebaseAuth is not linked. Skipping initialization.
D/FirebaseApp: com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.
I/FirebaseInitProvider: FirebaseApp initialization successful
V/FA: onActivityCreated
W/dalvikvm: Unable to resolve superclass of Lcom/google/android/gms/ads/internal/client/zze; (3038)
Link of class 'Lcom/google/android/gms/ads/internal/client/zze;' failed
VFY: unable to find class referenced in signature (Lcom/google/android/gms/ads/internal/client/zze;)
W/dalvikvm: Unable to resolve superclass of Lcom/google/android/gms/ads/internal/client/zze; (3038)
Link of class 'Lcom/google/android/gms/ads/internal/client/zze;' failed
I/dalvikvm: Could not find method com.google.android.gms.ads.internal.client.zze.zzb, referenced from method com.google.android.gms.ads.internal.client.zzac.zzH
W/dalvikvm: VFY: unable to resolve virtual method 17122: Lcom/google/android/gms/ads/internal/client/zze;.zzb (Landroid/content/Context;Lcom/google/android/gms/ads/internal/client/AdSizeParcel;Ljava/lang/String;Lcom/google/android/gms/internal/zzew;)Lcom/google/android/gms/ads/internal/client/zzu;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x001f
I/dalvikvm: Could not find method com.google.android.gms.common.internal.zzx.zzb, referenced from method com.google.android.gms.ads.AdRequest$Builder.setContentUrl
W/dalvikvm: VFY: unable to resolve static method 21535: Lcom/google/android/gms/common/internal/zzx;.zzb (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
D/dalvikvm: VFY: replacing opcode 0x71 at 0x0002
W/dalvikvm: Unable to resolve superclass of Lcom/google/android/gms/ads/internal/client/zze; (3038)
Link of class 'Lcom/google/android/gms/ads/internal/client/zze;' failed
E/dalvikvm: Could not find class 'com.google.android.gms.ads.internal.client.zze', referenced from method com.google.android.gms.ads.internal.client.zzn.<init>
W/dalvikvm: VFY: unable to resolve new-instance 2192 (Lcom/google/android/gms/ads/internal/client/zze;) in Lcom/google/android/gms/ads/internal/client/zzn;
D/dalvikvm: VFY: replacing opcode 0x22 at 0x000a
W/dalvikvm: Unable to resolve superclass of Lcom/google/android/gms/ads/internal/client/zze; (3038)
Link of class 'Lcom/google/android/gms/ads/internal/client/zze;' failed
W/dalvikvm: Unable to resolve superclass of Lcom/google/android/gms/ads/internal/client/zze; (3038)
Link of class 'Lcom/google/android/gms/ads/internal/client/zze;' failed
VFY: unable to find class referenced in signature (Lcom/google/android/gms/ads/internal/client/zze;)
W/dalvikvm: Unable to resolve superclass of Lcom/google/android/gms/ads/internal/client/zzaf; (3038)
Link of class 'Lcom/google/android/gms/ads/internal/client/zzaf;' failed
W/dalvikvm: Unable to resolve superclass of Lcom/google/android/gms/ads/internal/client/zzaf; (3038)
Link of class 'Lcom/google/android/gms/ads/internal/client/zzaf;' failed
VFY: unable to find class referenced in signature (Lcom/google/android/gms/ads/internal/client/zzaf;)
W/dalvikvm: Unable to resolve superclass of Lcom/google/android/gms/internal/zzcv; (3038)
Link of class 'Lcom/google/android/gms/internal/zzcv;' failed
W/dalvikvm: Unable to resolve superclass of Lcom/google/android/gms/internal/zzcv; (3038)
Link of class 'Lcom/google/android/gms/internal/zzcv;' failed
W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/google/android/gms/internal/zzcv;)
W/dalvikvm: Unable to resolve superclass of Lcom/google/android/gms/ads/internal/reward/client/zzf; (3038)
Link of class 'Lcom/google/android/gms/ads/internal/reward/client/zzf;' failed
W/dalvikvm: Unable to resolve superclass of Lcom/google/android/gms/ads/internal/reward/client/zzf; (3038)
Link of class 'Lcom/google/android/gms/ads/internal/reward/client/zzf;' failed
W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/google/android/gms/ads/internal/reward/client/zzf;)
Unable to resolve superclass of Lcom/google/android/gms/ads/internal/client/zze; (3038)
Link of class 'Lcom/google/android/gms/ads/internal/client/zze;' failed
D/dalvikvm: DexOpt: unable to opt direct call 0x42de at 0x0c in Lcom/google/android/gms/ads/internal/client/zzn;.<init>
W/dalvikvm: Unable to resolve superclass of Lcom/google/android/gms/ads/internal/client/zzaf; (3038)
Link of class 'Lcom/google/android/gms/ads/internal/client/zzaf;' failed
D/dalvikvm: DexOpt: unable to opt direct call 0x427b at 0x1a in Lcom/google/android/gms/ads/internal/client/zzn;.<init>
W/dalvikvm: Unable to resolve superclass of Lcom/google/android/gms/internal/zzcv; (3038)
Link of class 'Lcom/google/android/gms/internal/zzcv;' failed
D/dalvikvm: DexOpt: unable to opt direct call 0x623a at 0x21 in Lcom/google/android/gms/ads/internal/client/zzn;.<init>
W/dalvikvm: Unable to resolve superclass of Lcom/google/android/gms/ads/internal/reward/client/zzf; (3038)
Link of class 'Lcom/google/android/gms/ads/internal/reward/client/zzf;' failed
D/dalvikvm: DexOpt: unable to opt direct call 0x46fd at 0x28 in Lcom/google/android/gms/ads/internal/client/zzn;.<init>
W/dalvikvm: DexOpt: resolve class illegal access: Lcom/google/android/gms/ads/internal/util/client/zza; -> Lcom/google/android/gms/common/zze;
I/dalvikvm: Could not find method com.google.android.gms.common.zze.isGooglePlayServicesAvailable, referenced from method com.google.android.gms.ads.internal.util.client.zza.zzU
W/dalvikvm: VFY: unable to resolve static method 22073: Lcom/google/android/gms/common/zze;.isGooglePlayServicesAvailable (Landroid/content/Context;)I
D/dalvikvm: VFY: replacing opcode 0x71 at 0x0000
I/dalvikvm: Could not find method com.google.android.gms.internal.zzne.zzsi, referenced from method com.google.android.gms.ads.internal.util.client.zza.zzW
W/dalvikvm: VFY: unable to resolve static method 27575: Lcom/google/android/gms/internal/zzne;.zzsi ()Z
D/dalvikvm: VFY: replacing opcode 0x71 at 0x0014
W/dalvikvm: Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lcom/google/android/gms/ads/internal/client/zzn;
Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lcom/google/android/gms/ads/internal/client/zzaa;
Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lcom/google/android/gms/ads/AdRequest;
D/AndroidRuntime: Shutting down VM
W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x417e1da0)
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.xxx.xxx, PID: 29691
java.lang.NoClassDefFoundError: com.google.android.gms.ads.internal.client.zze
at com.google.android.gms.ads.internal.client.zzn.<init>(Unknown Source)
at com.google.android.gms.ads.internal.client.zzn.<clinit>(Unknown Source)
at com.google.android.gms.ads.internal.client.zzaa.<clinit>(Unknown Source)
at com.google.android.gms.ads.AdRequest.<clinit>(Unknown Source)
at com.google.android.gms.ads.AdRequest$Builder.<init>(Unknown Source)
at com.xxx.xxx.MainActivity.requestNewInterstitial(MainActivity.java:77)
at com.xxx.xxx.MainActivity.onCreate(MainActivity.java:49)
at android.app.Activity.performCreate(Activity.java:5541)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2368)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2464)
at android.app.ActivityThread.access$900(ActivityThread.java:172)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5653)
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:1291)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
at dalvik.system.NativeStart.main(Native Method)
Disconnected from the target VM, address: 'localhost:8602', transport: 'socket'
my gradle info also i run android version 3.2 and gradle wrapper gradle-4.6
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "28.0.2"
defaultConfig {
applicationId "com.xxx.xxx"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "KING-DEV"
}
buildTypes {
release {
debuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.google.android.gms:play-services-ads:8.4.0'
implementation 'com.google.firebase:firebase-core:16.0.4'
}
apply plugin: 'com.google.gms.google-services'**
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.google.gms:google-services:4.1.0' // google-services plugin
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Try applying plugin of google play services
apply plugin: 'com.google.gms.google-services'
To solve this, please change the following line of code:
compile 'com.google.android.gms:play-services-ads:8.4.0'
to
implementation 'com.google.android.gms:play-services-ads:16.0.0'
And remove ** after this line of code:
apply plugin: 'com.google.gms.google-services'

DB didn't get created in Cordova

I have problem with my first application in Android Studio-Cordova.
I used for my application html,css, jquery and sql.
The application is correct, because I'm attending an on-line course with related code.
It starts, but the message of creating db isn't appeared.
the log of Android Studio is this:
Client not ready yet..Waiting for process to come online
Connected to process 2679 on device Nexus_5_API_19_armeabi_v7a [emulator-5554]
I/InstantRun: Instant Run Runtime started. Android package is com.videocorsi.test, real application class is null.
W/InstantRun: No instant run dex files added to classpath
I/CordovaLog: Changing log level to DEBUG(3)
I/CordovaActivity: Apache Cordova native platform version 6.0.0 is starting
D/CordovaActivity: CordovaActivity.onCreate()
I/dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method org.apache.cordova.CordovaInterfaceImpl.hasPermission
W/dalvikvm: VFY: unable to resolve virtual method 2: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0023
I/dalvikvm: Could not find method android.app.Activity.requestPermissions, referenced from method org.apache.cordova.CordovaInterfaceImpl.requestPermissions
W/dalvikvm: VFY: unable to resolve virtual method 136: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0029
V/WebViewChromium: Binding Chromium to the background looper Looper (main, tid 1) {9dd95220}
I/chromium: [INFO:library_loader_hooks.cc(112)] Chromium logging enabled: level = 0, default verbosity = 0
I/BrowserProcessMain: Initializing chromium process, renderers=0
W/chromium: [WARNING:proxy_service.cc(888)] PAC support disabled because there is no system implementation
D/dalvikvm: GC_FOR_ALLOC freed 142K, 12% free 3463K/3892K, paused 86ms, total 88ms
I/dalvikvm-heap: Grow heap (frag case) to 6.078MB for 2536936-byte allocation
D/dalvikvm: GC_FOR_ALLOC freed 0K, 7% free 5941K/6372K, paused 58ms, total 58ms
I/dalvikvm: Could not find method android.webkit.CookieManager.setAcceptThirdPartyCookies, referenced from method org.apache.cordova.engine.SystemCookieManager.<init>
W/dalvikvm: VFY: unable to resolve virtual method 953: Landroid/webkit/CookieManager;.setAcceptThirdPartyCookies (Landroid/webkit/WebView;Z)V
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0046
I/dalvikvm: Could not find method android.webkit.CookieManager.flush, referenced from method org.apache.cordova.engine.SystemCookieManager.flush
W/dalvikvm: VFY: unable to resolve virtual method 947: Landroid/webkit/CookieManager;.flush ()V
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0019
W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/webkit/ClientCertRequest;)
W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/webkit/ClientCertRequest;)
I/dalvikvm: Could not find method android.webkit.WebViewClient.onReceivedClientCertRequest, referenced from method org.apache.cordova.engine.SystemWebViewClient.onReceivedClientCertRequest
W/dalvikvm: VFY: unable to resolve virtual method 1147: Landroid/webkit/WebViewClient;.onReceivedClientCertRequest (Landroid/webkit/WebView;Landroid/webkit/ClientCertRequest;)V
D/dalvikvm: VFY: replacing opcode 0x6f at 0x0031
W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/webkit/PermissionRequest;)
I/dalvikvm: Could not find method android.webkit.PermissionRequest.getResources, referenced from method org.apache.cordova.engine.SystemWebChromeClient.onPermissionRequest
W/dalvikvm: VFY: unable to resolve virtual method 964: Landroid/webkit/PermissionRequest;.getResources ()[Ljava/lang/String;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0023
I/dalvikvm: Could not find method android.webkit.WebChromeClient$FileChooserParams.createIntent, referenced from method org.apache.cordova.engine.SystemWebChromeClient.onShowFileChooser
W/dalvikvm: VFY: unable to resolve virtual method 969: Landroid/webkit/WebChromeClient$FileChooserParams;.createIntent ()Landroid/content/Intent;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0021
D/SystemWebViewEngine: CordovaWebView is running on device made by: unknown
D/PluginManager: init()
D/CordovaWebViewImpl: >>> loadUrl(file:///android_asset/www/index.html)
D/CordovaActivity: Started the activity.
D/CordovaActivity: Resumed the activity.
D/OpenGLRenderer: Enabling debug mode 0
I/Choreographer: Skipped 81 frames! The application may be doing too much work on its main thread.
W/AwContents: nativeOnDraw failed; clearing to background color.
W/AwContents: nativeOnDraw failed; clearing to background color.
W/AwContents: nativeOnDraw failed; clearing to background color.
W/AwContents: nativeOnDraw failed; clearing to background color.
D/CordovaWebViewImpl: onPageDidNavigate(file:///android_asset/www/index.html)
D/JsMessageQueue: Set native->JS mode to EvalBridgeMode
I/chromium: [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported
I/chromium: [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported
I/Choreographer: Skipped 74 frames! The application may be doing too much work on its main thread.
D/SystemWebChromeClient: file:///android_asset/www/cordova_plugins.js: Line 7 : Uncaught SyntaxError: Unexpected string
I/chromium: [INFO:CONSOLE(7)] "Uncaught SyntaxError: Unexpected string", source: file:///android_asset/www/cordova_plugins.js (7)
D/CordovaWebViewImpl: onPageFinished(file:///android_asset/www/index.html)
D/SystemWebChromeClient: file:///android_asset/www/js/index.js: Line 39 : Uncaught ReferenceError: listeningElement is not defined
I/chromium: [INFO:CONSOLE(39)] "Uncaught ReferenceError: listeningElement is not defined", source: file:///android_asset/www/js/index.js (39)
D/SystemWebChromeClient: file:///android_asset/www/index.html: Line 237 : Uncaught TypeError: Cannot call method 'transaction' of undefined
I/chromium: [INFO:CONSOLE(237)] "Uncaught TypeError: Cannot call method 'transaction' of undefined", source: file:///android_asset/www/index.html (237)
What Can I do?
the problem was in this file index.js . I had commented this:
receivedEvent: function(id) { var parentElement =document.getElementById(id);
// var listeningElement = parentElement.querySelector('.listening');
//var receivedElement = parentElement.querySelector('.received');
// listeningElement.setAttribute('style', 'display:none;'); //receivedElement.setAttribute('style', 'display:block;');
console.log('Received Event: ' + id); }
Then, I had move the tag script with my js/jquery code at the end of the tag

Android: Flurry Banner Ad is not displaying

I have integrated Flurry banner ad on my app. On logcat it says BannerAdObject created, but ad is not displayed. I've attached the code and logcat. I have not found any solution for this issue .
mBanner =(RelativeLayout)view.findViewById(R.id.banner);
mFlurryAdBanner = new FlurryAdBanner(getActivity(), mBanner, mAdSpaceName);
mFlurryAdBanner.setListener(bannerAdListener);
FlurryAdBannerListener bannerAdListener = new FlurryAdBannerListener() {
#Override
public void onFetched(FlurryAdBanner adBanner) {
adBanner.displayAd();
}
//... other Overriden method goes here
};
Logcat
05-02 07:16:47.770 15810-15810/com.test W/FlurryAgent: 'setLogEnabled' method is deprecated.
05-02 07:16:47.770 15810-15810/com.test W/FlurryAgent: 'setLogLevel' method is deprecated.
05-02 07:16:47.810 15810-15810/com.test W/FlurryAgent: 'init' method is deprecated.
05-02 07:16:48.100 15810-15964com.test I/FlurryAgent: New main file also not found. returning..
05-02 07:16:48.105 15810-15964/com.test I/FlurryAgent: New main file also not found. returning..
05-02 07:16:48.115 15810-15964/com.test I/dalvikvm: Could not find method android.os.StatFs.getAvailableBlocksLong, referenced from method com.flurry.sdk.ja.a
05-02 07:16:48.120 15810-15964/com.test I/dalvikvm: Could not find method android.webkit.WebSettings.getDefaultUserAgent, referenced from method com.flurry.sdk.dx$1.a
05-02 07:16:48.125 15810-15964/com.test W/FlurryAgent: Flurry session started for context:com.test.SplashActivity#4273f6d8
05-02 07:16:48.125 15810-15964/com.test W/FlurryAgent: Flurry session resumed for context:com.test.SplashActivity#4273f6d8
05-02 07:16:48.140 15810-15964/com.test I/dalvikvm: Failed resolving Lcom/flurry/sdk/bt; interface 2723 'Lcom/facebook/ads/AdListener;'
05-02 07:16:48.140 15810-15964/com.test W/dalvikvm: Link of class 'Lcom/flurry/sdk/bt;' failed
05-02 07:16:48.140 15810-15964/com.test E/dalvikvm: Could not find class 'com.flurry.sdk.bt', referenced from method com.flurry.sdk.bu.a
05-02 07:16:48.140 15810-15964/com.test W/dalvikvm: VFY: unable to resolve new-instance 3271 (Lcom/flurry/sdk/bt;) in Lcom/flurry/sdk/bu;
05-02 07:16:48.140 15810-15964/com.test I/dalvikvm: Failed resolving Lcom/flurry/sdk/bv; interface 2728 'Lcom/facebook/ads/InterstitialAdListener;'
05-02 07:16:48.140 15810-15964/com.test W/dalvikvm: Link of class 'Lcom/flurry/sdk/bv;' failed
05-02 07:16:48.140 15810-15964/com.test E/dalvikvm: Could not find class 'com.flurry.sdk.bv', referenced from method com.flurry.sdk.bu.a
05-02 07:16:48.140 15810-15964/com.test W/dalvikvm: VFY: unable to resolve new-instance 3273 (Lcom/flurry/sdk/bv;) in Lcom/flurry/sdk/bu;
05-02 07:16:48.140 15810-15964com.test I/dalvikvm: Failed resolving Lcom/flurry/sdk/bt; interface 2723 'Lcom/facebook/ads/AdListener;'
05-02 07:16:48.140 15810-15964/com.test W/dalvikvm: Link of class 'Lcom/flurry/sdk/bt;' failed
05-02 07:16:48.140 15810-15964/com.test D/dalvikvm: DexOpt: unable to opt direct call 0x6634 at 0x0c in Lcom/flurry/sdk/bu;.a
05-02 07:16:48.145 15810-15964/com.test I/dalvikvm: Failed resolving Lcom/flurry/sdk/bv; interface 2728 'Lcom/facebook/ads/InterstitialAdListener;'
05-02 07:16:48.145 15810-15964/com.test W/dalvikvm: Link of class 'Lcom/flurry/sdk/bv;' failed
05-02 07:16:48.145 15810-15964/com.test D/dalvikvm: DexOpt: unable to opt direct call 0x664a at 0x0a in Lcom/flurry/sdk/bu;.a
05-02 07:16:48.165 15810-15964/com.test W/webview_proxy: java.lang.Throwable: Warning: A WebView method was called on thread 'FlurryAgent'. All WebView methods must be called on the UI thread. Future versions of WebView may not support use on other threads.
at android.webkit.WebView.checkThread(WebView.java:1895)
05-02 07:40:05.855 12475-12626/com.test D/FlurryAgent: Referrer file contents: null
05-02 07:40:09.090 12475-12626/com.test W/FlurryAgent: Flurry session resumed for context:com.test.HomeActivity#426ec9d8
05-02 07:40:09.445 12475-12661/com.test W/FlurryAgent: Analytics report sent.
05-02 07:40:10.840 12475-12626/com.test W/FlurryAgent: Flurry session paused for context:com.test.SplashActivity#4277efe8
05-02 07:40:14.440 12475-12475/com.test D/FlurryAgent: BannerAdObject created: com.flurry.sdk.q#42bed4d8

Error on startup android application (Titanium framework)

I've a problem with my Titanium Android application. The app works correctly in iOS, but not in Android.
I get the following error:
V8Object: (KrollRuntimeThread) [88,88] Runtime disposed, cannot set property 'userAgent'
[INFO] : dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method ti.modules.titanium.media.MediaModule.hasCameraPermission
[INFO] : dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method ti.modules.titanium.media.MediaModule.hasStoragePermission
[WARN] : dalvikvm: VFY: unable to resolve virtual method 27: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I
[WARN] : dalvikvm: VFY: unable to resolve virtual method 27: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I
[INFO] : dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method ti.modules.titanium.media.MediaModule.hasCameraPermissions
[WARN] : dalvikvm: VFY: unable to resolve virtual method 27: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I
[INFO] : dalvikvm: Could not find method android.app.Activity.requestPermissions, referenced from method ti.modules.titanium.media.MediaModule.requestCameraPermissions
[WARN] : dalvikvm: VFY: unable to resolve virtual method 80: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V
[WARN] : dalvikvm: threadid=10: thread exiting with uncaught exception (group=0x41fe92a0)
Can anybody help me help me?
Sory for the previos unformatted message.I send a screenshot of log file.
android crashed log
This issue relates V8Object: (KrollRuntimeThread) Runtime disposed, cannot set property 'userAge. Check the link

Android Flurry test ad not being displayed

I am tring to integrate flurry test ads but the method setEnableTestAds throws a compilation error-- "the methods is undefined for FlurryAdBanner"
i comment this part and try to fetch and display ads but i do not see any ads in the emulator.
I am following this link.
My code-
private RelativeLayout mBanner;
private FlurryAdBanner mFlurryAdBanner = null;
private String mAdSpaceName = "BANNER_ADSPACE";
private String adspace = "BANNER_BOTTOM";
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_base);
FlurryAgent.init(this, Constants.FLURRY_KEY);
}
#Override
protected void onStart() {
super.onStart();
FlurryAgent.onStartSession(this, Constants.FLURRY_KEY);
//Flurry Ads
mBanner = (RelativeLayout)findViewById(R.id.flurry_banner);
mFlurryAdBanner = new FlurryAdBanner(this, mBanner, mAdSpaceName);
//FlurryAgent.logEvent("Pic taken");
// fetch and display ad for this ad space as soon as it is ready.
//mFlurryAdBanner.fetchAd();
mFlurryAdBanner.fetchAndDisplayAd();
// mFlurryAdBanner.setEnableTestAds(true);
}
My console messsages---
12-23 11:54:16.034: E/FlurryAgent(2069): There is a problem with the Google Play Services library, which is required for Android Advertising ID support. The Google Play Services library should be integrated in any app shipping in the Play Store that uses analytics or advertising.
12-23 11:54:16.454: D/dalvikvm(2069): GC_FOR_ALLOC freed 252K, 10% free 2913K/3224K, paused 40ms, total 43ms
12-23 11:54:16.734: W/FlurryAgent(2069): Flurry session created for context:XXX.activity.BaseActivity#b3ff2710
12-23 11:54:16.874: I/dalvikvm(2069): Failed resolving Lcom/flurry/sdk/bp; interface 1225 'Lcom/facebook/ads/AdListener;'
12-23 11:54:16.874: W/dalvikvm(2069): Link of class 'Lcom/flurry/sdk/bp;' failed
12-23 11:54:16.884: E/dalvikvm(2069): Could not find class 'com.flurry.sdk.bp', referenced from method com.flurry.sdk.bq.a
12-23 11:54:16.884: W/dalvikvm(2069): VFY: unable to resolve new-instance 1366 (Lcom/flurry/sdk/bp;) in Lcom/flurry/sdk/bq;
12-23 11:54:16.884: D/dalvikvm(2069): VFY: replacing opcode 0x22 at 0x000a
12-23 11:54:16.884: I/dalvikvm(2069): Failed resolving Lcom/flurry/sdk/br; interface 1230 'Lcom/facebook/ads/InterstitialAdListener;'
12-23 11:54:16.884: W/dalvikvm(2069): Link of class 'Lcom/flurry/sdk/br;' failed
12-23 11:54:16.884: E/dalvikvm(2069): Could not find class 'com.flurry.sdk.br', referenced from method com.flurry.sdk.bq.a
12-23 11:54:16.884: W/dalvikvm(2069): VFY: unable to resolve new-instance 1368 (Lcom/flurry/sdk/br;) in Lcom/flurry/sdk/bq;
12-23 11:54:16.884: D/dalvikvm(2069): VFY: replacing opcode 0x22 at 0x0008
12-23 11:54:16.894: I/dalvikvm(2069): Failed resolving Lcom/flurry/sdk/bp; interface 1225 'Lcom/facebook/ads/AdListener;'
12-23 11:54:16.894: W/dalvikvm(2069): Link of class 'Lcom/flurry/sdk/bp;' failed
12-23 11:54:16.894: D/dalvikvm(2069): DexOpt: unable to opt direct call 0x28c0 at 0x0c in Lcom/flurry/sdk/bq;.a
12-23 11:54:16.944: I/dalvikvm(2069): Failed resolving Lcom/flurry/sdk/br; interface 1230 'Lcom/facebook/ads/InterstitialAdListener;'
12-23 11:54:16.994: W/dalvikvm(2069): Link of class 'Lcom/flurry/sdk/br;' failed
12-23 11:54:16.994: D/dalvikvm(2069): DexOpt: unable to opt direct call 0x28d6 at 0x0a in Lcom/flurry/sdk/bq;.a
12-23 11:54:17.024: V/WebViewChromium(2069): Binding Chromium to the main looper Looper (main, tid 1) {b3fb94a8}
12-23 11:54:17.064: I/chromium(2069): [INFO:library_loader_hooks.cc(112)] Chromium logging enabled: level = 0, default verbosity = 0
12-23 11:54:17.104: I/BrowserProcessMain(2069): Initializing chromium process, renderers=0
12-23 11:54:17.394: E/chromium(2069): [ERROR:gl_surface_egl.cc(153)] No suitable EGL configs found.
12-23 11:54:17.394: E/chromium(2069): [ERROR:gl_surface_egl.cc(620)] GLSurfaceEGL::InitializeOneOff failed.
12-23 11:54:17.394: E/chromium(2069): [ERROR:gl_surface_egl.cc(153)] No suitable EGL configs found.
12-23 11:54:17.404: E/chromium(2069): [ERROR:gl_surface_egl.cc(620)] GLSurfaceEGL::InitializeOneOff failed.
12-23 11:54:17.404: E/chromium(2069): [ERROR:gpu_info_collector.cc(86)] gfx::GLSurface::InitializeOneOff() failed
12-23 11:54:17.474: W/FlurryAgent(2069): Flurry session started for context:XXX.activity.BaseActivity#b3ff2710
12-23 11:54:17.484: W/chromium(2069): [WARNING:proxy_service.cc(888)] PAC support disabled because there is no system implementation
12-23 11:54:38.524: W/FlurryAgent(2069): **Analytics report sent.**
12-23 11:54:40.764: E/FlurryAgent(2069): Ad server responded with the following error(s):
12-23 11:54:40.764: E/FlurryAgent(2069): **Unknown Api Key**
Unfortunately, Ad Test Mode is currently having issues and only works with Gemini Video ads at this time. At this point we do not believe the issue is with your integration. The error just means that the ad is unfilled, and we expect the fill rate to improve going forward.
Not sure, but haven't improved since this mail for me.
The log is very clear: you have not provided the API key corresponding to your app. You can found it on dev.flurry.com

Categories

Resources