InApp Billing: Caller uid is different - android

I'm trying to implement InApp billing. When I open the Play Store on my HTC Desire running (custom rom, rooted) GB, I get a message "An error occured, please try again". In the logcat, it says this:
08-04 19:58:59.920: I/ActivityManager(178): Starting: Intent { act=android.intent.action.VIEW cmp=com.android.vending/com.google.android.finsky.activities.IabActivity (has extras) } from pid -1
08-04 19:58:59.940: I/dalvikvm(1274): Could not find method android.accounts.AccountManager.newChooseAccountIntent, referenced from method com.google.android.finsky.activities.AuthenticatedActivity.chooseAccount
08-04 19:58:59.940: W/dalvikvm(1274): VFY: unable to resolve static method 7: Landroid/accounts/AccountManager;.newChooseAccountIntent (Landroid/accounts/Account;Ljava/util/ArrayList;[Ljava/lang/String;ZLjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent;
08-04 19:58:59.940: D/dalvikvm(1274): VFY: replacing opcode 0x77 at 0x0021
08-04 19:58:59.940: D/dalvikvm(1274): VFY: dead code 0x0024-0029 in Lcom/google/android/finsky/activities/AuthenticatedActivity;.chooseAccount (Z)V
08-04 19:58:59.950: I/dalvikvm(1274): Could not find method com.google.android.finsky.activities.AuthenticatedActivity.recreate, referenced from method com.google.android.finsky.activities.AuthenticatedActivity.restart
08-04 19:58:59.950: W/dalvikvm(1274): VFY: unable to resolve virtual method 2843: Lcom/google/android/finsky/activities/AuthenticatedActivity;.recreate ()V
08-04 19:58:59.950: D/dalvikvm(1274): VFY: replacing opcode 0x6e at 0x0009
08-04 19:59:00.090: D/ResourceType(1274): calling getConfigurations
08-04 19:59:00.090: D/ResourceType(1274): called getConfigurations size=321
08-04 19:59:00.251: I/ActivityManager(178): Displayed com.android.vending/com.google.android.finsky.activities.IabActivity: +318ms
08-04 19:59:00.271: D/Finsky(1274): [1] DownloadImpl.setState: self-update-download from null to UNQUEUED.
08-04 19:59:00.271: D/Finsky(1274): [1] DownloadQueueImpl.add: Download self-update-download added to DownloadQueue
08-04 19:59:00.281: D/Finsky(1274): [1] DownloadImpl.setState: self-update-download from UNQUEUED to QUEUED.
08-04 19:59:00.341: I/installd(136): free_cache(0) avail 249487360
08-04 19:59:00.421: D/dalvikvm(1274): GC_CONCURRENT freed 909K, 50% free 3393K/6727K, external 2025K/2118K, paused 4ms+3ms
08-04 19:59:00.531: D/Finsky(1274): [1] DownloadQueueImpl.startDownload: Download self-update-download starting
08-04 19:59:00.651: D/Finsky(1274): [1] GetBillingCountriesAction.run: Skip getting fresh list of billing countries.
08-04 19:59:00.651: D/Finsky(1274): [1] DownloadImpl.setState: self-update-download from QUEUED to DOWNLOADING.
08-04 19:59:00.651: D/Finsky(1274): [1] DownloadQueueImpl.notifyProgress: self-update-download: onProgress 0/-1 Status: 190.
08-04 19:59:00.681: D/Finsky(1274): [1] DownloadQueueImpl.onStart: self-update-download: onStart
08-04 19:59:00.691: W/Finsky(1274): [1] CarrierParamsAction.run: Saving carrier billing params failed.
08-04 19:59:00.701: D/Finsky(1274): [1] CarrierProvisioningAction.shouldFetchProvisioning: Required CarrierBillingParams missing. Shouldn't fetch provisioning.
08-04 19:59:00.711: D/Finsky(1274): [1] CarrierProvisioningAction.run: No need to fetch provisioning from carrier.
08-04 19:59:00.721: W/AccountManagerService(178): caller uid 10005 is different than the authenticator's uid
08-04 19:59:00.721: E/Volley(1274): [32] 1.run: Caught SecurityException: caller uid 10005 is different than the authenticator's uid
08-04 19:59:00.771: D/Finsky(1274): [1] CheckoutPurchase.onErrorReceived: Could not retrieve Checkout auth token: caller uid 10005 is different than the authenticator's uid
08-04 19:59:00.771: E/Finsky(1274): [1] CheckoutPurchase.setError: type=UNKNOWN, code=-1, message=An error occurred. Please try again.
08-04 19:59:00.861: D/Finsky(1274): [1] MarketBillingService.sendResponseCode: Sending response RESULT_DEVELOPER_ERROR for request 8575012147884887212 to com.haarman.inapptest.
08-04 19:59:00.901: D/Finsky(1274): [1] DownloadQueueImpl.notifyProgress: self-update-download: onProgress 0/-1 Status: 192.
On my Asus TF101 running (custom rom, rooted) ICS, it does work.
On an HTC One V running stock ICS, it does work.
On an HTC Legend running (custom rom, rooted) GB, it does work.
So only on my HTC Desire it doesn't, work, which, frankly, is my main device. I've tried to reset the device to factory defaults, but that didn't help.
What's happening here?

Apparently, the Play Store on my Desire didn't update automatically. It was running 3.5.x, I had to manually push 3.5.17 for it to work.

Related

Cannot install multiple Android apps (different package names) on the same device

I've build 2 different APK files of my app with 2 different package names com.xxx.digital (Production version) and com.xxx.digital.staging (Staging/ test version)
Once I've installed one of the 2 APK, installation of the other fails.
What's wrong?
build.gradle:
productFlavors {
staging {
applicationIdSuffix ".staging"
resValue "string", "app_name", "Staging"
}
production {
resValue "string", "app_name", "My App"
}
}
I installed com.xxx.digital.staging first, when trying to install com.xxx.digital on the same device:
01-05 17:26:24.038 I/Timeline: Timeline: Activity_launch_request id:com.google.android.packageinstaller time:194533616
--------- beginning of system
01-05 17:26:24.041 I/ActivityManager: START u0 {dat=file:///data/user/0/io.crash.air/files/com.xxx.digital_350c86df94f9416190d72a69f606a36d.apk cmp=com.google.android.packageinstaller/com.android.packageinstaller.InstallAppProgress (has extras)} from uid 10043 on display 0
01-05 17:26:24.132 I/ActivityManager: Start proc 22726:com.android.defcontainer/u0a33 for service com.android.defcontainer/.DefaultContainerService
01-05 17:26:24.205 I/ActivityManager: Displayed com.google.android.packageinstaller/com.android.packageinstaller.InstallAppProgress: +144ms
01-05 17:26:24.212 E/NativeLibraryHelper: Failed to load assets verifier: 0
01-05 17:26:24.225 D/OpenGLRenderer: endAllActiveAnimators on 0x7f95f35400 (RippleDrawable) with handle 0x7f914aa4e0
01-05 17:26:24.232 I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy#8f234c0 time:194533809
01-05 17:26:24.260 I/Finsky: [1] com.google.android.vending.verifier.PackageVerificationReceiver.onReceive(41): Verification requested, id = 34
01-05 17:26:24.337 W/SurfaceFlinger: couldn't log to binary event log: overflow.
01-05 17:26:24.392 I/Timeline: Timeline: Activity_windows_visible id: ActivityRecord{ca91c0e u0 com.google.android.packageinstaller/com.android.packageinstaller.InstallAppProgress t658} time:194533969
01-05 17:26:30.325 I/Finsky: [44062] com.google.android.finsky.services.ForegroundCoordinator.a(104): Task 7 requested foreground
01-05 17:26:30.328 I/Finsky: [44062] com.google.android.finsky.services.ForegroundCoordinator.a(116): Not entering foreground
01-05 17:26:31.977 I/Finsky: [1] com.google.android.vending.verifier.ar.a_(1793): Verification id=34 response=0
01-05 17:26:31.987 I/Finsky: [1] com.google.android.vending.verifier.ak.c(195): Verification complete: id=34, package_name=com.xxx.digital
01-05 17:26:31.988 I/Finsky: [1] com.google.android.vending.verifier.ak.g(17021): Verifying id=34, result=1
01-05 17:26:32.008 D/DefContainer: Copying /data/user/0/io.crash.air/files/com.xxx.digital_350c86df94f9416190d72a69f606a36d.apk to base.apk
01-05 17:26:32.607 E/NativeLibraryHelper: Failed to load assets verifier: 0
01-05 17:26:37.744 I/MSM-irqbalance: Decided to move IRQ215 from CPU3 to CPU2
01-05 17:26:37.944 I/art: Background sticky concurrent mark sweep GC freed 181035(9MB) AllocSpace objects, 29(4MB) LOS objects, 18% free, 56MB/69MB, paused 4.073ms total 129.503ms
01-05 17:26:38.023 E/NativeLibraryHelper: Failed to load assets verifier: 0
01-05 17:26:38.119 I/PackageManager.DexOptimizer: Running dexopt (dex2oat) on: /data/app/vmdl1217860958.tmp/base.apk pkg=com.xxx.digital isa=arm64 vmSafeMode=false debuggable=false oatDir = /data/app/vmdl1217860958.tmp/oat bootComplete=true
01-05 17:26:38.118 I/kworker/u16:0: type=1400 audit(0.0:140340): avc: denied { dac_override } for capability=1 scontext=u:r:kernel:s0 tcontext=u:r:kernel:s0 tclass=capability permissive=1
01-05 17:26:38.346 I/dex2oat: Starting dex2oat.
01-05 17:26:41.844 W/dex2oat: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
01-05 17:26:41.974 W/dex2oat: Before Android 4.1, method int android.support.v7.widget.ListViewCompat.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
01-05 17:26:42.736 I/MSM-irqbalance: Decided to move IRQ304 from CPU3 to CPU2
01-05 17:26:47.750 I/MSM-irqbalance: Decided to move IRQ224 from CPU3 to CPU2
01-05 17:26:47.809 I/dex2oat: Skipping compilation of void com.fasterxml.jackson.core.json.UTF8StreamJsonParser._skipString(): it contains a non natural loop
01-05 17:26:48.588 I/ActivityManager: Process com.google.android.googlequicksearchbox:search (pid 19656) has died
01-05 17:26:48.646 I/ActivityManager: Process eu.chainfire.supersu (pid 19185) has died
01-05 17:26:48.695 I/ActivityManager: Process com.instagram.android (pid 22053) has died
01-05 17:26:48.762 I/ActivityManager: Process android.process.acore (pid 20841) has died
01-05 17:26:50.121 W/dex2oat: Compilation of void com.google.android.youtube.player.internal.x.a(java.util.Map, java.lang.String) took 133.910ms
01-05 17:26:51.284 W/dex2oat: Compilation of void com.google.zxing.oned.EANManufacturerOrgSupport.initIfNeeded() took 102.399ms
01-05 17:26:51.380 I/dex2oat: Skipping compilation of boolean com.loopj.android.http.Base64$Encoder.process(byte[], int, int, boolean): it contains a non natural loop
01-05 17:26:51.980 W/dex2oat: No verified method for method calling String.<init>: void android.provider.SearchRecentSuggestions.<init>(android.content.Context, java.lang.String, int)
01-05 17:26:52.591 I/dex2oat: Skipping compilation of boolean cz.msebera.android.httpclient.extras.Base64$Encoder.process(byte[], int, int, boolean): it contains a non natural loop
01-05 17:26:52.736 I/MSM-irqbalance: Decided to move IRQ57 from CPU3 to CPU1
01-05 17:26:53.812 W/dex2oat: No verified method for method calling String.<init>: java.lang.String java.io.ByteArrayOutputStream.toString()
01-05 17:26:56.126 I/dex2oat: dex2oat took 17.849s (threads: 8) arena alloc=2MB java alloc=23MB native alloc=61MB free=4MB
01-05 17:26:56.259 E/installd: Couldn't opendir /data/data/com.xxx.digital: No such file or directory
01-05 17:26:56.282 W/PackageManager: Package couldn't be installed in /data/app/com.xxx.digital-1
com.android.server.pm.PackageManagerException: Can't install because provider name .db.MySuggestionProvider (in package com.xxx.digital) is already used by com.xxx.digital.staging
at com.android.server.pm.PackageManagerService.scanPackageDirtyLI(PackageManagerService.java:7094)
at com.android.server.pm.PackageManagerService.scanPackageLI(PackageManagerService.java:6769)
at com.android.server.pm.PackageManagerService.installNewPackageLI(PackageManagerService.java:12135)
at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:12916)
at com.android.server.pm.PackageManagerService.access$3300(PackageManagerService.java:297)
at com.android.server.pm.PackageManagerService$9.run(PackageManagerService.java:10496)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:234)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
Manifest.xml:
<application>
<provider
android:name=".db.MySuggestionProvider"
android:authorities=".db.MySuggestionProvider"/>
</application>
MySuggestionProvider:
public class MySuggestionProvider extends SearchRecentSuggestionsProvider {
public final static String AUTHORITY = "MySuggestionProvider";
public final static int MODE = DATABASE_MODE_QUERIES;
public MySuggestionProvider() {
setupSuggestions(AUTHORITY, MODE);
}
}
A content URI is a URI that identifies data in a provider source:google.deveoper.com
You are trying to build two different APK's with the same CONTENT AUTHORITY in Content Provider.
The solution I would suggest is to use BuildConfig.APPLICATION_ID as AUTHORITY, that is going to be different in all the various flavours.
MySuggestionProvider
public class MySuggestionProvider extends SearchRecentSuggestionsProvider {
public final static String AUTHORITY =BuildConfig.APPLICATION_ID;
public final static int MODE = DATABASE_MODE_QUERIES;
public MySuggestionProvider() {
setupSuggestions(AUTHORITY, MODE);
}
}
It looks like you are using different package names for the app but the content providers have still the same packgage name. Thats not allowed.

NullPointer exception when resuming app on android

I am currently testing an app. This is the test case. Load the app and then go to google leader board. Then press home button and do some other tasks. Then come back to the app again by clicking on the app icon. When I do this I still see the previously loaded leaderboard. Afterwards if I click back button on the leaderboard to resume the app following exception occurs.
I have also listed the logcat output. I can't debug this to see whats null because dubug has been detached before this event. What can I do to solve this?
ava.lang.RuntimeException: Unable to start activity ComponentInfo{XXX: java.lang.NullPointerException
11-03 16:30:04.877: E/AndroidRuntime(619): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
u=0} from pid 13361
11-09 22:51:02.015 3677-3677/? D/ChimeraCfgMgr﹕ Loading module com.google.android.gms.games from APK com.google.android.play.games
11-09 22:51:02.019 3677-3677/? D/ChimeraModuleLdr﹕ Module APK com.google.android.play.games already loaded
11-09 22:51:02.105 3677-13641/? V/BaseAuthAsyncOperation﹕ All scopes had been granted in the past, skip access token fetching
11-09 22:51:02.160 3677-13641/? V/BaseAuthAsyncOperation﹕ access token request successful
11-09 22:51:02.187 249-283/? I/ActivityManager﹕ Displayed invalid entry.
11-09 22:51:09.750 249-943/? I/WindowState﹕ WIN DEATH: Window{41fda2b8 com.champ/com.champ.controllers.MainActivity paused=false}
11-09 22:51:09.750 249-494/? I/ActivityManager﹕ Process com.champ (pid 13361) has died.
11-09 22:51:13.836 3677-3677/? D/ChimeraCfgMgr﹕ Loading module com.google.android.gms.games from APK com.google.android.play.games
11-09 22:51:13.836 3677-3677/? D/ChimeraModuleLdr﹕ Module APK com.google.android.play.games already loaded
11-09 22:51:14.773 456-456/? D/dalvikvm﹕ WAIT_FOR_CONCURRENT_GC blocked 0ms
11-09 22:51:21.773 249-943/? D/dalvikvm﹕ GC_FOR_ALLOC freed 1448K, 17% free 19437K/23303K, paused 82ms, total 91ms
11-09 22:51:21.804 13789-13789/? D/dalvikvm﹕ Late-enabling CheckJNI
11-09 22:51:21.816 249-953/? I/ActivityManager﹕ Start proc com.champ for activity com.champ/.controllers.MainActivity: pid=13789 uid=10063 gids={1015, 1028, 3003}
11-09 22:51:25.586 249-835/? I/ActivityManager﹕ Process com.champ (pid 13789) has died.
11-09 22:51:25.590 249-835/? W/ActivityManager﹕ Force removing ActivityRecord{415b2150 com.champ/.controllers.ErrorActivity}: app died, no saved state
11-09 22:51:25.617 13857-13857/? D/dalvikvm﹕ Late-enabling CheckJNI
11-09 22:51:25.621 249-835/? I/ActivityManager﹕ Start proc com.champ for activity com.champ/.controllers.MainActivity: pid=13857 uid=10063 gids={1015, 1028, 3003}
11-09 22:51:25.687 249-953/? W/InputMethodManagerService﹕ Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#41db2610 attribute=null
Use try catch to get more info.
Did You save some Data in Application or Static Utils?
Because the page before You leader board is kill by System. When you back from Leader board,System rebuild it.
But some data become null.
In this case , you may use some data is null.
Simplely:
Add a check before you get data from Util.
public getA(){
if(a = null){a = b;}
return a;
}

Facebook app crashes on Android Genymotion Emulator?

The Facebook app (and Messenger) app crashes on Android Genymotion Emulator on OS X v10.10.3. Other apps that I have installed till now, run flawlessly without any error. Here is the logcat generated when the app starts (& crashes),
03-14 21:20:25.351 516-721/system_process I/ActivityManager﹕ START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.facebook.katana cmp=com.facebook.katana/.LoginActivity} from pid 1752
03-14 21:20:25.591 516-674/system_process I/ActivityManager﹕ Start proc com.facebook.katana:nodex for activity com.facebook.katana/.LoginActivity: pid=3031 uid=10078 gids={50078, 1028, 1015, 3003}
03-14 21:20:25.647 3031-3031/? E/dalvikvm﹕ Could not find class 'com.facebook.katana.app.WallpaperFacebookApplicationImpl', referenced from method com.facebook.katana.app.FacebookApplication.a
03-14 21:20:25.659 3031-3031/? D/CatchMeIfYouCan﹕ Process (nodex) ca: '/data/data/com.facebook.katana/app_cmiyc/902B45094161489D3AB6470A02B22D0D4A228C3001'
03-14 21:20:25.659 3031-3031/? D/CatchMeIfYouCan﹕ Process (nodex) fc: '/data/data/com.facebook.katana/app_cmiyc/902B45094161489D3AB6470A02B22D0D4A228C3002'
03-14 21:20:25.659 3031-3031/? D/ACRA﹕ ACRA is enabled for com.facebook.katana, intializing...
03-14 21:20:25.663 3031-3031/? D/ACRA﹕ Looking for error files in /data/data/com.facebook.katana/app_acra-reports
03-14 21:20:25.663 3031-3031/? D/ACRA﹕ Looking for error files in /data/data/com.facebook.katana/app_minidumps
03-14 21:20:25.667 3031-3031/? D/dalvikvm﹕ Trying to load lib /data/app-lib/com.facebook.katana-2/libgnustl_shared.so 0xa50c1508
03-14 21:20:25.807 144-144/? I/DEBUG﹕ pid: 3031, tid: 3031, name: ok.katana:nodex >>> com.facebook.katana:nodex <<<
03-14 21:20:26.075 516-3049/system_process W/ActivityManager﹕ Force finishing activity com.facebook.katana/.LoginActivity
03-14 21:20:26.611 516-726/system_process I/ActivityManager﹕ Process com.facebook.katana:nodex (pid 3031) has died.
The specific error is,
21:20:25.647 3031-3031/? E/dalvikvm﹕ Could not find class 'com.facebook.katana.app.WallpaperFacebookApplicationImpl', referenced from method com.facebook.katana.app.FacebookApplication.a
Has anybody fixed the problem?
As far right now, I am using the Google 4.3 in the Virtual Machine, and Facebook app (& messenger) work fine. I will wait the bug to be fixed.

Why debug window is empty in Eclipse running an Android app?

Why is the debug window empty debugging an Android app that does not include a MAIN and LAUNCH activity, but only a receiver? Is it normal or there is something wrong?
When I launch the app in debug mode this is the LogCat:
10-24 13:02:52.998: D/AndroidRuntime(5782): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
10-24 13:02:52.998: D/AndroidRuntime(5782): CheckJNI is ON
10-24 13:02:53.108: D/dalvikvm(5782): Trying to load lib libjavacore.so 0x0
10-24 13:02:53.118: D/dalvikvm(5782): Added shared lib libjavacore.so 0x0
10-24 13:02:53.159: D/dalvikvm(5782): Trying to load lib libnativehelper.so 0x0
10-24 13:02:53.168: D/dalvikvm(5782): Added shared lib libnativehelper.so 0x0
10-24 13:02:54.324: D/AndroidRuntime(5782): Calling main entry com.android.commands.pm.Pm
10-24 13:02:54.398: D/AndroidRuntime(5782): Shutting down VM
10-24 13:02:54.418: D/dalvikvm(5782): GC_CONCURRENT freed 102K, 78% free 466K/2048K, paused 1ms+3ms, total 22ms
10-24 13:02:54.448: D/dalvikvm(5782): Debugger has detached; object registry had 1 entries
10-24 13:04:07.651: E/ThrottleService(159): problem during onPollAlarm: java.lang.IllegalStateException: problem parsing stats: java.io.FileNotFoundException: /proc/net/xt_qtaguid/iface_stat_all: open failed: ENOENT (No such file or directory)
10-24 13:05:07.188: E/MP3Extractor(39): Unable to resync. Signalling end of stream.
10-24 13:05:08.118: I/AudioService(159): AudioFocus abandonAudioFocus() from android.media.AudioManager#412af538
10-24 13:06:00.370: D/dalvikvm(220): GC_CONCURRENT freed 386K, 57% free 9099K/20743K, paused 74ms+10ms, total 195ms
This is the Console window
[2012-10-24 15:02:53 - SMSApp] ------------------------------
[2012-10-24 15:02:53 - SMSApp] Android Launch!
[2012-10-24 15:02:53 - SMSApp] adb is running normally.
[2012-10-24 15:02:53 - SMSApp] No Launcher activity found!
[2012-10-24 15:02:53 - SMSApp] The launch will only sync the application package on the device!
[2012-10-24 15:02:53 - SMSApp] Performing sync
[2012-10-24 15:02:53 - SMSApp] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'NFC-Smartphone-1'
[2012-10-24 15:02:55 - SMSApp] Application already deployed. No need to reinstall.
[2012-10-24 15:02:55 - SMSApp] \SMSApp\bin\SMSApp.apk installed on device
[2012-10-24 15:02:55 - SMSApp] Done!
As you can see the application was already installed on the emulator, but the same issue is present when the application is installed for the first time.
Let me know whether it is useful to see also the code.
I tried with a slightly different version of the same app just to force Eclipse to reinstall the app in the emulator (added a space). This is the LogCat of the reinstallation:
10-25 12:43:14.628: D/AndroidRuntime(701): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
10-25 12:43:14.628: D/AndroidRuntime(701): CheckJNI is ON
10-25 12:43:14.687: D/dalvikvm(701): Trying to load lib libjavacore.so 0x0
10-25 12:43:14.707: D/dalvikvm(701): Added shared lib libjavacore.so 0x0
10-25 12:43:14.747: D/dalvikvm(701): Trying to load lib libnativehelper.so 0x0
10-25 12:43:14.747: D/dalvikvm(701): Added shared lib libnativehelper.so 0x0
10-25 12:43:15.647: D/AndroidRuntime(701): Calling main entry com.android.commands.pm.Pm
10-25 12:43:15.707: W/ActivityManager(148): No content provider found for permission revoke: file:///data/local/tmp/SMSApp.apk
10-25 12:43:15.737: W/ActivityManager(148): No content provider found for permission revoke: file:///data/local/tmp/SMSApp.apk
10-25 12:43:15.917: I/PackageManager(148): Removing non-system package:com.storassa.android.smsapp
10-25 12:43:15.917: I/ActivityManager(148): Force stopping package com.storassa.android.smsapp uid=10044
10-25 12:43:15.967: I/dalvikvm(148): Jit: resizing JitTable from 4096 to 8192
10-25 12:43:16.088: I/PackageManager(148): Package com.storassa.android.smsapp codePath changed from /data/app/com.storassa.android.smsapp-2.apk to /data/app/com.storassa.android.smsapp-1.apk; Retaining data and using new
10-25 12:43:16.098: I/PackageManager(148): Running dexopt on: com.storassa.android.smsapp
10-25 12:43:16.948: D/dalvikvm(715): DexOpt: load 124ms, verify+opt 526ms, 730780 bytes
10-25 12:43:16.977: I/ActivityManager(148): Force stopping package com.storassa.android.smsapp uid=10044
10-25 12:43:16.977: W/PackageManager(148): Code path for pkg : com.storassa.android.smsapp changing from /data/app/com.storassa.android.smsapp-2.apk to /data/app/com.storassa.android.smsapp-1.apk
10-25 12:43:16.977: W/PackageManager(148): Resource path for pkg : com.storassa.android.smsapp changing from /data/app/com.storassa.android.smsapp-2.apk to /data/app/com.storassa.android.smsapp-1.apk
10-25 12:43:17.067: D/PackageManager(148): New package installed in /data/app/com.storassa.android.smsapp-1.apk
10-25 12:43:17.337: D/dalvikvm(148): GC_CONCURRENT freed 664K, 8% free 11375K/12231K, paused 77ms+12ms, total 180ms
10-25 12:43:17.337: D/dalvikvm(148): WAIT_FOR_CONCURRENT_GC blocked 100ms
Another tips: no saved filters appears in LogCat.

Application stopped unexpectedly on launch - no compilation errors in Eclipse

My application for Android (API level 8+) is compiled without any error messages in Eclipse.
The console says:
[2011-08-04 16:10:50 - PROJECT_NAME] Android Launch!
[2011-08-04 16:10:50 - PROJECT_NAME] adb is running normally.
[2011-08-04 16:10:50 - PROJECT_NAME] Performing PACKAGE_NAME.MainActivity activity launch
[2011-08-04 16:10:52 - PROJECT_NAME] Uploading PROJECT_NAME.apk onto device '80A354043048365763'
[2011-08-04 16:10:52 - PROJECT_NAME] Installing PROJECT_NAME.apk...
[2011-08-04 16:10:55 - PROJECT_NAME] Success!
[2011-08-04 16:10:55 - PROJECT_NAME] Starting activity PACKAGE_NAME.MainActivity on device DEVICE_ID
[2011-08-04 16:10:56 - PROJECT_NAME] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=PACKAGE_NAME/.MainActivity }
This is what is always displayed there. The application is then started on my USB-connected Android device.
It used to work fine, until at some point in the developing process the following message appeared:.
Sorry! The application Messages (process PACKAGE_NAME) has stopped unexpectedly. Please try again. Force close.
In the background, there is the application window - but without any GUI elements: no buttons, no text. Just the application's title on the top.
I don't know why this message appears. I cannot test my application anymore. And - as I already said - there are no errors in Eclipse.
Logcat says the following:
08-04 16:35:27.666: INFO/ActivityManager(2365): Force stopping package PACKAGE_NAME uid=10077
08-04 16:35:27.676: INFO/ActivityManager(2365): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=PACKAGE_NAME/.MainActivity }
08-04 16:35:27.726: WARN/Flex(2448): getString FLEX_OPERATOR_CODE OPEN
08-04 16:35:27.766: INFO/ActivityManager(2365): Start proc PACKAGE_NAME for activity PACKAGE_NAME/.MainActivity: pid=4262 uid=10077 gids={3003}
08-04 16:35:27.916: WARN/ActivityThread(4262): Application PACKAGE_NAME is waiting for the debugger on port 8100...
08-04 16:35:27.926: INFO/System.out(4262): Sending WAIT chunk
08-04 16:35:28.016: WARN/Flex(2365): getString FLEX_COUNTRY_CODE COM
08-04 16:35:28.016: WARN/Flex(2365): getString FLEX_OPERATOR_CODE OPEN
08-04 16:35:28.016: WARN/Flex(2365): getString FLEX_COUNTRY_CODE COM
08-04 16:35:28.016: WARN/Flex(2365): getString FLEX_OPERATOR_CODE OPEN
08-04 16:35:28.016: DEBUG/StatusBarPolicy(2365): [BRIGHTHY] 0. mDataNetType: 2
08-04 16:35:28.016: DEBUG/StatusBarPolicy(2365): [BRIGHTHY] curNetwork=26203 curHPLMN=26203
08-04 16:35:28.126: INFO/System.out(4262): Debugger has connected
08-04 16:35:28.136: INFO/System.out(4262): waiting for debugger to settle...
08-04 16:35:28.336: INFO/System.out(4262): waiting for debugger to settle...
08-04 16:35:28.536: INFO/System.out(4262): waiting for debugger to settle...
08-04 16:35:28.736: INFO/System.out(4262): waiting for debugger to settle...
08-04 16:35:28.936: INFO/System.out(4262): waiting for debugger to settle...
08-04 16:35:29.141: INFO/System.out(4262): waiting for debugger to settle...
08-04 16:35:29.336: INFO/System.out(4262): waiting for debugger to settle...
08-04 16:35:29.539: INFO/System.out(4262): waiting for debugger to settle...
08-04 16:35:29.739: INFO/System.out(4262): waiting for debugger to settle...
08-04 16:35:29.945: INFO/System.out(4262): waiting for debugger to settle...
08-04 16:35:30.146: INFO/System.out(4262): debugger has settled (1340)
08-04 16:35:31.016: WARN/Flex(2365): getString FLEX_COUNTRY_CODE COM
08-04 16:35:31.016: WARN/Flex(2365): getString FLEX_OPERATOR_CODE OPEN
08-04 16:35:31.016: WARN/Flex(2365): getString FLEX_COUNTRY_CODE COM
08-04 16:35:31.016: WARN/Flex(2365): getString FLEX_OPERATOR_CODE OPEN
08-04 16:35:31.026: DEBUG/StatusBarPolicy(2365): [BRIGHTHY] 0. mDataNetType: 2
08-04 16:35:31.026: DEBUG/StatusBarPolicy(2365): [BRIGHTHY] curNetwork=26203 curHPLMN=26203
08-04 16:35:34.016: WARN/Flex(2365): getString FLEX_COUNTRY_CODE COM
08-04 16:35:34.016: WARN/Flex(2365): getString FLEX_OPERATOR_CODE OPEN
08-04 16:35:34.016: WARN/Flex(2365): getString FLEX_COUNTRY_CODE COM
08-04 16:35:34.016: WARN/Flex(2365): getString FLEX_OPERATOR_CODE OPEN
08-04 16:35:34.026: DEBUG/StatusBarPolicy(2365): [BRIGHTHY] 0. mDataNetType: 2
08-04 16:35:34.026: DEBUG/StatusBarPolicy(2365): [BRIGHTHY] curNetwork=26203 curHPLMN=26203
08-04 16:35:37.016: WARN/Flex(2365): getString FLEX_COUNTRY_CODE COM
08-04 16:35:37.016: WARN/Flex(2365): getString FLEX_OPERATOR_CODE OPEN
08-04 16:35:37.016: WARN/Flex(2365): getString FLEX_COUNTRY_CODE COM
08-04 16:35:37.016: WARN/Flex(2365): getString FLEX_OPERATOR_CODE OPEN
08-04 16:35:37.026: DEBUG/StatusBarPolicy(2365): [BRIGHTHY] 0. mDataNetType: 2
08-04 16:35:37.026: DEBUG/StatusBarPolicy(2365): [BRIGHTHY] curNetwork=26203 curHPLMN=26203
08-04 16:35:37.697: WARN/ActivityManager(2365): Launch timeout has expired, giving up wake lock!
08-04 16:35:37.894: WARN/ActivityManager(2365): Activity idle timeout for HistoryRecord{451e5930 PACKAGE_NAME/.MainActivity}
08-04 16:35:40.016: WARN/Flex(2365): getString FLEX_COUNTRY_CODE COM
08-04 16:35:40.016: WARN/Flex(2365): getString FLEX_OPERATOR_CODE OPEN
08-04 16:35:40.016: WARN/Flex(2365): getString FLEX_COUNTRY_CODE COM
08-04 16:35:40.016: WARN/Flex(2365): getString FLEX_OPERATOR_CODE OPEN
08-04 16:35:40.026: DEBUG/StatusBarPolicy(2365): [BRIGHTHY] 0. mDataNetType: 2
08-04 16:35:40.026: DEBUG/StatusBarPolicy(2365): [BRIGHTHY] curNetwork=26203 curHPLMN=26203
08-04 16:35:43.017: WARN/Flex(2365): getString FLEX_COUNTRY_CODE COM
08-04 16:35:43.017: WARN/Flex(2365): getString FLEX_OPERATOR_CODE OPEN
08-04 16:35:43.017: WARN/Flex(2365): getString FLEX_COUNTRY_CODE COM
08-04 16:35:43.017: WARN/Flex(2365): getString FLEX_OPERATOR_CODE OPEN
08-04 16:35:43.026: DEBUG/StatusBarPolicy(2365): [BRIGHTHY] 0. mDataNetType: 2
08-04 16:35:43.026: DEBUG/StatusBarPolicy(2365): [BRIGHTHY] curNetwork=26203 curHPLMN=26203
I hope somebody can help me ... :) I'm almost desperate. Thank you very much in advance!
Edit #1:
When I run the application in Eclipse's debug mode, the error message doesn't appear. The application window appears but without any GUI elements. And I have to close the window using the HOME button. The BACK button doesn't work. And in the application settings I can choose "Force Stop". So is there any problem with threads maybe? Maybe the application got stuck?
Edit #2:
It doesn't seem to be an Eclipse problem or phone problem as I am still able to create a "Hello World" app. It even runs on the phone.
Edit #3:
My main activity starts as follows:
public class MainActivity extends ListActivity {
When I change this to ...
public class MainActivity extends Activity {
... and comment out the following line, the application is shown without any error messages:
setListAdapter(this.m_adapter);
Edit #4:
I think I can remember again what I changed before the problem occurred for the first time: I implemented the code of a tutorial on ListViews which worked fine. But then I changed the ID of the listview (see tutorial: main.xml) from "android:list" to "resultList". So this was probably the cause.
When I change it back now, the error occurrs in initiateSearch() where it says thread.notifyAll();
When I comment out this line, everything works without any errors, but the application does not what it should do anymore, of course.
Having talked to Marco it turns out the error was to do with the id naming of the List element in the xml.
http://developer.android.com/reference/android/app/ListActivity.html - "...To do this, your own view MUST contain a ListView object with the id '#android:id/list' ..."
Eclipse is a bit rubbish sometimes!!
Things I would try in order:
Clean projects
Restart Eclipse
Completely remove the application and data & cache from your handset
On your phone go in to your settings-> Applications-> Development and disable then re-enable USB Debugging
Restart your phone
Rebuild your eclipse workspace
Let me know if any of those help

Categories

Resources