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

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.

Related

Android: Instant app showing just white screen

I was trying to make an basic Hello world instant app. For that I am following https://developer.android.com/topic/instant-apps/getting-started/first-instant-app.html
I have set up everything as per the doc, but I am not able to get my app running properly. All I am getting is a white screen
SDK updated
Output
Even I am not getting any thing meaningful from logcat output also
06-29 11:37:14.376 5419-5431/? I/DevAtomProvider: Dev Manager providing jar from /data/user/0/com.google.android.instantapps.devman/cache/iapk_atoms/com.example.myfourthinstantapplication/atom-download--feature-1498716430329/feature.jar
06-29 11:37:14.111 5529-5529/? W/isor.isolated15: type=1400 audit(0.0:26): avc: denied { getattr } for path="/data/data/com.google.android.instantapps.supervisor" dev="dm-0" ino=7647 scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
06-29 11:37:14.660 5475-5559/? E/libEGL: validate_display:99 error 3008 (EGL_BAD_DISPLAY)
06-29 11:37:14.666 5475-5559/? I/aiagpu: [0629/113714:INFO:gpu_host.cc(46)] [channel = GPU_CHANNEL_1] init
[ 06-29 11:37:14.671 5475: 5559 D/ ]
HostConnection::get() New Host Connection established 0x91f551c0, tid 5559
[ 06-29 11:37:14.675 5475: 5559 W/ ]
Unrecognized GLES max version string in extensions: ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1
06-29 11:37:14.683 5475-5559/? D/EGL_emulation: eglCreateContext: 0xa2b91dc0: maj 1 min 0 rcv 1
06-29 11:37:14.690 5475-5559/? W/System: ClassLoader referenced unknown path:
06-29 11:37:14.715 5475-5475/? D/NetworkSecurityConfig: No Network Security Config specified, using platform default
06-29 11:37:14.768 5475-5564/? I/Isotope: UID: [10086] PID: [5475] HygieneTaskService : Starting task: HygieneTaskService.schedule
06-29 11:37:14.794 5475-5564/? W/InstanceID/Rpc: Found 10013
06-29 11:37:14.939 5529-5540/? V/native: jni_stub.cpp:24 Read:32 from instant_app_interface_fd
06-29 11:37:14.939 5529-5540/? V/native: jni_stub.cpp:42 Read function ptr : 1
06-29 11:37:14.939 5529-5540/? D/native: jni_stub.cpp:63 Registering com/google/android/instantapps/supervisor/gpu/GpuClientCreatorNativeImpl 0xa5735904 2
06-29 11:37:14.939 5529-5540/? D/native: jni_stub.cpp:63 Registering com/google/android/instantapps/supervisor/gpu/WindowContainerNativeImpl 0xa573591c 2
06-29 11:37:14.939 5529-5540/? D/native: jni_stub.cpp:63 Registering com/google/android/instantapps/supervisor/gpu/WindowBufferContainerNativeImpl 0xa5735934 2
06-29 11:37:14.940 5529-5540/? D/native: jni_stub.cpp:63 Registering com/google/android/instantapps/supervisor/syscall/SyscallServiceClient 0xa5735a00 6
06-29 11:37:14.940 5529-5540/? D/native: jni_stub.cpp:63 Registering com/google/android/instantapps/supervisor/syscall/IPCNative 0xa5737a34 1
06-29 11:37:14.940 5529-5540/? D/native: jni_stub.cpp:63 Registering com/google/android/instantapps/supervisor/syscall/SyscallService 0xa57359a0 6
06-29 11:37:14.940 5529-5540/? D/native: jni_stub.cpp:63 Registering com/google/android/instantapps/supervisor/syscall/NativeLogSettings 0xa5735a60 6
06-29 11:37:14.940 5529-5540/? D/native: jni_stub.cpp:63 Registering com/google/android/instantapps/supervisor/gpu/GpuHostCreatorNativeImpl 0xa57358e0 3
06-29 11:37:14.940 5529-5540/? D/native: jni_stub.cpp:63 Registering com/google/android/instantapps/supervisor/syscall/LibraryLoader 0xa57359e8 1
06-29 11:37:15.345 5475-5559/? W/Isotope: UID: [10086] PID: [5475] ServiceMgrForwarder : Service not found: dropbox
06-29 11:37:15.347 5475-5559/? W/Isotope: UID: [10086] PID: [5475] ServiceMgrForwarder : Service not found: graphicsstats
06-29 11:37:15.363 5475-5559/? W/Isotope: UID: [10086] PID: [5475] ServiceMgrForwarder : Service not found: overlay
06-29 11:37:15.553 5529-5567/? D/SyscallServiceClient: Syscall client initialized
06-29 11:37:15.562 5529-5540/? I/aiagpu: [0629/113715:INFO:gpu_client.cc(55)] GpuClient::Initialize
06-29 11:37:15.606 5475-5555/? I/IsotopeNative: storage_manager.cpp:171 [StorageManager]: calling uid 99002 with package name com.example.myfourthinstantapplication cannot access /data/user wrt root directory /data/data/com.google.android.instantapps.supervisor/files
06-29 11:37:15.606 5475-5555/? I/IsotopeNative: storage_manager.cpp:171 [StorageManager]: calling uid 99002 with package name com.example.myfourthinstantapplication cannot access /data/user wrt root directory /data/data/com.google.android.instantapps.supervisor/files
06-29 11:37:15.606 5475-5555/? I/IsotopeNative: storage_manager.cpp:171 [StorageManager]: calling uid 99002 with package name com.example.myfourthinstantapplication cannot access /data/user wrt root directory /data/data/com.google.android.instantapps.supervisor/files
06-29 11:37:15.607 5475-5555/? I/IsotopeNative: storage_manager.cpp:171 [StorageManager]: calling uid 99002 with package name com.example.myfourthinstantapplication cannot access /data/user wrt root directory /data/data/com.google.android.instantapps.supervisor/files
06-29 11:37:15.607 5475-5555/? I/IsotopeNative: storage_manager.cpp:171 [StorageManager]: calling uid 99002 with package name com.example.myfourthinstantapplication cannot access /data/user wrt root directory /data/data/com.google.android.instantapps.supervisor/files
06-29 11:37:15.607 5475-5555/? I/IsotopeNative: storage_manager.cpp:171 [StorageManager]: calling uid 99002 with package name com.example.myfourthinstantapplication cannot access /data/user wrt root directory /data/data/com.google.android.instantapps.supervisor/files
06-29 11:37:15.607 5475-5555/? I/IsotopeNative: storage_manager.cpp:171 [StorageManager]: calling uid 99002 with package name com.example.myfourthinstantapplication cannot access /data/user wrt root directory /data/data/com.google.android.instantapps.supervisor/files
06-29 11:37:18.003 1931-3113/? W/io.grpc.internal.ci: [{0}] Failed to resolve name. status={1}
06-29 11:37:18.051 1550-1584/? I/InputReader: Reconfiguring input devices. changes=0x00000010
06-29 11:37:18.060 1717-1717/? D/CarrierSvcBindHelper: No carrier app for: 0
06-29 11:37:22.085 2559-2625/? I/Finsky: [150] com.google.android.finsky.g.d.a(24): Completed 0 account content syncs with 0 successful.
06-29 11:37:22.087 2559-2559/? I/Finsky: [1] com.google.android.finsky.services.e.a(5): Installation state replication succeeded.
06-29 11:37:33.022 1313-1335/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 3574921 , only wrote 3574080
06-29 11:37:33.109 1550-1563/? I/ProcessStatsService: Prepared write state in 9ms
06-29 11:37:33.233 5529-5529/? W/art: Attempt to set the sensitive thread twice. Tid:5529
06-29 11:37:33.383 5475-5485/? I/art: Background partial concurrent mark sweep GC freed 19558(1255KB) AllocSpace objects, 8(252KB) LOS objects, 35% free, 7MB/11MB, paused 4.514ms total 155.311ms
06-29 11:37:33.409 1550-1855/? I/ActivityManager: START u0 {dat=https://myfourthinstantapplication.example.com/... flg=0x10000000 cmp=com.google.android.instantapps.supervisor/.shadow.ShadowActivity10 (has extras)} from uid 10086 on display 0
06-29 11:37:33.489 1269-1305/? D/gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 2691072
06-29 11:37:33.509 1550-1559/? I/art: Background partial concurrent mark sweep GC freed 11387(828KB) AllocSpace objects, 4(208KB) LOS objects, 23% free, 12MB/16MB, paused 2.852ms total 113.459ms
06-29 11:37:33.520 1269-1269/? E/EGL_emulation: tid 1269: eglCreateSyncKHR(1901): error 0x3004 (EGL_BAD_ATTRIBUTE)
06-29 11:37:33.597 1985-2151/? D/EGL_emulation: eglMakeCurrent: 0xb0305480: ver 2 0 (tinfo 0xb03036c0)
06-29 11:37:33.708 1550-1559/? I/art: Background partial concurrent mark sweep GC freed 1008(54KB) AllocSpace objects, 0(0B) LOS objects, 23% free, 13MB/17MB, paused 3.307ms total 152.453ms
06-29 11:37:33.943 1630-1648/? I/art: Background partial concurrent mark sweep GC freed 14682(952KB) AllocSpace objects, 2(132KB) LOS objects, 25% free, 11MB/15MB, paused 2.209ms total 115.433ms
06-29 11:37:33.945 5529-5529/? W/art: 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
06-29 11:37:34.586 1269-1274/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
06-29 11:37:34.587 5475-5487/? W/Isotope: UID: [10086] PID: [5475] ServiceMgrForwarder : Service not found: graphicsstats
[ 06-29 11:37:34.591 5475: 5486 D/ ]
HostConnection::get() New Host Connection established 0x91f18840, tid 5486
[ 06-29 11:37:34.593 5475: 5486 W/ ]
Unrecognized GLES max version string in extensions: ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1
[ 06-29 11:37:34.623 5529: 5529 D/ ]
HostConnection::get() New Host Connection established 0xa3eb2bc0, tid 5529
[ 06-29 11:37:34.624 5529: 5529 W/ ]
Unrecognized GLES max version string in extensions: ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1
06-29 11:37:34.736 5529-5579/? D/libEGL: Emulator has host GPU support, qemu.gles is set to 1.
06-29 11:37:34.737 5475-5486/? I/IsotopeNative: storage_manager.cpp:171 [StorageManager]: calling uid 99002 with package name com.example.myfourthinstantapplication cannot access /dev/socket/property_service wrt root directory /data/data/com.google.android.instantapps.supervisor/files
06-29 11:37:34.737 5475-5486/? W/IsotopeNative: syscall_server.cpp:737 [SyscallServer]: SyscallServer: accessing path /dev/socket/property_service in 8 which is not allowed!
06-29 11:37:34.762 5529-5579/? D/libEGL: loaded /system/lib/egl/libGLES_emulation.so
06-29 11:37:34.926 5529-5529/? W/art: 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
06-29 11:37:34.977 5529-5579/? I/OpenGLRenderer: Initialized EGL, version 1.4
06-29 11:37:34.977 5529-5579/? D/OpenGLRenderer: Swap behavior 1
06-29 11:37:34.977 5529-5579/? W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
06-29 11:37:34.977 5529-5579/? D/OpenGLRenderer: Swap behavior 0
[ 06-29 11:37:34.979 5475: 5570 D/ ]
HostConnection::get() New Host Connection established 0x91f25000, tid 5570
[ 06-29 11:37:34.983 5475: 5570 W/ ]
Unrecognized GLES max version string in extensions: ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1
[ 06-29 11:37:35.025 5475: 5580 D/ ]
HostConnection::get() New Host Connection established 0x91f259c0, tid 5580
[ 06-29 11:37:35.028 5475: 5580 W/ ]
Unrecognized GLES max version string in extensions: ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1
06-29 11:37:35.068 5475-5580/? D/EGL_emulation: eglCreateContext: 0xa2bcb900: maj 2 min 0 rcv 2
06-29 11:37:35.072 5475-5580/? D/EGL_emulation: eglMakeCurrent: 0xa2bcb900: ver 2 0 (tinfo 0x905ff620)
06-29 11:37:35.214 5475-5580/? D/EGL_emulation: eglMakeCurrent: 0xa2bcb900: ver 2 0 (tinfo 0x905ff620)
06-29 11:37:35.446 5475-5512/? D/EGL_emulation: eglMakeCurrent: 0xb0305660: ver 2 0 (tinfo 0xb0303700)
06-29 11:37:35.451 1550-1570/? I/ActivityManager: Displayed com.google.android.instantapps.supervisor/.shadow.ShadowActivity10: +2s4ms
06-29 11:37:35.860 1550-1570/? I/WindowManager: Destroying surface Surface(name=com.android.launcher3/com.android.launcher3.Launcher) called by com.android.server.wm.WindowStateAnimator.destroySurface:2014 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:881 com.android.server.wm.WindowState.destroyOrSaveSurface:2073 com.android.server.wm.AppWindowToken.destroySurfaces:363 com.android.server.wm.WindowStateAnimator.finishExit:565 com.android.server.wm.AppWindowAnimator.stepAnimationLocked:427 com.android.server.wm.WindowAnimator.updateAppWindowsLocked:176 com.android.server.wm.WindowAnimator.animateLocked:678
06-29 11:37:35.889 5475-5475/? D/Supervisor: UrlHandler stopping
06-29 11:37:35.907 1550-1855/? I/ActivityManager: Activity reported stop, but no longer stopping: ActivityRecord{25fc4e u0 com.google.android.instantapps.supervisor/.UrlHandler t29 f}
06-29 11:37:36.262 1313-1336/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 3883444 , only wrote 3729600
06-29 11:37:41.168 1550-2912/? D/ConnectivityService: reportNetworkConnectivity(100, false) by 10013
06-29 11:37:41.193 1550-2016/? I/ActivityManager: Start proc 5588:com.google.android.talk/u0a55 for broadcast com.google.android.talk/com.google.android.apps.hangouts.service.GcmStateReceiver
06-29 11:37:41.198 5588-5588/? W/art: Unexpected CPU variant for X86 using defaults: x86
06-29 11:37:41.201 1550-1571/? W/ProcessCpuTracker: Skipping unknown process pid 5587
06-29 11:37:41.247 5588-5588/? W/System: ClassLoader referenced unknown path: /system/app/Hangouts/lib/x86
06-29 11:37:41.477 5588-5588/? I/Babel_telephony: TeleModule.onApplicationCreate
06-29 11:37:41.494 5588-5611/? I/Babel_SMS: MmsConfig: mnc/mcc: 310/260
06-29 11:37:41.494 5588-5611/? I/Babel_SMS: MmsConfig.loadMmsSettings
06-29 11:37:41.498 5588-5611/? I/Babel_SMS: MmsConfig.loadDeviceMmsSettings from API: mUserAgent=GoldfishNexus, mUaProfUrl=http://gsm.lge.com/html/gsm/Nexus5-M3.xml
06-29 11:37:41.499 5588-5611/? I/Babel_SMS: MmsConfig.loadFromDatabase
06-29 11:37:41.513 5588-5611/? E/SQLiteLog: (1) no such table: mmsconfig
06-29 11:37:41.520 5588-5611/? I/Babel_SMS: MmsConfig: no mmsconfig table android.database.sqlite.SQLiteException: no such table: mmsconfig (code 1): , while compiling: SELECT key, value, type FROM mmsconfig WHERE numeric=?
06-29 11:37:41.520 5588-5611/? I/Babel_SMS: MmsConfig.loadFromResources
06-29 11:37:41.521 5588-5611/? E/Babel_SMS: canonicalizeMccMnc: invalid mccmnc nullnull
06-29 11:37:41.522 5588-5611/? W/Babel_SMS: MmsConfig: invalid key=userAgent or type=string
06-29 11:37:41.522 5588-5611/? W/Babel_SMS: MmsConfig: invalid key=uaProfUrl or type=string
06-29 11:37:41.522 5588-5611/? I/Babel_SMS: MmsConfig.loadMmsSettings: mUserAgent=GoldfishNexus, mUaProfUrl=http://gsm.lge.com/html/gsm/Nexus5-M3.xml
06-29 11:37:41.531 5588-5588/? I/Babel_Prime: wrapCrashReportingIntoUncaughtExceptionHandler
06-29 11:37:41.531 5588-5588/? I/Babel_Prime: isMemoryEnabled=false
06-29 11:37:41.532 5588-5588/? I/Babel_Prime: isTimerEnabled=false
06-29 11:37:41.532 5588-5588/? I/Babel_Prime: isCrashCounterEnabled=true
06-29 11:37:41.552 5588-5588/? I/Babel_Crash: Startup - clean
06-29 11:37:41.591 1550-1598/? D/ConnectivityService: NetworkAgentInfo [MOBILE (LTE) - 100] validation passed
06-29 11:37:41.610 5588-5588/? I/Babel_Prime: startMemoryMonitor
06-29 11:37:41.631 5588-5588/? D/Babel: onCreate: Shutdown runnable posted in onCreate with a delay of 5000 ms.
06-29 11:37:41.783 5588-5588/? V/NativeCrypto: Registering com/google/android/gms/org/conscrypt/NativeCrypto's 259 native methods...
06-29 11:37:41.843 5588-5588/? D/NetworkSecurityConfig: No Network Security Config specified, using platform default
06-29 11:37:41.850 5588-5588/? I/ProviderInstaller: Installed default security provider GmsCore_OpenSSL
06-29 11:37:41.874 5588-5588/? D/Babel: Idle: Shutdown runnable posted in release with a delay of 5000 ms.
06-29 11:37:46.921 5588-5588/? D/Babel: RefCountedService(com.google.android.apps.hangouts.requestwriter.RequestWriter) onDestroy (count=0, startId=1 stopped=true)
06-29 11:37:46.924 1550-3351/? I/ActivityManager: Killing 4980:com.google.android.talk:matchstick/u0a55 (adj 906): empty #17
06-29 11:37:46.952 1550-2016/? D/ActivityManager: cleanUpApplicationRecord -- 4980
06-29 11:37:47.537 1550-1559/? I/art: Background sticky concurrent mark sweep GC freed 38683(3MB) AllocSpace objects, 6(264KB) LOS objects, 22% free, 13MB/17MB, paused 2.228ms total 225.708ms
06-29 11:37:56.504 5588-5606/? W/Babel: bcq TOOK TOO LONG! (15041ms > 10000ms)
06-29 11:37:56.504 5588-5607/? W/Babel: bcq TOOK TOO LONG! (15026ms > 10000ms)
06-29 11:37:56.525 5627-5627/? W/art: Unexpected CPU variant for X86 using defaults: x86
06-29 11:37:56.526 1550-1563/? I/ActivityManager: Start proc 5627:com.google.android.talk:matchstick/u0a55 for broadcast com.google.android.talk/com.google.android.libraries.matchstick.net.MatchstickInProcessReceiver
06-29 11:37:56.534 1550-1561/? I/Telecom: PhoneAccountRegistrar: SimCallManager queried, returning: null: TSI.gSCM#AHM
06-29 11:37:56.540 5588-5588/? I/Babel_telephony: TeleModule.updateConnectionManagerRegistration, registration preference changed from false to false
06-29 11:37:56.540 5588-5588/? W/Babel: BAM#gBA: invalid account id: -1
06-29 11:37:56.540 5588-5588/? W/Babel: BAM#gBA: invalid account id: -1
06-29 11:37:56.540 5588-5588/? I/Babel_telephony: TeleModule.updateIncomingCallRegistration, preferred account for incoming calls changed from: null to null
06-29 11:37:56.548 1550-2015/? I/Telecom: PhoneAccountRegistrar: SimCallManager queried, returning: null: TSI.gSCM#AHU
06-29 11:37:56.573 5627-5627/? W/System: ClassLoader referenced unknown path: /system/app/Hangouts/lib/x86
06-29 11:37:56.798 5627-5642/? I/MS_RegisterService: RegisterService intent:Intent { act=register_intent_action flg=0x10 cmp=com.google.android.talk/com.google.android.libraries.matchstick.net.SilentRegisterService } isPeriodic:false
06-29 11:37:56.844 5627-5642/? V/NativeCrypto: Registering com/google/android/gms/org/conscrypt/NativeCrypto's 259 native methods...
06-29 11:37:56.872 5627-5642/? D/NetworkSecurityConfig: No Network Security Config specified, using platform default
06-29 11:37:56.876 5627-5642/? I/ProviderInstaller: Installed default security provider GmsCore_OpenSSL
06-29 11:37:56.877 5627-5642/? I/MS_RegisterService: Not registered and not enabled. Doing nothing.
The white screen is visible that means your instant app is running well in emulator. First post your full code so that I can suggest something in better way. Meanwhile, there are some points you check cross check:
1. Check if the XML file of your java activity file is having some text to display on screen.
2. If your app is installed in the emulator, just uninstall it first then select your instant app to run on emulator.
change the emulator's graphics emulated performance from automatic to either Hardware GLES 2.0 or Software GLES 2.0 as shown in this blogpost:
http://dominoc925.blogspot.fr/2017/08/android-studio-emulator-how-i-resolved.html
Resolved white screen. possible encounters are
1) if following message
in terminal window I/mple.myfirstap: Background concurrent copying GC
freed 8149(516KB) AllocSpace objects, 0(0B) LOS objects, 50% free,
1828KB/3MB, paused
5.100ms total 179.836ms D/EGL_emulation: eglMakeCurrent: 0xe0724840: ver 2 0 (tinfo 0xe27cddc0) Application terminated.
Goto layout/activity_display_message.xml
-> Select textView component
-> And in Attributes window remove Hardcoded string "textValue", (should not use #string resource) clear the hardcoded textValue and
keep it empty for the textbox
2) Optionally you can try uninstalling the app from the emulator and build
it again.
Create a new project and see if again nothing shows. There is no problem in your SDK. If SDK fails then your android studio will not start and gives you message to download SDK or give the path of SDK.

avc: denied { read } for name="/" dev="rootfs" ino=1 scontext=u:r:untrusted_app

I was not able to find here solution to read/write problem on Android File manager application I am trying to create. When running on real device, I am not able to delete a file from SD card.
Could anyone guide me, what am I doing wrong and how to fix the permissions?
I have added read/write permissions to AndroidManifest.xml
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
but anyway, I am getting this error message:
avc: denied { read } for name="/" dev="rootfs" ino=1 scontext=u:r:untrusted_app
for dependencies I am using:
compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
Full LogCat:
02-28 10:59:49.740 12067-12067/? W/art: Unexpected CPU variant for X86 using defaults: x86_64
02-28 10:59:49.765 12067-12067/? W/System: ClassLoader referenced unknown path: /data/app/com.example.filemanager-1/lib/x86_64
02-28 10:59:49.770 12067-12067/? I/InstantRun: Instant Run Runtime started. Android package is com.example.filemanager, real application class is com.example.filemanager.FileManager.
02-28 10:59:49.797 12067-12074/? E/art: Failed writing handshake bytes (-1 of 14): Broken pipe
02-28 10:59:49.797 12067-12074/? I/art: Debugger is no longer active
02-28 10:59:49.797 12067-12074/? I/art: Starting a blocking GC Instrumentation
02-28 10:59:50.284 12067-12067/? W/System: ClassLoader referenced unknown path: /data/app/com.example.filemanager-1/lib/x86_64
02-28 10:59:50.337 12067-12067/? W/ini.filemanager: type=1400 audit(0.0:27): avc: denied { read } for name="/" dev="rootfs" ino=1 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:rootfs:s0 tclass=dir permissive=0
[ 02-28 10:59:50.356 12067:12067 W/ ]
Process pipe failed
02-28 10:59:50.376 12067-12089/? I/OpenGLRenderer: Initialized EGL, version 1.4
02-28 10:59:50.376 12067-12089/? D/OpenGLRenderer: Swap behavior 1
02-28 10:59:50.390 12067-12089/? E/EGL_emulation: tid 12089: eglSurfaceAttrib(1174): error 0x3009 (EGL_BAD_MATCH)
02-28 10:59:50.390 12067-12089/? W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x76656d668840, error=EGL_BAD_MATCH

use google drive api_key on android

i followed a lot of tutorials, at the moment i have:
created a new project on google developer console
created a new api key, restricted it to android app, added my package name (package="XXXX.YYYY" field of manifest tag in AndroidManifest.xml), added my SHA1 (using this command
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore -list -v)
added INTERNET, ACCESS_NETWORK_STATE and GET_ACCOUNTS permissions in my AndroidManifest.xml
added <meta-data android:name="com.google.android.apps.drive.APP_ID" android:value="id=My_Key_copied_from_google_devel_console" /> inside application tag in AndroidManifest.xml
added this dep in gradle: compile 'com.google.android.gms:play-services-drive:9.0.0'
created a new activity and copy-pasted MainActivity from quickstart example from google
now i get this error when i click on my accout to authenticate it:
02-23 20:47:20.105 1931-2504/com.google.android.gms.persistent W/GLSUser: [AppCertManager] IOException while requesting key:
java.io.IOException: Invalid device key response.
at enr.a(:com.google.android.gms:282)
at enr.a(:com.google.android.gms:4237)
at enq.a(:com.google.android.gms:46)
at enk.a(:com.google.android.gms:53)
at enj.a(:com.google.android.gms:111)
at com.google.android.gms.auth.account.be.legacy.AuthCronChimeraService.b(:com.google.android.gms:4052)
at dxg.call(:com.google.android.gms:2043)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at kzi.run(:com.google.android.gms:450)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at ldm.run(:com.google.android.gms:17)
at java.lang.Thread.run(Thread.java:818)
i'm testing with android emulator 5.0 x86_64 with google apis.
where am I doing wrong?
EDIT:
as Bertrand Martel pointed out i must sign my apk, but still no luck.
also here is a full log:
02-23 22:19:15.605 1493-1519/system_process I/ActivityManager: Displayed rmbq.patrol_one_v2.unbrand/rmbq.patrol_one_v2.WelcomeActivity: +84ms
02-23 22:19:15.623 3083-3100/rmbq.patrol_one_v2.unbrand D/OpenGLRenderer: endAllStagingAnimators on 0x7fc2591be400 (RippleDrawable) with handle 0x7fc25a73e660
02-23 22:19:16.997 1493-1559/system_process W/AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client
02-23 22:19:16.997 1493-2523/system_process I/ActivityManager: START u0 {cmp=rmbq.patrol_one_v2.unbrand/rmbq.patrol_one_v2.SettingsActivity} from uid 10063 on display 0
02-23 22:19:17.022 1493-1657/system_process W/AppOps: Bad call: specified package com.google.android.gms under uid 10063 but it is really 10007
02-23 22:19:17.023 1493-1806/system_process W/AppOps: Bad call: specified package com.google.android.gms under uid 10063 but it is really 10007
02-23 22:19:17.023 1493-1941/system_process W/AppOps: Bad call: specified package com.google.android.gms under uid 10063 but it is really 10007
02-23 22:19:17.025 1493-1938/system_process W/AppOps: Bad call: specified package com.google.android.gms under uid 10063 but it is really 10007
02-23 22:19:17.055 1493-1519/system_process I/ActivityManager: Displayed rmbq.patrol_one_v2.unbrand/rmbq.patrol_one_v2.SettingsActivity: +58ms
02-23 22:19:17.081 1493-1508/system_process I/ActivityManager: START u0 {act=com.google.android.gms.signin.action.SIGN_IN cmp=com.google.android.gms/.signin.activity.SignInActivity (has extras)} from uid 10007 on display 0
02-23 22:19:17.083 2481-2481/com.google.android.gms.ui D/ChimeraActivityProxy: Loading activity implementation for ComponentInfo{com.google.android.gms/com.google.android.gms.signin.activity.SignInActivity}
02-23 22:19:17.083 2481-2481/com.google.android.gms.ui D/ChimeraActivityProxy: Proxying container activity ComponentInfo{com.google.android.gms/com.google.android.gms.signin.activity.SignInActivity} to Chimera activity impl .signin.activity.SignInChimeraActivity
02-23 22:19:17.090 1493-1807/system_process I/ActivityManager: START u0 {act=com.google.android.gms.common.account.CHOOSE_ACCOUNT_USERTILE pkg=com.google.android.gms cmp=com.google.android.gms/.common.account.AccountChipAccountPickerActivity (has extras)} from uid 10007 on display 0
02-23 22:19:17.111 2481-2481/com.google.android.gms.ui D/ChimeraActivityProxy: Loading activity implementation for ComponentInfo{com.google.android.gms/com.google.android.gms.common.account.AccountChipAccountPickerActivity}
02-23 22:19:17.111 2481-2481/com.google.android.gms.ui D/ChimeraActivityProxy: Proxying container activity ComponentInfo{com.google.android.gms/com.google.android.gms.common.account.AccountChipAccountPickerActivity} to Chimera activity impl .common.account.AccountChipAccountPickerChimeraActivity
02-23 22:19:17.151 1493-1519/system_process I/ActivityManager: Displayed com.google.android.gms/.common.account.AccountChipAccountPickerActivity: +58ms (total +69ms)
02-23 22:19:19.007 1493-1559/system_process W/AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client
02-23 22:19:19.040 2481-2780/com.google.android.gms.ui D/OpenGLRenderer: endAllStagingAnimators on 0x7fc245fd7400 (ListView) with handle 0x7fc25aa627e0
02-23 22:19:19.059 2481-2481/com.google.android.gms.ui D/StrictMode: Wrote violation #0 of 3: 12720 bytes
02-23 22:19:19.061 2030-2044/com.google.android.gms D/StrictMode: Wrote violation #0 of 3: 13676 bytes
02-23 22:19:19.221 1120-1120/? W/SurfaceFlinger: couldn't log to binary event log: overflow.
02-23 22:19:19.341 1889-2403/com.google.android.gms.persistent W/ContentTaskController: Invalid task was provided to stopTracking.
02-23 22:19:19.375 1493-1808/system_process W/AppOps: Bad call: specified package com.google.android.gms under uid 10063 but it is really 10007
02-23 22:19:19.381 1889-2220/com.google.android.gms.persistent I/art: Explicit concurrent mark sweep GC freed 55504(3MB) AllocSpace objects, 13(214KB) LOS objects, 30% free, 9MB/13MB, paused 136us total 12.142ms
02-23 22:19:19.383 1493-2523/system_process I/ActivityManager: START u0 {act=com.google.android.gms.signin.action.SIGN_IN cmp=com.google.android.gms/.signin.activity.SignInActivity (has extras)} from uid 10007 on display 0
02-23 22:19:19.386 1889-1889/com.google.android.gms.persistent W/GLSUser: [DeviceKeyStore] Cannot load key: Device key file not found.
02-23 22:19:19.391 1131-1530/? E/Drm: Failed to find drm plugin
02-23 22:19:19.391 2559-2904/com.google.android.gms.unstable W/DG.WV: Widevine DRM not supported on this device
android.media.UnsupportedSchemeException: Failed to instantiate drm object.
at android.media.MediaDrm.native_setup(Native Method)
at android.media.MediaDrm.<init>(MediaDrm.java:180)
at obk.a(:com.google.android.gms:119)
at nyd.run(:com.google.android.gms:1092)
at kzi.run(:com.google.android.gms:450)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at ldm.run(:com.google.android.gms:17)
at java.lang.Thread.run(Thread.java:818)
02-23 22:19:19.392 2481-2481/com.google.android.gms.ui D/ChimeraActivityProxy: Loading activity implementation for ComponentInfo{com.google.android.gms/com.google.android.gms.signin.activity.SignInActivity}
02-23 22:19:19.392 2481-2481/com.google.android.gms.ui D/ChimeraActivityProxy: Proxying container activity ComponentInfo{com.google.android.gms/com.google.android.gms.signin.activity.SignInActivity} to Chimera activity impl .signin.activity.SignInChimeraActivity
02-23 22:19:19.393 1493-1657/system_process I/ActivityManager: START u0 {act=com.google.android.gms.common.account.CHOOSE_ACCOUNT_USERTILE pkg=com.google.android.gms cmp=com.google.android.gms/.common.account.AccountChipAccountPickerActivity (has extras)} from uid 10007 on display 0
02-23 22:19:19.411 2481-2481/com.google.android.gms.ui D/ChimeraActivityProxy: Loading activity implementation for ComponentInfo{com.google.android.gms/com.google.android.gms.common.account.AccountChipAccountPickerActivity}
02-23 22:19:19.411 2481-2481/com.google.android.gms.ui D/ChimeraActivityProxy: Proxying container activity ComponentInfo{com.google.android.gms/com.google.android.gms.common.account.AccountChipAccountPickerActivity} to Chimera activity impl .common.account.AccountChipAccountPickerChimeraActivity
02-23 22:19:19.412 2481-2481/com.google.android.gms.ui D/StrictMode: Wrote violation #0 of 3: 16236 bytes
02-23 22:19:19.453 1493-1519/system_process I/ActivityManager: Displayed com.google.android.gms/.common.account.AccountChipAccountPickerActivity: +58ms (total +70ms)
02-23 22:19:20.164 1493-1571/system_process D/TaskPersister: removeObsoleteFile: deleting file=135_task.xml
02-23 22:19:20.164 1493-1571/system_process D/TaskPersister: removeObsoleteFile: deleting file=135_task_thumbnail.png
02-23 22:19:21.876 1889-2478/com.google.android.gms.persistent W/Conscrypt: Could not set socket write timeout: null
02-23 22:19:21.911 1889-2478/com.google.android.gms.persistent W/Conscrypt: Could not set socket write timeout: null
02-23 22:19:22.311 1889-2478/com.google.android.gms.persistent W/GLSUser: [AppCertManager] IOException while requesting key:
java.io.IOException: Invalid device key response.
at enr.a(:com.google.android.gms:282)
at enr.a(:com.google.android.gms:4237)
at enq.a(:com.google.android.gms:46)
at enk.a(:com.google.android.gms:53)
at enj.a(:com.google.android.gms:111)
at com.google.android.gms.auth.account.be.legacy.AuthCronChimeraService.b(:com.google.android.gms:4052)
at dxg.call(:com.google.android.gms:2043)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at kzi.run(:com.google.android.gms:450)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at ldm.run(:com.google.android.gms:17)
at java.lang.Thread.run(Thread.java:818)
02-23 22:19:22.312 1889-2403/com.google.android.gms.persistent W/ContentTaskController: Invalid newTask was provided to startTracking.
all steps in my question were correct but i was missing one:
create an ID client OAuth 2.0 in google developer console with my SHA1 and package name.
EDIT:
after some testing API KEY isn't needed, only ID client OAuth 2.0

android.content.ActivityNotFoundException: No Activity found to handle Intent

I m a newbie to Android. I am trying to use google location API and when run in the emulator it shows Unfortunately your app stopped working.
I did a adb logcat and here is my stacktrace
10-31 23:43:02.010 2370 2370 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
10-31 23:43:02.011 2370 2370 D AndroidRuntime: CheckJNI is ON
10-31 23:43:02.026 2370 2370 I art : JIT created with code_cache_capacity=2MB compile_threshold=1000
10-31 23:43:02.030 2370 2370 D ICU : No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
10-31 23:43:02.044 2370 2370 E memtrack: Couldn't load memtrack module (No such file or directory)
10-31 23:43:02.044 2370 2370 E android.os.Debug: failed to load memtrack module: -2
10-31 23:43:02.045 2370 2370 I Radio-JNI: register_android_hardware_Radio DONE
10-31 23:43:02.062 2370 2370 D AndroidRuntime: Calling main entry com.android.commands.pm.Pm
10-31 23:43:02.073 2228 2240 I art : CollectorTransition marksweep + semispace GC freed 125(-7KB) AllocSpace objects, 0(0B) LOS objects, 57% free, 379KB/891KB, paused 5.591ms total 5.591ms
10-31 23:43:02.080 2228 2242 D DefContainer: Copying /data/local/tmp/HighwayMechanic.apk to base.apk
10-31 23:43:02.181 1138 1177 I PackageManager.DexOptimizer: Running dexopt (dex2oat) on: /data/app/vmdl931695514.tmp/base.apk pkg=com.highway.highwaymechanic isa=x86 vmSafeMode=false debuggable=true oatDir = /data/app/vmdl931695514.tmp/oat
10-31 23:43:02.190 2382 2382 W dex2oat : Unexpected CPU variant for X86 using defaults: x86
10-31 23:43:02.190 2382 2382 W dex2oat : Mismatch between dex2oat instruction set features (ISA: X86 Feature string: smp,-ssse3,-sse4.1,-sse4.2,-avx,-avx2) and those of dex2oat executable (ISA: X86 Feature string: smp,ssse3,-sse4.1,-sse4.2,-avx,-avx2) for the command line:
10-31 23:43:02.190 2382 2382 W dex2oat : /system/bin/dex2oat --zip-fd=6 --zip-location=base.apk --oat-fd=7 --oat-location=/data/app/vmdl931695514.tmp/oat/x86/base.odex --instruction-set=x86 --instruction-set-variant=x86 --instruction-set-features=default --runtime-arg -Xms64m --runtime-arg -Xmx512m --swap-fd=8 --debuggable
10-31 23:43:02.190 2382 2382 I dex2oat : /system/bin/dex2oat --debuggable
10-31 23:43:08.200 2382 2382 I dex2oat : dex2oat took 6.009s (threads: 1) arena alloc=2MB java alloc=6MB native alloc=32MB free=2MB
10-31 23:43:08.276 1138 1162 I ActivityManager: Force stopping com.highway.highwaymechanic appid=10053 user=-1: uninstall pkg
10-31 23:43:08.294 1138 1177 I PackageManager: Package com.highway.highwaymechanic codePath changed from /data/app/com.highway.highwaymechanic-2 to /data/app/com.highway.highwaymechanic-1; Retaining data and using new
10-31 23:43:08.295 1138 1162 I ActivityManager: Force stopping com.highway.highwaymechanic appid=10053 user=-1: replace pkg
10-31 23:43:08.296 1138 1177 W PackageManager: Code path for com.highway.highwaymechanic changing from /data/app/com.highway.highwaymechanic-2 to /data/app/com.highway.highwaymechanic-1
10-31 23:43:08.296 1138 1177 W PackageManager: Resource path for com.highway.highwaymechanic changing from /data/app/com.highway.highwaymechanic-2 to /data/app/com.highway.highwaymechanic-1
10-31 23:43:08.333 1138 1177 W Settings: Setting install_non_market_apps has moved from android.provider.Settings.Global to android.provider.Settings.Secure, returning read-only value.
10-31 23:43:08.333 1138 1177 I art : Starting a blocking GC Explicit
10-31 23:43:08.353 1138 1177 I art : Explicit concurrent mark sweep GC freed 10787(756KB) AllocSpace objects, 11(220KB) LOS objects, 19% free, 5MB/6MB, paused 517us total 13.651ms
10-31 23:43:08.357 1138 1177 W PackageManager: Couldn't remove dex file for package: at location /data/app/com.highway.highwaymechanic-2/base.apk, retcode=-1
10-31 23:43:08.359 1138 1177 I ActivityManager: Force stopping com.highway.highwaymechanic appid=10053 user=0: pkg removed
10-31 23:43:08.360 2370 2370 I art : System.exit called, status: 0
10-31 23:43:08.360 2370 2370 I AndroidRuntime: VM exiting with result code 0.
10-31 23:43:08.400 1138 1138 D JobSchedulerService: Receieved: android.intent.action.PACKAGE_REMOVED
10-31 23:43:08.403 1566 1566 D CarrierServiceBindHelper: Receive action: android.intent.action.PACKAGE_REMOVED
10-31 23:43:08.404 1566 1566 D CarrierServiceBindHelper: mHandler: 3
10-31 23:43:08.404 1138 1255 I InputReader: Reconfiguring input devices. changes=0x00000010
10-31 23:43:08.414 1925 1925 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1221 android.content.ContextWrapper.startService:581 android.content.ContextWrapper.startService:581 com.android.keychain.KeyChainBroadcastReceiver.onReceive:12 android.app.ActivityThread.handleReceiver:2725
10-31 23:43:08.418 1138 1641 I BroadcastQueue: Delay finish: com.android.keychain/.KeyChainBroadcastReceiver
10-31 23:43:08.514 1138 1255 I InputReader: Reconfiguring input devices. changes=0x00000010
10-31 23:43:08.515 1138 2212 I BroadcastQueue: Resuming delayed broadcast
10-31 23:43:08.516 1566 1566 D CarrierServiceBindHelper: Receive action: android.intent.action.PACKAGE_ADDED
10-31 23:43:08.516 1566 1566 D CarrierServiceBindHelper: mHandler: 3
10-31 23:43:08.602 1138 1255 I InputReader: Reconfiguring input devices. changes=0x00000010
10-31 23:43:08.602 1566 1566 D CarrierServiceBindHelper: Receive action: android.intent.action.PACKAGE_REPLACED
10-31 23:43:08.602 1566 1566 D CarrierServiceBindHelper: mHandler: 3
10-31 23:43:08.602 1566 1566 D CarrierConfigLoader: mHandler: 9 phoneId: 0
10-31 23:43:08.617 2390 2390 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
10-31 23:43:08.619 2390 2390 D AndroidRuntime: CheckJNI is ON
10-31 23:43:08.635 2390 2390 I art : JIT created with code_cache_capacity=2MB compile_threshold=1000
10-31 23:43:08.640 2390 2390 D ICU : No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
10-31 23:43:08.654 2390 2390 E memtrack: Couldn't load memtrack module (No such file or directory)
10-31 23:43:08.654 2390 2390 E android.os.Debug: failed to load memtrack module: -2
10-31 23:43:08.655 2390 2390 I Radio-JNI: register_android_hardware_Radio DONE
10-31 23:43:08.667 2390 2390 D AndroidRuntime: Calling main entry com.android.commands.am.Am
10-31 23:43:08.669 1138 2212 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.highway.highwaymechanic/.MainActivity} from uid 0 on display 0
10-31 23:43:08.691 2390 2390 D AndroidRuntime: Shutting down VM
10-31 23:43:08.695 2390 2395 I art : Debugger is no longer active
10-31 23:43:08.695 2390 2401 E art : Thread attaching while runtime is shutting down: Binder_2
10-31 23:43:08.695 2390 2401 I AndroidRuntime: NOTE: attach of thread 'Binder_2' failed
10-31 23:43:08.697 2402 2402 I art : Not late-enabling -Xcheck:jni (already on)
10-31 23:43:08.697 2402 2402 I art : Late-enabling JIT
10-31 23:43:08.702 2402 2402 I art : JIT created with code_cache_capacity=2MB compile_threshold=1000
10-31 23:43:08.708 1138 1712 I ActivityManager: Start proc 2402:com.highway.highwaymechanic/u0a53 for activity com.highway.highwaymechanic/.MainActivity
10-31 23:43:08.717 2402 2409 E art : Failed sending reply to debugger: Broken pipe
10-31 23:43:08.717 2402 2409 I art : Debugger is no longer active
10-31 23:43:08.728 2402 2402 W System : ClassLoader referenced unknown path: /data/app/com.highway.highwaymechanic-1/lib/x86
10-31 23:43:08.747 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.747 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.747 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.747 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.748 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.748 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.755 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.755 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.755 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.764 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.764 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.797 2402 2402 D gralloc_goldfish: Emulator without GPU emulation detected.
10-31 23:43:08.818 1138 1170 I ActivityManager: Displayed com.highway.highwaymechanic/.MainActivity: +129ms
10-31 23:43:10.932 1138 1429 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=market://details?id=com.google.android.gms&pcampaignid=gcore_8115000--- flg=0x80000 pkg=com.android.vending} from uid 10053 on display 0
10-31 23:43:10.933 2402 2402 D AndroidRuntime: Shutting down VM
10-31 23:43:10.933 2402 2402 E AndroidRuntime: FATAL EXCEPTION: main
10-31 23:43:10.933 2402 2402 E AndroidRuntime: Process: com.highway.highwaymechanic, PID: 2402
10-31 23:43:10.933 2402 2402 E AndroidRuntime: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=market://details?id=com.google.android.gms&pcampaignid=gcore_8115000--- flg=0x80000 pkg=com.android.vending }
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1798)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.app.Instrumentation.execStartActivity(Instrumentation.java:1512)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.app.Activity.startActivityForResult(Activity.java:3917)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.app.Activity.startActivityForResult(Activity.java:3877)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:748)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.app.Activity.startActivity(Activity.java:4200)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.app.Activity.startActivity(Activity.java:4168)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at com.google.android.gms.dynamic.zza$5.onClick(Unknown Source)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.view.View.performClick(View.java:5198)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.view.View$PerformClick.run(View.java:21147)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:739)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
10-31 23:43:10.934 1138 1712 W ActivityManager: Force finishing activity com.highway.highwaymechanic/.MainActivity
10-31 23:43:10.935 943 943 D gralloc : Registering a buffer in the process that created it. This may cause memory ordering problems.
10-31 23:43:10.935 943 943 E libEGL : called unimplemented OpenGL ES API
10-31 23:43:10.935 943 943 E SurfaceFlinger: glCheckFramebufferStatusOES error 1711643839
10-31 23:43:10.935 943 943 E SurfaceFlinger: got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
10-31 23:43:11.448 1138 1162 W ActivityManager: Activity pause timeout for ActivityRecord{40e8f1c u0 com.highway.highwaymechanic/.MainActivity t11 f}
10-31 23:43:21.478 1138 1162 W ActivityManager: Activity destroy timeout for ActivityRecord{40e8f1c u0 com.highway.highwaymechanic/.MainActivity t11 f}
Here is my Android_manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.highway.highwaymechanic"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="23" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.highway.highwaymechanic.Map"
android:label="#string/title_activity_map" >
</activity>
</application>
</manifest>
Here is my MainActivity.java file
package com.highway.highwaymechanic;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.Menu;
import android.view.MenuItem;
public class MainActivity extends FragmentActivity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
#Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
#Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
Here is my MapsActivity.java file
package com.highway.highwaymechanic;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;
public class MapsActivity extends FragmentActivity implements OnMapReadyCallback {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_map);
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
#Override
public void onMapReady(GoogleMap map) {
LatLng sydney = new LatLng(-34, 151);
map.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney"));
map.moveCamera(CameraUpdateFactory.newLatLng(sydney));
}
}
When run in the emulator it crashes with Unfortunately the app stopped working.
Please help me with it.
Thanks in Advance
I believe this should have been fixed with the latest release of the Google Play services client library. Note that this is a fix in the client library and so you will have to update the library to the latest revision using your SDK manager and recompile your application.
for more details you can check this link
https://code.google.com/p/gmaps-api-issues/issues/detail?id=4862
Do you have an another Activity named Map? As I see in your manifest,
<activity
android:name="com.highway.highwaymechanic.Map"
android:label="#string/title_activity_map" >
</activity>
Likewise, there should be a similar tag for the MapsActivity in your manifest. I think this is the error.
it bugs out much sooner, missing some native assembly for x86 architecture:
W System: ClassLoader referenced unknown path: /data/app/com.highway.highwaymechanic-1/lib/x86
followed by:
W GooglePlayServicesUtil: Google Play services is missing.
To add the missing Google Play (incl. Maps) Services, wrote a how-to once (it's almost the same).
While that FragmentActivity requires an IntentFilter, else it cannot be launched, for example:
<activity
android:name=".MapsActivity"
android:label="#string/title_activity_map">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
</intent-filter>
</activity>

InApp Billing: Caller uid is different

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.

Categories

Resources