Cannot install apk file from Eclipse Emulator to Note II - android

I am completely new to Android and Java. I am currently taking a course that is introducing me to Android and Eclipse. I am having an issue. Once I have built my app, I can run it through the virtual app, but I cannot install it to my Galaxy Note II phone. I have debugging, mock and unknown sources allowed. Eclipse can see my phone.
Also, I am able to install the apk through explorer. I recently read that the apk should be signed as well. How do I do this and can anyone else help?
[2013-12-10 18:44:47 - Awesome2a] ------------------------------
[2013-12-10 18:44:47 - Awesome2a] Android Launch!
[2013-12-10 18:44:48 - Awesome2a] adb is running normally.
[2013-12-10 18:44:48 - Awesome2a] Performing myapp.awesome2a.MainActivity activity launch
[2013-12-10 18:44:48 - Awesome2a] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
[2013-12-10 18:45:14 - Awesome2a] Uploading Awesome2a.apk onto device '42f73302b863bf67'
[2013-12-10 18:45:15 - Awesome2a] Installing Awesome2a.apk...
[2013-12-10 18:45:16 - Awesome2a] Installation failed due to invalid APK file!
[2013-12-10 18:45:16 - Awesome2a] Please check logcat output for more details.
[2013-12-10 18:45:16 - Awesome2a] Launch canceled!
When I take a look at Logcat, I receive this information.
12-10 18:44:00.002: D/STATUSBAR-Clock(3084): onReceive() - ACTION_TIME_TICK
12-10 18:44:00.007: D/STATUSBAR-Clock(3084): onReceive() - ACTION_TIME_TICK
12-10 18:44:00.032: D/ClockAlarmWidgetService(5457): [ClockAlarmWidgetService] onReceive: action = android.intent.action.TIME_TICK
12-10 18:44:00.032: E/ClockAlarmWidget(5457): [AlarmWidgetIdManager] getListItem() : itemIndex=0, widgetID:1
12-10 18:44:00.032: E/ClockAlarmWidget(5457): [AlarmWidgetIdManager] getListItem() : ItemIndex exceed ListItemCount. itemIndex=1
12-10 18:44:00.032: E/ClockAlarmWidget(5457): [AlarmWidgetIdManager] getListItem() : itemIndex=1, widgetID:1
12-10 18:44:00.032: D/ClockAlarmWidget(5457): [ClockAlarmWidgetProvider] fillData() - itemIndex:0, listitemID: 0
12-10 18:44:00.037: D/ClockAlarmDataProvider(5457): getAlarm() - too many same ID alarm data. nCount: 0
12-10 18:44:00.042: D/ClockAlarmWidget(5457): alarmItem = null
12-10 18:44:00.042: D/ClockWidget(2408): refreshTime()
12-10 18:44:00.047: D/ClockWidget(2408): TTS Message = It is 6 : 44 PM, Tuesday, December 10
12-10 18:44:05.727: E/MtpService(3505): In MTPAPP onReceive:android.intent.action.BATTERY_CHANGED
12-10 18:44:05.727: E/MtpService(3505): battPlugged Type : 2
12-10 18:44:05.727: D/BatteryService(2408): update start
12-10 18:44:05.727: D/BatteryService(2408): level:100 scale:100 status:2 health:2 present:true voltage: 4326 temperature: 249 technology: Li-ion AC powered:false USB powered:true icon:17303211 invalid charger:0
12-10 18:44:05.727: D/STATUSBAR-BatteryController(3084): onReceive() - ACTION_BATTERY_CHANGED
12-10 18:44:05.727: D/STATUSBAR-BatteryController(3084): onReceive() - level:100
12-10 18:44:05.727: D/STATUSBAR-BatteryController(3084): onReceive() - plugged:2
12-10 18:44:05.727: D/STATUSBAR-BatteryController(3084): onReceive() - BATTERY_STATUS_CHARGING:
12-10 18:44:05.732: D/STATUSBAR-PhoneStatusBar(3084): ACTION_BATTERY_CHANGED
12-10 18:44:05.732: D/STATUSBAR-PhoneStatusBar(3084): NORMAL_BATTERY
12-10 18:44:05.737: W/AlarmManager(2408): FACTORY_ON= 0
12-10 18:44:23.687: E/Watchdog(2408): !#Sync 28
12-10 18:44:29.682: E/WifiHW(2408): ##################### set firmware type 0 #####################
12-10 18:44:29.682: D/WifiStateMachine(2408): setWifiEnabled : WifiNative.setFwType(0)
12-10 18:44:29.682: V/AlarmManager(2408): waitForAlarm result :4
12-10 18:44:29.682: V/AlarmManager(2408): trigger ELAPSED_REALTIME_WAKEUP or RTC_WAKEUP
12-10 18:44:29.682: D/WifiService(2408): startScan: false pid=3965, uid=10019
12-10 18:44:29.687: W/AlarmManager(2408): FACTORY_ON= 0
12-10 18:44:29.697: I/wpa_supplicant(3889): Scan requested (ret=0) - scan timeout 30 seconds
12-10 18:44:29.762: W/AlarmManager(2408): FACTORY_ON= 0
12-10 18:44:33.347: I/wpa_supplicant(3889): nl80211: Received scan results (9 BSSes)
12-10 18:44:33.347: D/Tethering(2408): interfaceLinkStateChanged wlan0, true
12-10 18:44:33.347: D/Tethering(2408): interfaceStatusChanged wlan0, true
12-10 18:44:33.357: W/AlarmManager(2408): FACTORY_ON= 0
12-10 18:44:33.377: D/dalvikvm(3965): GC_CONCURRENT freed 511K, 8% free 13209K/14343K, paused 1ms+1ms, total 14ms
12-10 18:44:33.377: D/dalvikvm(3965): WAIT_FOR_CONCURRENT_GC blocked 8ms
12-10 18:44:33.382: W/AlarmManager(2408): FACTORY_ON= 0
12-10 18:44:33.412: E/WifiHW(2408): ##################### set firmware type 0 #####################
12-10 18:44:33.412: D/WifiStateMachine(2408): setWifiEnabled : WifiNative.setFwType(0)
12-10 18:44:33.417: W/AlarmManager(2408): FACTORY_ON= 0
12-10 18:44:33.467: I/GCoreUlr(3965): Successfully inserted location
12-10 18:44:33.467: I/GCoreUlr(3965): Not calling LocationReportingService, hasMoved: false, elapsed millis: 780030, request: Phone
12-10 18:44:34.682: V/AlarmManager(2408): waitForAlarm result :4
12-10 18:44:41.742: D/BatteryService(2408): update start
12-10 18:44:41.747: E/MtpService(3505): In MTPAPP onReceive:android.intent.action.BATTERY_CHANGED
12-10 18:44:41.747: E/MtpService(3505): battPlugged Type : 2
12-10 18:44:41.747: D/BatteryService(2408): level:100 scale:100 status:2 health:2 present:true voltage: 4326 temperature: 242 technology: Li-ion AC powered:false USB powered:true icon:17303211 invalid charger:0
12-10 18:44:41.747: D/STATUSBAR-BatteryController(3084): onReceive() - ACTION_BATTERY_CHANGED
12-10 18:44:41.747: D/STATUSBAR-BatteryController(3084): onReceive() - level:100
12-10 18:44:41.747: D/STATUSBAR-BatteryController(3084): onReceive() - plugged:2
12-10 18:44:41.747: D/STATUSBAR-BatteryController(3084): onReceive() - BATTERY_STATUS_CHARGING:
12-10 18:44:41.762: W/AlarmManager(2408): FACTORY_ON= 0
12-10 18:44:41.762: D/STATUSBAR-PhoneStatusBar(3084): ACTION_BATTERY_CHANGED
12-10 18:44:41.762: D/STATUSBAR-PhoneStatusBar(3084): NORMAL_BATTERY
12-10 18:44:41.777: D/dalvikvm(3965): GC_CONCURRENT freed 396K, 8% free 13201K/14343K, paused 12ms+1ms, total 27ms
12-10 18:44:53.687: E/Watchdog(2408): !#Sync 29
12-10 18:44:59.997: V/AlarmManager(2408): waitForAlarm result :8
12-10 18:44:59.997: V/AlarmManager(2408): ClockReceiver onReceive() ACTION_TIME_TICK
12-10 18:44:59.997: W/AlarmManager(2408): FACTORY_ON= 0
I have absolutely no clue. Can you help.

Hmm, I would suspect that there is something wrong with the project settings or androidmanifest.xml file. In Eclipse's top bar, can you go to Run > Run Configurations, flip over to the "Target" tab and select "Always prompt to pick device" for your current configuration? Just to make sure it's being deployed to the right device. Presuming that doesn't fix it, could you post the android manifest? Also, are you using any libraries or do you have any external dependencies?

Usualy if you go to
Project > Unset build automatically
and then,
Proyect > clean
and then, in project explorer:
right click on project name > refresh
and then,
Proyect > build project
Then uninstall from the device any version of the app that you could have, and try to install it again.

Related

Getting Error "App Not Installed", after upgrading the android platform

I am getting error "App Not Installed" after android platform updated from 7.1 to 8.0
Plese find the logs for the same below
2019-07-06 19:57:24.583 1553-1740/? W/PackageManager: Package com.xxx.projectname new target SDK 19 doesn't support runtime permissions but the old target SDK 26 does.
2019-07-06 19:57:24.587 977-1852/? E/installd: Failed to delete /data/app/vmdl102287624.tmp: No such file or directory
2019-07-06 19:57:24.591 1553-1665/? D/CompatibilityInfo: mCompatibilityFlags - 0
2019-07-06 19:57:24.591 1553-1665/? D/CompatibilityInfo: applicationDensity - 480
2019-07-06 19:57:24.591 1553-1665/? D/CompatibilityInfo: applicationScale - 1.0
2019-07-06 19:57:24.593 1553-2694/? I/ActivityManager: START u0 {dat=file:///data/user_de/0/com.google.android.packageinstaller/no_backup/package3167777381408856548.apk flg=0x2000000 cmp=com.google.android.packageinstaller/com.android.packageinstaller.InstallFailed (has extras)} from uid 10035
2019-07-06 19:57:24.597 1553-2694/? D/ActivityTrigger: activityStartTrigger: Activity is Triggerred in full screen ApplicationInfo{82c36ee com.google.android.packageinstaller}
2019-07-06 19:57:24.597 1553-2694/? E/ActivityTrigger: activityStartTrigger: not whiteListedcom.google.android.packageinstaller/com.android.packageinstaller.InstallFailed/28

R error Android Studio when rebuilding project

I was having an issue with the R symbol in my Android app (it was imported as import com.myName.runmate.R; When I removed this lined, I resynched with Gradle and rebuilt the project but I got the following in Messages Gradle Build - Error:(73, 44) error: package R does not exist
The logcat output:
09-19 13:21:01.969 746-821/? I/PowerManagerService﹕ Going to sleep due to screen timeout (uid 1000)...
09-19 13:21:01.970 746-821/? I/PowerManagerService﹕ Sleeping (uid 1000)...
09-19 13:21:02.078 909-909/? D/PhoneStatusBar﹕ disable: < expand ICONS alerts SYSTEM_INFO back HOME RECENT clock SEARCH >
09-19 13:21:02.104 188-856/? D/audio_hw_primary﹕ adev_set_parameters: enter: screen_state=off
09-19 13:21:02.127 746-842/? E/WifiStateMachine﹕ cancelDelayedScan -> 2163
09-19 13:21:02.128 746-842/? E/native﹕ do suspend true
09-19 13:21:02.529 746-819/? I/DisplayManagerService﹕ Display device changed: DisplayDeviceInfo{"Built-in Screen": uniqueId="local:0", 1080 x 1920, 60.0 fps, supportedRefreshRates [60.0], density 480, 442.451 x 443.345 dpi, appVsyncOff 7500000, presDeadline 12666667, touch INTERNAL, rotation 0, type BUILT_IN, state OFF, FLAG_DEFAULT_DISPLAY, FLAG_ROTATES_WITH_CONTENT, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS}
09-19 13:21:02.529 175-175/? D/SurfaceFlinger﹕ Set power mode=0, type=0 flinger=0xb6482000
09-19 13:21:02.529 175-175/? D/qdhwcomposer﹕ hwc_blank: Blanking display: 0
09-19 13:21:02.530 746-746/? V/ActivityManager﹕ Display changed displayId=0
09-19 13:21:02.813 175-175/? D/qdhwcomposer﹕ hwc_blank: Done blanking display: 0
09-19 13:21:02.813 746-867/? D/SurfaceControl﹕ Excessive delay in setPowerMode(): 284ms
09-19 13:21:02.813 2046-2050/? E/ANDR-PERF-LOCK﹕ Failed to apply optimization for resource: 4 level: 0
09-19 13:21:28.638 746-746/? I/EntropyMixer﹕ Writing entropy...
09-19 13:21:28.640 746-821/? I/PowerManagerService﹕ Waking up from sleep (uid 1000)...
09-19 13:21:28.640 746-821/? I/DisplayPowerController﹕ Blocking screen on until initial contents have been drawn.
09-19 13:21:28.667 1086-1086/? I/PowerConnectionBroadcastReceiver﹕ onReceive() : Device plugged in.
09-19 13:21:28.667 1086-1086/? I/StatsUtilsManager﹕ startPeriodStatsRecorder() : Success
09-19 13:21:28.667 1086-1086/? I/PeriodicStatsRecorder﹕ shouldRecordStats() = Too Soon
09-19 13:21:28.671 8907-8907/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid parameter app
09-19 13:21:28.671 8907-8907/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid package name : Perhaps you didn't include a PendingIntent in the extras?
09-19 13:21:28.672 9422-9422/? I/GCoreUlr﹕ Starting service, intent=Intent { act=com.google.android.location.reporting.ACTION_UPDATE_WORLD cmp=com.google.android.gms/com.google.android.location.reporting.service.DispatchingService (has extras) }, extras=Bundle[{receiverAction=android.intent.action.ACTION_POWER_CONNECTED}]
09-19 13:21:28.674 9422-9422/? I/GCoreUlr﹕ DispatchingService.onCreate()
09-19 13:21:28.678 9496-9496/? I/iu.Environment﹕ update battery state; isPlugged? true*
09-19 13:21:28.684 9496-12232/? I/iu.UploadsManager﹕ num queued entries: 0
09-19 13:21:28.686 9496-12232/? I/iu.UploadsManager﹕ num updated entries: 0
09-19 13:21:28.688 9496-12232/? I/iu.SyncManager﹕ NEXT; no task
09-19 13:21:28.697 9496-28033/? I/iu.FingerprintManager﹕ Start processing all media
09-19 13:21:28.708 9496-28033/? I/iu.FingerprintManager﹕ Start processing media store URI: content://media/external/images/media
09-19 13:21:28.719 2046-2050/? E/ANDR-PERF-LOCK﹕ Failed to reset optimization for resource: 4 level: 0
09-19 13:21:28.720 746-819/? I/DisplayManagerService﹕ Display device changed: DisplayDeviceInfo{"Built-in Screen": uniqueId="local:0", 1080 x 1920, 60.0 fps, supportedRefreshRates [60.0], density 480, 442.451 x 443.345 dpi, appVsyncOff 7500000, presDeadline 12666667, touch INTERNAL, rotation 0, type BUILT_IN, state ON, FLAG_DEFAULT_DISPLAY, FLAG_ROTATES_WITH_CONTENT, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS}
09-19 13:21:28.720 175-175/? D/SurfaceFlinger﹕ Set power mode=2, type=0 flinger=0xb6482000
09-19 13:21:28.720 175-175/? D/qdhwcomposer﹕ hwc_blank: Unblanking display: 0
09-19 13:21:28.769 9496-28033/? I/iu.FingerprintManager﹕ Start processing media store URI: content://media/external/video/media
09-19 13:21:28.775 9496-28033/? I/iu.FingerprintManager﹕ Start processing media store URI: content://media/phoneStorage/images/media
09-19 13:21:28.778 9496-28033/? I/iu.FingerprintManager﹕ Start processing media store URI: content://media/phoneStorage/video/media
09-19 13:21:28.779 9496-28033/? I/iu.FingerprintManager﹕ Finished generating fingerprints; 0.082 seconds
09-19 13:21:28.779 9496-28033/? I/iu.FingerprintManager﹕ numSeen=680 numGenerated=0 numDeleted=0 numFailed=0
09-19 13:21:28.796 746-746/? V/KeyguardServiceDelegate﹕ onScreenTurnedOn(showListener = com.android.internal.policy.impl.PhoneWindowManager$2#280fe250)
09-19 13:21:28.797 746-746/? V/ActivityManager﹕ Display changed displayId=0
09-19 13:21:28.807 27346-28044/? I/GAv4﹕ Google Analytics 7.8.95 is starting up. To enable debug logging on a device run:
adb shell setprop log.tag.GAv4 DEBUG
adb logcat -s GAv4
09-19 13:21:28.812 9422-28036/? I/GCoreUlr﹕ WorldUpdater received intent Intent { act=com.google.android.location.reporting.ACTION_UPDATE_WORLD cmp=com.google.android.gms/com.google.android.location.reporting.service.DispatchingService (has extras) } with receiverAction android.intent.action.ACTION_POWER_CONNECTED
09-19 13:21:28.823 746-1213/? V/KeyguardServiceDelegate﹕ **** SHOWN CALLED ****
09-19 13:21:28.823 746-821/? I/DisplayPowerController﹕ Unblocked screen on after 183 ms
09-19 13:21:28.829 188-188/? D/audio_hw_primary﹕ adev_set_parameters: enter: screen_state=on
09-19 13:21:28.845 746-842/? E/WifiStateMachine﹕ cancelDelayedScan -> 2164
09-19 13:21:28.846 1148-25581/? D/BrcmNfcJni﹕ RoutingManager::nfaEeCallback: NFA_EE_SET_TECH_CFG_EVT; status=0x0
09-19 13:21:28.846 1148-25581/? D/BrcmNfcJni﹕ RoutingManager::nfaEeCallback: NFA_EE_SET_PROTO_CFG_EVT; status=0x0
09-19 13:21:28.846 1148-1379/? D/BrcmNfcJni﹕ RoutingManager::commitRouting
09-19 13:21:28.846 746-842/? E/native﹕ do suspend false
09-19 13:21:28.856 27346-28044/? W/GAv4﹕ AnalyticsReceiver is not registered or is disabled. Register the receiver for reliable dispatching on non-Google Play devices. See http://goo.gl/8Rd3yj for instructions.
09-19 13:21:28.856 746-762/? W/ActivityManager﹕ getRunningAppProcesses: caller 10065 does not hold REAL_GET_TASKS; limiting output
09-19 13:21:28.865 27346-28044/? W/GAv4﹕ CampaignTrackingReceiver is not registered, not exported or is disabled. Installation campaign tracking is not possible. See http://goo.gl/8Rd3yj for instructions.
09-19 13:21:28.868 1148-25581/? D/BrcmNfcJni﹕ RoutingManager::nfaEeCallback: NFA_EE_UPDATED_EVT
09-19 13:21:28.871 27346-28055/? W/GAv4﹕ AnalyticsService not registered in the app manifest. Hits might not be delivered reliably. See http://goo.gl/8Rd3yj for instructions.
09-19 13:21:28.906 746-761/? I/art﹕ Explicit concurrent mark sweep GC freed 28154(1676KB) AllocSpace objects, 2(73KB) LOS objects, 30% free, 36MB/52MB, paused 1.413ms total 89.320ms
09-19 13:21:28.919 746-1252/? I/ActivityManager﹕ Start proc 28057:com.estrongs.android.pop/u0a144 for broadcast com.estrongs.android.pop/.app.StartServiceReceiver
09-19 13:21:28.951 28057-28057/? E/ObjectHelper﹕ Can't find method:setCompatibilityInfo
09-19 13:21:28.959 175-175/? D/qdhwcomposer﹕ hwc_blank: Done unblanking display: 0
09-19 13:21:28.959 746-867/? D/SurfaceControl﹕ Excessive delay in setPowerMode(): 239ms
09-19 13:21:28.976 28057-28077/? D/an﹕ Refresh storage info done.21
09-19 13:21:28.982 9422-28036/? I/GCoreUlr﹕ WorldUpdater:android.intent.action.ACTION_POWER_CONNECTED: Ensuring that reporting is stopped because of reasons: {account#-19#=[InactiveReason{mVersionCode=0, mIdentifier=6, mName='ReportingNotEnabled'}]}
09-19 13:21:28.985 9422-28036/? I/GCoreUlr﹕ Unbound from all location providers
09-19 13:21:28.996 9422-9422/? I/GCoreUlr﹕ DispatchingService.onDestroy()
09-19 13:21:28.996 9422-9422/? I/GCoreUlr﹕ Stopping handler for UlrDispSvcFast
09-19 13:21:28.999 9422-9422/? I/GCoreUlr﹕ Unbound from all location providers
09-19 13:21:29.038 28057-28079/? W/ResourceType﹕ No package identifier when getting value for resource number 0x00000000
09-19 13:21:29.453 746-17030/? D/AlarmManagerService﹕ Kernel timezone updated to -60 minutes west of GMT
09-19 13:21:29.460 27491-27491/? D/CellBroadcastReceiver﹕ onReceive Intent { act=android.intent.action.SERVICE_STATE flg=0x10 cmp=com.android.cellbroadcastreceiver/.CellBroadcastReceiver (has extras) }
09-19 13:21:29.460 27491-27491/? D/CellBroadcastReceiver﹕ Intent ACTION_SERVICE_STATE_CHANGED
09-19 13:21:29.460 27491-27491/? D/CellBroadcastReceiver﹕ Service state changed! 0 Full: 0 0 voice home data home O2 - UK O2 - UK 23410 O2 - UK O2 - UK 23410 UMTS HSPAP CSS not supported -1 -1 RoamInd=-1 DefRoamInd=-1 EmergOnly=false Current state=-1
09-19 13:21:29.464 746-844/? D/ConnectivityService﹕ rematching NetworkAgentInfo [MOBILE (HSPA) - 127]
09-19 13:21:29.464 746-844/? D/ConnectivityService﹕ Network NetworkAgentInfo [MOBILE (HSPA) - 127] was already satisfying request 1. No change.
09-19 13:21:29.464 746-844/? D/ConnectivityService﹕ notifyType AVAILABLE for NetworkAgentInfo [MOBILE (HSPA) - 127]
09-19 13:21:29.465 746-844/? D/ConnectivityService﹕ notifyType CAP_CHANGED for NetworkAgentInfo [MOBILE (HSPA) - 127]
09-19 13:21:29.466 746-844/? D/ConnectivityService﹕ Setting tx/rx TCP buffers to 122334,734003,2202010,32040,192239,576717
09-19 13:21:29.468 9496-27601/? D/ConnectivityManager.CallbackHandler﹕ CM callback handler got msg 524290
09-19 13:21:29.469 909-1321/? D/ConnectivityManager.CallbackHandler﹕ CM callback handler got msg 524290
09-19 13:21:29.470 909-1321/? D/ConnectivityManager.CallbackHandler﹕ CM callback handler got msg 524294
09-19 13:21:29.470 9496-27601/? D/ConnectivityManager.CallbackHandler﹕ CM callback handler got msg 524294
09-19 13:21:29.472 746-746/? I/ValidateNoPeople﹕ skipping global notification
09-19 13:21:29.473 746-746/? V/NotificationService﹕ pkg=android canInterrupt=false intercept=true
09-19 13:21:29.485 746-746/? I/ValidateNoPeople﹕ skipping global notification
09-19 13:21:29.485 746-746/? V/NotificationService﹕ pkg=android canInterrupt=false intercept=true
09-19 13:21:29.496 746-844/? D/ConnectivityService﹕ notifyType IP_CHANGED for NetworkAgentInfo [MOBILE (HSPA+) - 127]
09-19 13:21:29.500 909-1321/? D/ConnectivityManager.CallbackHandler﹕ CM callback handler got msg 524295
09-19 13:21:29.501 9496-27601/? D/ConnectivityManager.CallbackHandler﹕ CM callback handler got msg 524295
09-19 13:21:29.505 27491-28097/? D/CellBroadcastConfigService﹕ enabling emergency cell broadcast channels
09-19 13:21:29.510 1220-19744/? D/IccSmsInterfaceManager﹕ [IccSmsInterfaceManager] enableGsmBroadcastRange
09-19 13:21:29.510 1220-19744/? D/IccSmsInterfaceManager﹕ [IccSmsInterfaceManager] Added GSM cell broadcast subscription for MID range 4352 to 4354 from client com.android.cellbroadcastreceiver
09-19 13:21:29.510 1220-19744/? D/IccSmsInterfaceManager﹕ [IccSmsInterfaceManager] Calling setCellBroadcastActivation(true)
09-19 13:21:29.523 1220-5492/? D/IccSmsInterfaceManager﹕ [IccSmsInterfaceManager] enableGsmBroadcastRange
09-19 13:21:29.524 1220-5492/? D/IccSmsInterfaceManager﹕ [IccSmsInterfaceManager] Added GSM cell broadcast subscription for MID range 4356 to 4356 from client com.android.cellbroadcastreceiver
09-19 13:21:29.524 1220-5492/? D/IccSmsInterfaceManager﹕ [IccSmsInterfaceManager] Calling setCellBroadcastActivation(true)
09-19 13:21:29.531 1220-1241/? D/IccSmsInterfaceManager﹕ [IccSmsInterfaceManager] enableGsmBroadcastRange
09-19 13:21:29.532 1220-1241/? D/IccSmsInterfaceManager﹕ [IccSmsInterfaceManager] Added GSM cell broadcast subscription for MID range 4371 to 4372 from client com.android.cellbroadcastreceiver
09-19 13:21:29.532 1220-1241/? D/IccSmsInterfaceManager﹕ [IccSmsInterfaceManager] Calling setCellBroadcastActivation(true)
09-19 13:21:29.547 1220-5172/? D/IccSmsInterfaceManager﹕ [IccSmsInterfaceManager] enableCdmaBroadcastRange
09-19 13:21:29.547 1220-5172/? D/IccSmsInterfaceManager﹕ [IccSmsInterfaceManager] Calling setCdmaBroadcastConfig with 1 configurations
09-19 13:21:29.551 1220-5172/? D/IccSmsInterfaceManager﹕ [IccSmsInterfaceManager] Failed to add cdma broadcast subscription for MID range 4097 to 4097 from client com.android.cellbroadcastreceiver
09-19 13:21:29.560 1220-29365/? D/IccSmsInterfaceManager﹕ [IccSmsInterfaceManager] enableGsmBroadcastRange
09-19 13:21:29.560 1220-29365/? D/IccSmsInterfaceManager﹕ [IccSmsInterfaceManager] Added GSM cell broadcast subscription for MID range 4373 to 4378 from client com.android.cellbroadcastreceiver
Just comment the Lines Where your Getting Error With R in Java File
Then Build the project
It Should Rebuild the R file Again
Now Remove Your Comments and You are good to go
Can you ensure all your package names are the same:
package com.khackett.runmate;
Not adding the folder extension for each folder the files are in.
package com.khackett.runmate.adapters;
As you have declared in your manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.khackett.runmate" >

trying to run app on device

I am trying to run a simple app in my device I am using a GALAXY S5 but the app would never launch, in the Android Studio the log cat is just loading and loading like this:
-10 19:07:07.856 3006-3006/? D/STATUSBAR-IconMerger﹕ checkOverflow(576), More:false, Req:false Child:3
08-10 19:07:08.836 3006-3006/? D/STATUSBAR-NetworkController onSignalStrengthsChanged signalStrength=SignalStrength: 99 -1 -1 -1 -1 -1 -1 13 -121 -13 16 -1 2147483647 gsm|lte 0x0 level=0
08-10 19:07:09.306 912-6264/? D/SSRMv2:SIOP﹕ SIOP:: AP = 280, PST = 287, Delta = -1
08-10 19:07:09.316 912-6264/? D/AmoledAdjustTimer﹕ prevTemp = 264, currTemp = 264, prevStep = 4, currStep = 4
08-10 19:07:09.866 3006-3006/? D/STATUSBAR-NetworkController﹕ refreshSignalCluster - setNWBoosterIndicators(false)
08-10 19:07:09.866 3006-3006/? D/STATUSBAR-NetworkController﹕ refreshSignalCluster: data=0 bt=false
08-10 19:07:09.886 3006-3006/? D/STATUSBAR-IconMerger﹕ checkOverflow(576), More:false, Req:false Child:3
08-10 19:07:09.916 912-3520/? D/BatteryService﹕ level:100, scale:100, status:5, health:2, present:true, voltage: 4372, temperature: 263, technology: Li-ion, AC powered:false, USB powered:true, Wireless powered:false, icon:17303678, invalid charger:0, online:6, current avg:1000, charge type:0, power sharing:false
This is the console :
Installing com.example.juano.stiktag
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.juano.stiktag"
pkg: /data/local/tmp/com.example.juano.stiktag
Success
Launching application:com.example.juano.stiktag/com.example.juano.stiktag.LoginActivity.
DEVICE SHELL COMMAND: am start -n "com.example.juano.stiktag/com.example.juano.stiktag.LoginActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat= [android.intent.category.LAUNCHER] cmp=com.example.juano.stiktag/.LoginActivity }
java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.juano.stiktag/.LoginActivity } from null (pid=13739, uid=2000) not exported from uid 10247
at android.os.Parcel.readException(Parcel.java:1465)
at android.os.Parcel.readException(Parcel.java:1419)
at android.app.ActivityManagerProxy.startActivityAsUser(ActivityManagerNative.java:2367)
at com.android.commands.am.Am.runStart(Am.java:680)
at com.android.commands.am.Am.onRun(Am.java:270)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:76)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:301)
Sometimes it finish but still the app never launch, however in the virtual device works, I tried to follow all the steps on the android studio website enable usb debugger, please any help will be highly appreciated, Thanks!

Android app suddenly stops - in-app purchase

After I implemented in-app purchase in my android app, it suddenly stops when I close it. And Im struggling to see what the problem is in log cat. Im receiving the error
Permission Denial: get/set setting for user asks to run as user -2 but is calling from
user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
But I have received this error before, and the application still worked fine. Here is my log cat, I was uncertain for how much I needed to add so sorry if it is a lot. Please let me know if I need to add some more, thanks!
D/SSRMv2:Monitor( 2347): SIOP:: AP = 450 (read only)
I/InputReader( 2347): Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.16208 ] when=116815167044000
I/InputDispatcher( 2347): Delivering touch to: action: 0x0
I/InputReader( 2347): Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=] when=116815315918000
I/InputDispatcher( 2347): Delivering touch to: action: 0x1
D/BatteryService( 2347): update start
D/BatteryService( 2347): level:80, scale:100, status:2, health:2, present:true, voltage: 4085, temperature: 467, technology: Li-ion, AC powered:false, USB powered:true, Wireless powered:false, icon:17303550, invalid charger:0, online:4, charge type:1, current avg:460
D/SSRMv2:Monitor( 2347): SIOP:: AP = 450, Prev AP = 450, Duration = 10006
D/SSRMv2:Monitor( 2347): SIOP:: AP = 450 (read only)
I/InputReader( 2347): Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.16209 ] when=116820660525000
D/InputDispatcher( 2347): Waiting for application to become ready for input: xxxx Reason: Waiting because the touched window has not finished processing the input events that were previously delivered to it.
D/PowerManagerService( 2347): [api] userActivityFromNative : 50 (event: 2 flags: 0)
D/SensorService( 2347): 0.4 9.9 -0.1
I/InputReader( 2347): Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=] when=116820774347000
D/SSRMv2:Monitor( 2347): SIOP:: AP = 450 (read only)
I/dumpstate(29002): done
D/BatteryService( 2347): Sending ACTION_BATTERY_CHANGED.
D/SSRMv2:CustomFrequencyManagerService( 2347): acquireDVFSLockLocked : type : DVFS_MIN_LIMIT frequency : 1200000 uid : 1000 pid : 2347 pkgName : ACTIVITY_RESUME_BOOSTER#5
I/power ( 2347): *** acquire_dvfs_lock : lockType : 1 freq : 1200000
W/ActivityManager( 2347): mDVFSHelper.acquire()
D/dalvikvm( 2347): GC_FOR_ALLOC freed 201K, 17% free 52076K/62236K, paused 330ms, total 331ms
I/ActivityManager( 2347): Process com.jb.gosms.emoji (pid 28888) (adj 11) has died.
D/InputDispatcher( 2347): Waiting for application to become ready for input: xxxx Reason: Waiting because the touched window is paused.
I/InputDispatcher( 2347): Window spent 8210.1ms processing the last input event: MotionEvent(action=0, deviceId=5, source=0x00001002, displayId=0)
I/InputDispatcher( 2347): Window spent 8061.8ms processing the last input event: MotionEvent(action=1, deviceId=5, source=0x00001002, displayId=0)
I/ActivityManager( 2347): Process com.google.android.apps.plus (pid 28904) (adj 9) has died.
W/Choreographer(28777): Already have a pending vsync event. There should only be one at a time.
I/ActivityManager( 2347): Process com.facebook.katana (pid 28332) (adj 8) has died.
D/MoPub (28777): Third-party network timed out.
D/STATUSBAR-NetworkController( 8423): onSignalStrengthsChanged signalStrength=SignalStrength: 11 -1 -1 -1 -1 -1 -1 99 -140 -20 -200 -1 2147483647 gsm|lte 0x4 level=4
D/SSRMv2:Monitor( 2347): SIOP:: AP = 450 (read only)
D/STATUSBAR-NetworkController( 8423): onSignalStrengthsChanged signalStrength=SignalStrength: 11 -1 -1 -1 -1 -1 -1 99 -140 -20 -200 -1 2147483647 gsm|lte 0x3 level=3
D/STATUSBAR-NetworkController( 8423): refreshSignalCluster: data=2 bt=false
V/MoPub (28777): MoPubErrorCode: Third-party network failed to respond in a timely manner.
D/MoPub (28777): Loading failover url: http://ads.mopub.com/m/ad?v=6&id=9228ebfca6504982941c5601765f658a&nv=1.17.2.0&dn=samsung%2CGT-I9300%2Cm0xx&udid=sha%3A32bc9016036e33b67730c1fadad5c452541e38a5&q=FBATTRID%3Aa3f781d2-2ba6-4265-9690-e4fe0b244cda&z=%2B0200&o=p&sc_a=2.0&mr=1&mcc=242&mnc=05&iso=no&cn=One%20Call&ct=3&av=1.3.8&android_perms_ext_storage=1&request_id=08889b4ab90911e3af000025907c4175&exclude=fbab69084c5611e381c11231392559e4
D/MoPub (28777): Loading url: http://ads.mopub.com/m/ad?v=6&id=9228ebfca6504982941c5601765f658a&nv=1.17.2.0&dn=samsung%2CGT-I9300%2Cm0xx&udid=sha%3A32bc9016036e33b67730c1fadad5c452541e38a5&q=FBATTRID%3Aa3f781d2-2ba6-4265-9690-e4fe0b244cda&z=%2B0200&o=p&sc_a=2.0&mr=1&mcc=242&mnc=05&iso=no&cn=One%20Call&ct=3&av=1.3.8&android_perms_ext_storage=1&request_id=08889b4ab90911e3af000025907c4175&exclude=fbab69084c5611e381c11231392559e4
I/MoPub (28777): Fetching ad for task #1
D/STATUSBAR-NetworkController( 8423): onSignalStrengthsChanged signalStrength=SignalStrength: 10 -1 -1 -1 -1 -1 -1 99 -140 -20 -200 -1 2147483647 gsm|lte 0x3 level=3
D/STATUSBAR-IconMerger( 8423): checkOverflow(240), More:false, Req:false Child:2
D/STATUSBAR-NetworkController( 8423): onSignalStrengthsChanged signalStrength=SignalStrength: 9 -1 -1 -1 -1 -1 -1 99 -140 -20 -200 -1 2147483647 gsm|lte 0x3 level=3
V/WindowManager( 2347): Window{43202888 u0 Keyguard}mOrientationRequetedFromKeyguard=false
D/STATUSBAR-StatusBarManagerService( 2347): manageDisableList what=0x0 pkg=WindowManager.LayoutParams
D/CrashAnrDetector( 2347): processName: com.guessSound.guessSound
D/CrashAnrDetector( 2347): broadcastEvent : com.guessSound.guessSound data_app_crash
D/STATUSBAR-BatteryController( 8423): onReceive() - ACTION_BATTERY_CHANGED
D/STATUSBAR-BatteryController( 8423): onReceive() - BATTERY_STATUS_CHARGING:
D/webviewglue(28777): nativeDestroy view: 0x5979cee0
D/webviewglue(28777): nativeDestroy view: 0x59c399f0
D/STATUSBAR-IconMerger( 8423): checkOverflow(240), More:false, Req:false Child:2
D/STATUSBAR-PhoneStatusBar( 8423): mBrightnessEnablebySettings = true mBrightnessEnablebyBattery = true mBrightnessEnablebyDisableFlag = true
D/STATUSBAR-AirplaneModeQuickSettingButton( 8423): mPhoneStateListener - inAirplaneMode: false
D/STATUSBAR-NetworkController( 8423): onServiceStateChanged state=0
D/STATUSBAR-NetworkController( 8423): updateDataNetType()
D/STATUSBAR-NetworkController( 8423): Nothing, mRoamingIconId = 0
D/WindowManager( 2347): computeScreenConfigurationLocked() set config.orientation=1 dw=720 dh=1280 Callers=com.android.server.wm.WindowManagerService.updateOrientationFromAppTokensLocked:5171 com.android.server.wm.WindowManagerService.updateOrientationFromAppTokens:5142 com.android.server.am.ActivityStack.realStartActivityLocked:1021
I/SurfaceFlinger( 1935): id=2621 createSurf (1x1),1 flag=4, huessSound
D/PowerManagerService( 2347): setKeyboardVisibility: false
I/GATE (28777): <GATE-M>DEV_ACTION_COMPLETED</GATE-M>
I/InputDispatcher( 2347): Delivering touch to: action: 0x0
I/InputDispatcher( 2347): Delivering touch to: action: 0x1
D/WifiController( 2347): SET_AP_BOOSTER_FLAG ignored due to state change
D/WifiService( 2347): onDataConnectionStateChanged: state -2, networkType - UMTS
D/STATUSBAR-NetworkController( 8423): onDataConnectionStateChanged: state=2 type=3
D/STATUSBAR-NetworkController( 8423): updateDataNetType()
D/STATUSBAR-NetworkController( 8423): Nothing, mRoamingIconId = 0
D/STATUSBAR-NetworkController( 8423): refreshSignalCluster: data=2 bt=false
D/ContextualPageReceiver(20224): mContextualPageReceiver: ACTION_SERVICE_STATE_CHANGED isRoaming : false
D/STATUSBAR-IconMerger( 8423): checkOverflow(240), More:false, Req:false Child:2
W/ActivityManager( 2347): Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
E/DatabaseUtils( 2347): Writing exception to parcel
E/DatabaseUtils( 2347): java.lang.SecurityException: Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
E/DatabaseUtils( 2347): at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:13140)
E/DatabaseUtils( 2347): at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:2038)
E/DatabaseUtils( 2347): at com.android.providers.settings.SettingsProvider.callFromPackage(SettingsProvider.java:607)
E/DatabaseUtils( 2347): at android.content.ContentProvider$Transport.call(ContentProvider.java:279)
E/DatabaseUtils( 2347): at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:273)
E/DatabaseUtils( 2347): at android.os.Binder.execTransact(Binder.java:388)
E/DatabaseUtils( 2347): at com.android.server.SystemServer.init1(Native Method)
E/DatabaseUtils( 2347): at com.android.server.SystemServer.main(SystemServer.java:2012)
E/DatabaseUtils( 2347): at java.lang.reflect.Method.invokeNative(Native Method)
E/DatabaseUtils( 2347): at java.lang.reflect.Method.invoke(Method.java:525)
E/DatabaseUtils( 2347): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
E/DatabaseUtils( 2347): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
E/DatabaseUtils( 2347): at dalvik.system.NativeStart.main(Native Method)
I/power ( 2347): *** release_dvfs_lock : lockType : 1
I/power ( 2347): *** acquire_dvfs_lock : lockType : 1 freq : 1200000
D/SSRMv2:CustomFrequencyManagerService( 2347): releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT frequency : 1200000 uid : 1000 pid : 2347 tag : ACTIVITY_RESUME_BOOSTER#5
D/SSRMv2:CustomFrequencyManagerService( 2347): acquireDVFSLockLocked : type : DVFS_MIN_LIMIT frequency : 1200000 uid : 1000 pid : 2347 pkgName : ACTIVITY_RESUME_BOOSTER#5
W/ActivityManager( 2347): mDVFSHelper.acquire()
V/RealCellState( 2689): telephonyManager network type is 3
D/PhoneApp( 2708): mReceiver: ACTION_ANY_DATA_CONNECTION_STATE_CHANGED
D/AbsListView(28777): unregisterIRListener() is called
D/FileWriteThread( 2708): FileWriteThread : threadType = 2
D/NotificationMgr( 2708): hideDataDisconnectedRoaming()...
D/MobileDataStateTracker( 2347): default: Received state=CONNECTED, old=CONNECTED, reason=(unspecified)
D/AbsListView(28777): Get MotionRecognitionManager
D/MotionRecognitionService( 2347): ssp status : false
D/dalvikvm(28777): GC_FOR_ALLOC freed 6233K, 27% free 20403K/27816K, paused 57ms, total 57ms
D/StatusChecker(29074): onReceive : android.intent.action.SERVICE_STATE
D/StatusChecker(29074): Service state changed : 0
D/STATUSBAR-NetworkController( 8423): onDataActivity: direction=2
D/STATUSBAR-NetworkController( 8423): refreshSignalCluster: data=2 bt=false
I/BootupListener( 2708): mPendingNetworkManualSelection : false
W/FlurryAgent(28777): Continuing previous session
D/AbsListView(28777): onVisibilityChanged() is called, visibility : 4
D/AbsListView(28777): unregisterIRListener() is called
D/AbsListView(28777): onVisibilityChanged() is called, visibility : 0
D/AbsListView(28777): unregisterIRListener() is called
D/WindowManager( 2347): computeScreenConfigurationLocked() set config.orientation=1 dw=720 dh=1280 Callers=com.android.server.wm.WindowManagerService.updateOrientationFromAppTokensLocked:5171 com.android.server.wm.WindowManagerService.updateOrientationFromAppTokens:5142 com.android.server.am.ActivityStack.realStartActivityLocked:1021
D/PowerManagerService( 2347): setKeyboardVisibility: false
D/webviewglue(28777): nativeDestroy view: 0x596c5bb0
D/webviewglue(28777): nativeDestroy view: 0x57dc5168
I/SurfaceFlinger( 1935): id=2622 createSurf (1x1),1 flag=4, OewGameActi
D/AbsListView(28777): unregisterIRListener() is called
D/AbsListView(28777): Get MotionRecognitionManager
D/MotionRecognitionService( 2347): ssp status : false
D/dalvikvm( 2896): GC_CONCURRENT freed 410K, 30% free 10387K/14804K, paused 4ms+4ms, total 44ms
W/FlurryAgent(28777): Continuing previous session
D/AbsListView(28777): onVisibilityChanged() is called, visibility : 4
D/AbsListView(28777): unregisterIRListener() is called
D/AbsListView(28777): onVisibilityChanged() is called, visibility : 0
D/AbsListView(28777): unregisterIRListener() is called
D/AbsListView(28777): unregisterIRListener() is called
D/dalvikvm(28777): GC_CONCURRENT freed 651K, 23% free 21680K/27816K, paused 11ms+6ms, total 58ms
I/SurfaceFlinger( 1935): id=2623 createSurf (720x1280),1 flag=4, OewGameActi
D/dalvikvm(28826): GC_EXPLICIT freed 1284K, 19% free 11047K/13512K, paused 4ms+16ms, total 93ms
D/AbsListView(28777): unregisterIRListener() is called
D/AbsListView(28777): unregisterIRListener() is called
D/AbsListView(28777): unregisterIRListener() is called
V/WindowManager( 2347): Window{43202888 u0 Keyguard}mOrientationRequetedFromKeyguard=false
I/power ( 2347): *** release_dvfs_lock : lockType : 1
D/SSRMv2:CustomFrequencyManagerService( 2347): releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT frequency : 1200000 uid : 1000 pid : 2347 tag : ACTIVITY_RESUME_BOOSTER#5
W/ActivityManager( 2347): mDVFSHelper.release()
I/power ( 2347): *** acquire_dvfs_lock : lockType : 1 freq : 1200000
D/AbsListView(28777): unregisterIRListener() is called
D/SSRMv2:CustomFrequencyManagerService( 2347): acquireDVFSLockLocked : type : DVFS_MIN_LIMIT frequency : 1200000 uid : 1000 pid : 2347 pkgName : ACTIVITY_RESUME_BOOSTER#8
D/MoPub (28777): Ad Unit (9228ebfca6504982941c5601765f658a) going invisible: disabling refresh
D/MoPub (28777): Automatic refresh for com.mopub.mobileads.AdConfiguration#42d65750 set to: false.
D/STATUSBAR-NetworkController( 8423): onDataActivity: direction=0
D/STATUSBAR-NetworkController( 8423): refreshSignalCluster: data=2 bt=false
V/WindowManager( 2347): Window{43202888 u0 Keyguard}mOrientationRequetedFromKeyguard=false
I/SurfaceFlinger( 1935): id=2622 Removed OewGameActi (3/7)
I/SurfaceFlinger( 1935): id=2622 Removed OewGameActi (-2/7)
V/WindowManager( 2347): Window{43202888 u0 Keyguard}mOrientationRequetedFromKeyguard=false
W/FlurryAgent(28777): Trying to end session
D/AbsListView(28777): onVisibilityChanged() is called, visibility : 4
D/AbsListView(28777): unregisterIRListener() is called
D/LocationManagerService( 2347): getProviders()=[]
D/LocationManagerService( 2347): getProviders()=[]
D/LocationManagerService( 2347): getBestProvider(Criteria[power=NO_REQ acc=---], true)=null
W/FlurryAgent(28777): Trying to end session
D/AbsListView(28777): onVisibilityChanged() is called, visibility : 4
D/AbsListView(28777): unregisterIRListener() is called
D/LocationManagerService( 2347): getProviders()=[]
D/LocationManagerService( 2347): getProviders()=[]
D/LocationManagerService( 2347): getBestProvider(Criteria[power=NO_REQ acc=---], true)=null
V/WindowManager( 2347): Window{43202888 u0 Keyguard}mOrientationRequetedFromKeyguard=false
V/WindowManager( 2347): Window{43202888 u0 Keyguard}mOrientationRequetedFromKeyguard=false
I/power ( 2347): *** release_dvfs_lock : lockType : 1
D/SSRMv2:CustomFrequencyManagerService( 2347): releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT frequency : 1200000 uid : 1000 pid : 2347 tag : ACTIVITY_RESUME_BOOSTER#8
UPDATE
Here is my Android manifest, Im develop the app in phonegap and use therefore a plugin for the purchase, the java code is below the manifest
<manifest android:hardwareAccelerated="true" android:versionCode="5" android:versionName="1.3.0" android:windowSoftInputMode="adjustPan" package="com.guessSound.guessSound" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />
<application android:debuggable="false" android:hardwareAccelerated="true" android:icon="#drawable/icon" android:label="#string/app_name" android:name="com.guessSound.guessSound.MainApplication">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="#string/app_name" android:name="com.guessSound.guessSound.GuessThisSound" android:screenOrientation="portrait" android:theme="#android:style/Theme.Black.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name="com.parse.PushService" />
<receiver android:name="com.parse.ParseBroadcastReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.USER_PRESENT" />
</intent-filter>
</receiver>
</application>
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.RECORD_VIDEO" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="com.android.vending.BILLING" />
</manifest>
I do first buy it and then consume it, because it looks like I cant buy a consume item while testing with the test productID
private void buy(final String sku){
/* TODO: for security, generate your payload here for verification. See the comments on
* verifyDeveloperPayload() for more info. Since this is a sample, we just use
* an empty string, but on a production app you should generate this. */
final String payload = "";
if (mHelper == null){
callbackContext.error("Billing plugin was not initialized");
return;
}
this.cordova.setActivityResultCallback(this);
mHelper.launchPurchaseFlow(cordova.getActivity(), sku, RC_REQUEST,
mPurchaseFinishedListener, payload);
}
private void consumePurchase(JSONArray data) throws JSONException{
if (mHelper == null){
callbackContext.error("Did you forget to initialize the plugin?");
return;
}
String sku = data.getString(0);
// Get the purchase from the inventory
Purchase purchase = myInventory.getPurchase(sku);
if (purchase != null)
// Consume it
mHelper.consumeAsync(purchase, mConsumeFinishedListener);
else
callbackContext.error(sku + " is not owned so it cannot be consumed");
}
UPDATE 2.0
Im calling the consumePurchase in the successmethod to buy. Could this cause the problem? After I remove the consumepurchase in the successmethod, it looks like I don't get that error.. So how can I buy a consume item without using consumepurchase right after I have bought the item? Could it work if I add a timer, or is it any better solution to this?
User 0 usually indicates root. Are you running your app as root?

Foursquare API: Android key hash does not match the allowed key hashes specified in the app's settings

I'm trying to create Android application based on Fousquare API. I need to connect to foursquare account. I generated keys as told in instructions: github - foursquare-android-oauth But result is "Connecting failed". Client id and client secret are in app's settings. What's wrong?
Logcat:
I/ActivityManager( 1355): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10100000 cmp=com.foursquare.android.sample/.MainActivity } from pid 1507
D/WindowManagerImpl( 1355): addView, new view, mViews[1]: com.android.internal.policy.impl.PhoneWindow$DecorView#40d5af98
W/dalvikvm( 1507): disableGcForExternalAlloc: true
W/dalvikvm( 1507): disableGcForExternalAlloc: false
D/SensorService( 1355): enable: get sensor name = BMA150 3-axis Accelerometer
D/Sensors ( 1355): Enable akm: en = 1
D/SensorService( 1355): SensorDevice::activate--: handle = 0x0, enabled = 0x1
D/SensorService( 1355): enable: sensor->activate return value = 0x0
D/SensorService( 1355): enable: calling mActiveSensors.add(handle, rec) = (0x0, 0x991fc8)
D/SensorService( 1355): enable: mActiveConnections.indexOf(connection) = 0x0
D/SensorService( 1355): pid=1355, uid=1000
D/AK8975 ( 1260): Compass Start
V/WindowManager( 1355): Starting animation in AppWindowToken{408c6f78 token=HistoryRecord{409ded10 com.htc.launcher/.Launcher}} # 27969582
V/WindowManager( 1355): Finished animation in AppWindowToken{408c6f78 token=HistoryRecord{409ded10 com.htc.launcher/.Launcher}} # 27969582
V/WindowManager( 1355): Starting animation in AppWindowToken{40e6f250 token=HistoryRecord{40a891d0 com.foursquare.android.sample/.MainActivity}} # 27969582
V/WindowManager( 1355): Finished animation in AppWindowToken{40e6f250 token=HistoryRecord{40a891d0 com.foursquare.android.sample/.MainActivity}} # 27969582
D/AK8975 ( 1260): Ignore M_Sensor: (y, p, r) = ( 139, 0, 3), Status = 0
D/ATRecorder(19226): com.htc.autotest.dlib.RecordEngine in loader dalvik.system.DexClassLoader#4053d0e0
D/WindowManagerImpl(19226): addView, new view, mViews[0]: com.android.internal.policy.impl.PhoneWindow$DecorView#40538ca8
D/WindowManagerImpl( 1355): finishRemoveViewLocked, mViews[1]: com.android.internal.policy.impl.PhoneWindow$DecorView#40d5af98
I/ActivityManager( 1355): Displayed com.foursquare.android.sample/.MainActivity: +210ms
V/ActivityManager( 1355): Checking to restart com.foursquare.android.sample.MainActivity: changed=0x0, handles=0x0
V/ActivityManager( 1355): oldConfig={ scale=1.0 imsi=250/1 loc=ru_RU touch=3 keys=1/1/2 nav=1/1 orien=1 layout=34 uiMode=17 seq=61 skin=default fontsize=3}
V/ActivityManager( 1355): newConfig={ scale=1.0 imsi=250/1 loc=ru_RU touch=3 keys=1/1/2 nav=1/1 orien=1 layout=34 uiMode=17 seq=61 skin=default fontsize=3}
D/lights ( 1355): [LedInfo] write attr ok name=/sys/class/leds/green/brightness string=0,len=1
V/NotificationService( 1355): Charging...
D/lights ( 1355): [LedInfo] write attr ok name=/sys/class/leds/green/blink string=0,len=1
D/lights ( 1355): [LedInfo] write attr ok name=/sys/class/leds/green/off_timer string=0 0,len=3
D/lights ( 1355): [LedInfo] write attr ok name=/sys/class/leds/amber/brightness string=1,len=1
D/lights ( 1355): [LedInfo] write attr ok name=/sys/class/leds/amber/blink string=0,len=1
D/lights ( 1355): [LedInfo] write attr ok name=/sys/class/leds/amber/off_timer string=0 0,len=3
V/NotificationService( 1355): Turn off Charm Ind LED
W/InputManagerService( 1355): [unbindCurrentClientLocked] Disable input method client.
W/InputManagerService( 1355): [startInputLocked] Enable input method client.
D/BatteryService( 1355): SendIntentforPowersaver
D/BatteryService( 1355): Current powersaver status == NORMAL_STATUS
D/WifiService( 1355): [smart wifi] mSmartWiFiStatus: 0 mBatteryLevel: 88 mWifiConnected: true
D/WifiService( 1355): [smart wifi] ACTION_BATTERY_CHANGED pluggedType: 2
D/StatusBarPolicy( 1507): plugged = true, health = 2, level = 88, mPluggedBatteryLevel = 87, mLowBatteryWarningLevel2 = 25, mshowLowChargingWarning2 = true
E/MyHTC ( 1643): [ImmediateModeProxyMgr] Failed to connect; wait some amount of time before trying again.
W/System.err( 1643): java.net.SocketTimeoutException: Connection timed out
W/System.err( 1643): at org.apache.harmony.luni.platform.OSNetworkSystem.connect(Native Method)
W/System.err( 1643): at dalvik.system.BlockGuard$WrappedNetworkSystem.connect(BlockGuard.java:357)
W/System.err( 1643): at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:207)
W/System.err( 1643): at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:440)
W/System.err( 1643): at java.net.Socket.connect(Socket.java:1013)
W/System.err( 1643): at com.htc.handsetlib.proxy.ImmediateModeProxy.connect(ImmediateModeProxy.java:195)
W/System.err( 1643): at com.htc.cs.service.ImmediateModeProxyMgr._connectToImcOrStatusServer(ImmediateModeProxyMgr.java:134)
W/System.err( 1643): at com.htc.cs.service.ImmediateModeProxyMgr.onIntent(ImmediateModeProxyMgr.java:198)
W/System.err( 1643): at com.htc.cs.service.ImmediateModeService$PushHandler.handleMessage(ImmediateModeService.java:708)
W/System.err( 1643): at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err( 1643): at android.os.Looper.loop(Looper.java:150)
W/System.err( 1643): at android.os.HandlerThread.run(HandlerThread.java:60)
D/MyHTC ( 1643): [ImmediateModeProxyMgr] _connectToImcOrStatusServer(): Fail IMC reconnect time = 172000
D/View (19226): onTouchEvent: viewFlags: 0x18004001
D/View (19226): onTouchEvent: isFocusable: true, isFocusableInTouchMode: false, isFocused: false; focusTaken: false
I/ActivityManager( 1355): Starting activity: Intent { act=android.intent.action.VIEW dat=foursquareauth://authorize?client_id=AP5RF0GZVCLPHHQ5HLHD5KQSYG03XIQUTKV1LXFCEQHPYMKS&v=20130509&androidKeyHash=60%3AA4%3AD9%3A06%3A0E%3AD2%3A27%3A56%3A00%3A57%3AF6%3A5D%3AE0%3AB7%3A65%3A39%3AC2%3AA9%3A64%3A34 cmp=com.joelapenna.foursquared/.OauthWebViewActivity } from pid 19226
E/ResourceType( 1355): Style contains key with bad entry: 0x01010397
E/ResourceType( 1355): Style contains key with bad entry: 0x0101039c
D/WindowManagerImpl( 1355): addView, new view, mViews[1]: com.android.internal.policy.impl.PhoneWindow$DecorView#40dce998
I/keystore( 1257): uid: 1000 action: e -> 7 state: 3 -> 3 retry: 4
I/ActivityManager( 1355): Start proc com.joelapenna.foursquared for activity com.joelapenna.foursquared/.OauthWebViewActivity: pid=19512 uid=10077 gids={3003, 1015}
V/WindowManager( 1355): Starting animation in AppWindowToken{40e6f250 token=HistoryRecord{40a891d0 com.foursquare.android.sample/.MainActivity}} # 27971452
V/WindowManager( 1355): Starting animation in AppWindowToken{40d58910 token=HistoryRecord{40b2cf48 com.joelapenna.foursquared/.OauthWebViewActivity}} # 27971452
V/WindowManager( 1355): Finished animation in AppWindowToken{40e6f250 token=HistoryRecord{40a891d0 com.foursquare.android.sample/.MainActivity}} # 27971464
V/WindowManager( 1355): Finished animation in AppWindowToken{40d58910 token=HistoryRecord{40b2cf48 com.joelapenna.foursquared/.OauthWebViewActivity}} # 27971464
D/dalvikvm(19512): GC_CONCURRENT freed 139K, 44% free 3202K/5639K, external 0K/0K, paused 3ms+2ms
D/dalvikvm(19512): GC_CONCURRENT freed 96K, 41% free 3529K/5959K, external 0K/0K, paused 2ms+2ms
I/dalvikvm(19512): Could not find method android.os.StrictMode$ThreadPolicy$Builder.detectCustomSlowCalls, referenced from method com.joelapenna.foursquared.Foursquared.d
W/dalvikvm(19512): VFY: unable to resolve virtual method 1630: Landroid/os/StrictMode$ThreadPolicy$Builder;.detectCustomSlowCalls ()Landroid/os/StrictMode$ThreadPolicy$Builder;
D/dalvikvm(19512): VFY: replacing opcode 0x6e at 0x0011
D/dalvikvm(19512): VFY: dead code 0x0014-003f in Lcom/joelapenna/foursquared/Foursquared;.d ()V
I/ActivityThread(19512): Pub com.joelapenna.foursquared: com.joelapenna.foursquared.providers.GlobalSearchProvider
I/ActivityThread(19512): Pub com.joelapenna.foursquared.db.ConversationsContentProvider: com.joelapenna.foursquared.db.ConversationsContentProvider
I/ActivityThread(19512): Pub com.joelapenna.foursquared.providers.VenueQuerySuggestionsProvider: com.joelapenna.foursquared.providers.VenueQuerySuggestionsProvider
I/ActivityThread(19512): Pub com.joelapenna.foursquared.providers.AppSearchSuggestionProvider: com.joelapenna.foursquared.providers.AppSearchSuggestionProvider
I/ActivityThread(19512): Pub com.joelapenna.foursquared.providers.foursquarebridgeprovider: com.joelapenna.foursquared.providers.FoursquareBridgeProvider
I/ActivityThread(19512): Pub com.joelapenna.foursquared.providers.FriendsSearchSuggestionProvider: com.joelapenna.foursquared.providers.FriendsSearchSuggestionProvider
I/keystore( 1257): uid: 1000 action: e -> 7 state: 3 -> 3 retry: 4
I/keystore( 1257): uid: 1000 action: e -> 7 state: 3 -> 3 retry: 4
I/keystore( 1257): uid: 1000 action: e -> 7 state: 3 -> 3 retry: 4
I/keystore( 1257): uid: 1000 action: e -> 7 state: 3 -> 3 retry: 4
I/keystore( 1257): uid: 1000 action: e -> 7 state: 3 -> 3 retry: 4
I/keystore( 1257): uid: 1000 action: e -> 7 state: 3 -> 3 retry: 4
I/dalvikvm(19512): Could not find method android.os.StrictMode$VmPolicy$Builder.detectLeakedClosableObjects, referenced from method com.foursquare.core.h.z.a
W/dalvikvm(19512): VFY: unable to resolve virtual method 1638: Landroid/os/StrictMode$VmPolicy$Builder;.detectLeakedClosableObjects ()Landroid/os/StrictMode$VmPolicy$Builder;
D/dalvikvm(19512): VFY: replacing opcode 0x6e at 0x0025
D/dalvikvm(19512): VFY: dead code 0x0028-0038 in Lcom/foursquare/core/h/z;.a ()V
follow this link:
https://developer.foursquare.com/overview/auth
it's much more informative and explains the process great.
by the way it would be greate if you could paste the exact error and give some more information about what you did....theres not enough info to help you.
Maybe you didn't set the INTERNET PERMISSION in the Android manifest:
<manifest xlmns:android...>
...
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
</manifest>

Categories

Resources