4

Since I've updated Android Studio from 1.5 to 2.1 I've been getting the following error a lot of times (not always). This is the output from the "Run" dialog:

05/04 10:15:14: Launching app 
$ adb push C:\Users\Sition\AndroidStudioProjects\DigginTemp\app\build\outputs\apk\app-debug.apk /data/local/tmp/com.example.sition.diggintemp
$ adb shell pm install -r "/data/local/tmp/com.example.sition.diggintemp"
pkg: /data/local/tmp/com.example.sition.diggintemp
Success

$ adb shell am start -n "com.example.sition.diggintemp/com.example.sition.diggintemp.StartActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Unexpected error while executing: am start -n "com.example.sition.diggintemp/com.example.sition.diggintemp.StartActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Error while Launching activity

But strangely enough there is nothing to be found in the logcat. I really don't know what causes this, since the error doesn't tell much about what's going wrong excep for that the launching of the StartActivity goes wrong (which I've changed barely or even not at all since the update).

My Manifest file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.sition.diggintemp"
    android:versionCode="5"
    android:versionName="0.2">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.RECORD_VIDEO" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />

    <uses-feature android:name="android.hardware.camera" />
    <uses-feature android:name="android.hardware.camera.autofocus" />

    <application
        android:name=".misc.AppController"
        android:allowBackup="true"
        android:fullBackupContent="true"
        android:icon="@drawable/app_icon"
        android:label="@string/app_name"
        android:largeHeap="true"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".StartActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".MainActivity"
            android:configChanges="keyboardHidden|orientation|screenSize" />
        <activity android:name=".LoginActivity" />
        <activity
            android:name=".LoadActivity"
            android:configChanges="keyboardHidden|orientation|screenSize" />
        <activity android:name=".ProjectOverviewActivity" />
        <activity android:name=".CameraActivity" />
        <activity android:name=".VideoActivity" />
    </application>

</manifest>

Does someone know how to solve this?

EDIT:

After I removed the filter from logcat I got some output, this is one part:

05-04 11:59:57.585 540-1126/? D/dalvikvm: GC_EXPLICIT freed 249K, 17% free 67587K/80892K, paused 8ms+53ms, total 657ms
05-04 11:59:57.984 3427-3427/? I/dalvikvm: Turning on JNI app bug workarounds for target SDK version 8...
05-04 11:59:58.273 540-744/? W/LicenseLogService: log() is called by non admin
05-04 11:59:58.281 540-744/? W/LicenseLogService: log() is called by non admin
05-04 11:59:58.289 540-652/? D/ECS_EnterpriseContainerService: <<< Intent action is >>> : android.intent.action.PACKAGE_ADDED
05-04 11:59:58.289 540-652/? D/ECS_EnterpriseContainerService: <<< Intent data is   >>> : package:com.example.sition.diggintemp
05-04 11:59:58.289 540-652/? I/ECS_EnterpriseContainerService: Inside package added listener
05-04 11:59:58.296 540-652/? I/Monitor: SIOP:: Current AP = 0, CP = 0, PST = 300
05-04 11:59:58.296 540-652/? D/BatteryService: Sending ACTION_BATTERY_CHANGED.
05-04 11:59:58.304 786-786/? D/STATUSBAR-BatteryController: onReceive() - ACTION_BATTERY_CHANGED
05-04 11:59:58.304 786-786/? D/STATUSBAR-BatteryController: onReceive() - BATTERY_STATUS_FULL:
05-04 11:59:58.312 25355-25355/? V/CircleBatteryWidget: Valeur recuperee a partir de l'intent
05-04 11:59:58.312 25355-25355/? V/CircleBatteryWidget: Valeur recuperee : 100
05-04 11:59:58.429 3308-3308/? I/BaseStore: ConfigStore database version: 1
05-04 11:59:58.445 540-689/? W/Resources: Converting to string: TypedValue{t=0x12/d=0xffffffff a=-1}
05-04 11:59:58.734 786-786/? D/STATUSBAR-PhoneStatusBar:  mBrightnessEnablebySettings = true mBrightnessEnablebyBattery = true mBrightnessEnablebyDisableFlag = true
05-04 11:59:58.820 25355-25355/? V/CircleBatteryWidget: Widget W :108
05-04 11:59:58.820 25355-25355/? V/CircleBatteryWidget: Widget H :108
05-04 11:59:58.820 25355-25355/? V/CircleBatteryWidget: Bitmap W :108
05-04 11:59:58.820 25355-25355/? V/CircleBatteryWidget: Bitmap H :108
05-04 11:59:58.992 3308-3308/? I/dalvikvm: Could not find method android.database.Cursor.getNotificationUri, referenced from method com.google.android.music.utils.ColumnIndexableCursor.getNotificationUri
05-04 11:59:58.992 3308-3308/? W/dalvikvm: VFY: unable to resolve interface method 931: Landroid/database/Cursor;.getNotificationUri ()Landroid/net/Uri;
05-04 11:59:58.992 3308-3308/? D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
05-04 11:59:59.101 3427-3427/? I/PCWCLIENTTRACE_LOG: DEFAULT_LOGON : true
05-04 11:59:59.101 3427-3427/? I/PCWCLIENTTRACE_LOG: DEFAULT_LOGLEVEL : 3
05-04 11:59:59.101 3427-3427/? I/PCWCLIENTTRACE_PushUtil: SPPPushClient is installed : true
05-04 11:59:59.101 3427-3427/? I/PCWCLIENTTRACE_PushUtil: sales region : global
05-04 11:59:59.109 3427-3427/? I/PCWCLIENTTRACE_PushUtil: getPushTypeList : [SPP, GCM]
05-04 11:59:59.109 3427-3427/? I/PCWCLIENTTRACE_SYSTEMReceiver: [onReceive] - android.intent.action.PACKAGE_ADDED
05-04 11:59:59.203 3308-3308/? I/dalvikvm: Could not find method android.database.Cursor.setExtras, referenced from method com.google.android.music.utils.ColumnIndexableCursor.setExtras
05-04 11:59:59.203 3308-3308/? W/dalvikvm: VFY: unable to resolve interface method 953: Landroid/database/Cursor;.setExtras (Landroid/os/Bundle;)V
05-04 11:59:59.203 3308-3308/? D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
05-04 11:59:59.203 3308-3308/? I/dalvikvm: Could not find method android.database.Cursor.setExtras, referenced from method com.google.android.music.utils.ColumnIndexableCursor.setExtrasInternal
05-04 11:59:59.203 3308-3308/? W/dalvikvm: VFY: unable to resolve interface method 953: Landroid/database/Cursor;.setExtras (Landroid/os/Bundle;)V

Here is another part:

05-04 12:00:01.664 3440-3440/? D/Spen: SpenSdk jar version = 55
05-04 12:00:01.664 3440-3440/? D/Spen: You SHOULD INSTALL SpenSdk apk file !!!!
05-04 12:00:01.664 3440-3440/? W/System.err: com.samsung.android.sdk.SsdkUnsupportedException: SpenSdk apk is not installed.
05-04 12:00:01.828 3440-3440/? W/System.err:     at com.samsung.android.sdk.pen.Spen.initialize(Spen.java:202)
05-04 12:00:01.828 3440-3440/? W/System.err:     at com.samsung.android.sdk.pen.Spen.initialize(Spen.java:114)
05-04 12:00:01.828 3440-3440/? W/System.err:     at com.sec.samsung.gallery.app.imagenote.photonote.NoteSpenSurfaceView.initializeSPenSDK(NoteSpenSurfaceView.java:118)
05-04 12:00:01.835 3440-3440/? W/System.err:     at com.sec.samsung.gallery.app.imagenote.photonote.PhotoNoteUtils.isSpenSdk30Supported(PhotoNoteUtils.java:56)
05-04 12:00:01.835 3440-3440/? W/System.err:     at com.sec.android.gallery3d.util.GalleryFeature.checkEnableNote(GalleryFeature.java:1546)
05-04 12:00:01.835 3440-3440/? W/System.err:     at com.sec.android.gallery3d.util.GalleryFeature.init(GalleryFeature.java:428)
05-04 12:00:01.835 3440-3440/? W/System.err:     at com.sec.android.gallery3d.app.GalleryAppImpl.getDataManager(GalleryAppImpl.java:229)
05-04 12:00:01.835 3440-3440/? W/System.err:     at com.sec.android.gallery3d.provider.GalleryProvider.onCreate(GalleryProvider.java:126)
05-04 12:00:01.835 3440-3440/? W/System.err:     at android.content.ContentProvider.attachInfo(ContentProvider.java:1058)
05-04 12:00:01.835 3440-3440/? W/System.err:     at android.app.ActivityThread.installProvider(ActivityThread.java:5067)
05-04 12:00:01.835 3440-3440/? W/System.err:     at android.app.ActivityThread.installContentProviders(ActivityThread.java:4679)
05-04 12:00:01.835 3440-3440/? W/System.err:     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4592)
05-04 12:00:01.835 3440-3440/? W/System.err:     at android.app.ActivityThread.access$1400(ActivityThread.java:158)
05-04 12:00:01.835 3440-3440/? W/System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1356)
05-04 12:00:01.835 3440-3440/? W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:99)
05-04 12:00:01.835 3440-3440/? W/System.err:     at android.os.Looper.loop(Looper.java:176)
05-04 12:00:01.843 3440-3440/? W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:5365)
05-04 12:00:01.843 3440-3440/? W/System.err:     at java.lang.reflect.Method.invokeNative(Native Method)
05-04 12:00:01.843 3440-3440/? W/System.err:     at java.lang.reflect.Method.invoke(Method.java:511)
05-04 12:00:01.851 3440-3440/? W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
05-04 12:00:01.851 3440-3440/? W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
05-04 12:00:01.851 3440-3440/? W/System.err:     at dalvik.system.NativeStart.main(Native Method)

And another part:

05-04 12:00:06.429 3487-3487/? I/SA: [DM] init START
05-04 12:00:06.437 3487-3487/? I/SA: [DM] This device is not a Vodafone
05-04 12:00:06.460 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060000 (t=5 e=0) in package 0 (error -75)
05-04 12:00:06.460 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060001 (t=5 e=1) in package 0 (error -75)
05-04 12:00:06.460 3487-3487/? W/ResourceType: No package identifier when getting value for resource number 0x00000000
05-04 12:00:06.468 3487-3487/? W/ResourceType: No package identifier when getting value for resource number 0x00000000
05-04 12:00:06.468 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060003 (t=5 e=3) in package 0 (error -75)
05-04 12:00:06.468 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060004 (t=5 e=4) in package 0 (error -75)
05-04 12:00:06.468 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060005 (t=5 e=5) in package 0 (error -75)
05-04 12:00:06.468 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060006 (t=5 e=6) in package 0 (error -75)
05-04 12:00:06.468 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060007 (t=5 e=7) in package 0 (error -75)
05-04 12:00:06.468 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060008 (t=5 e=8) in package 0 (error -75)
05-04 12:00:06.476 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060009 (t=5 e=9) in package 0 (error -75)
05-04 12:00:06.476 3487-3487/? W/ResourceType: Failure getting entry for 0x7f06000a (t=5 e=10) in package 0 (error -75)
05-04 12:00:06.476 3487-3487/? W/ResourceType: Failure getting entry for 0x7f06000d (t=5 e=13) in package 0 (error -75)
05-04 12:00:06.476 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060012 (t=5 e=18) in package 0 (error -75)
05-04 12:00:06.484 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060013 (t=5 e=19) in package 0 (error -75)
05-04 12:00:06.484 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060014 (t=5 e=20) in package 0 (error -75)
05-04 12:00:06.484 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060015 (t=5 e=21) in package 0 (error -75)
05-04 12:00:06.484 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060016 (t=5 e=22) in package 0 (error -75)
05-04 12:00:06.484 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060017 (t=5 e=23) in package 0 (error -75)
05-04 12:00:06.492 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060018 (t=5 e=24) in package 0 (error -75)
05-04 12:00:06.492 3487-3487/? W/ResourceType: No package identifier when getting value for resource number 0x00000000
05-04 12:00:06.500 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060019 (t=5 e=25) in package 0 (error -75)
05-04 12:00:06.500 3487-3487/? W/ResourceType: No package identifier when getting value for resource number 0x00000000
05-04 12:00:06.500 3487-3487/? W/ResourceType: Failure getting entry for 0x7f06001a (t=5 e=26) in package 0 (error -75)
05-04 12:00:06.500 3487-3487/? W/ResourceType: Failure getting entry for 0x7f06001b (t=5 e=27) in package 0 (error -75)
05-04 12:00:06.507 3487-3487/? W/ResourceType: Failure getting entry for 0x7f06001d (t=5 e=29) in package 0 (error -75)
05-04 12:00:06.507 3487-3487/? W/ResourceType: Failure getting entry for 0x7f06001e (t=5 e=30) in package 0 (error -75)
05-04 12:00:06.507 3487-3487/? W/ResourceType: Failure getting entry for 0x7f06001f (t=5 e=31) in package 0 (error -75)
05-04 12:00:06.507 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060020 (t=5 e=32) in package 0 (error -75)
05-04 12:00:06.507 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060022 (t=5 e=34) in package 0 (error -75)
05-04 12:00:06.507 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060023 (t=5 e=35) in package 0 (error -75)
05-04 12:00:06.515 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060025 (t=5 e=37) in package 0 (error -75)
05-04 12:00:06.515 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060026 (t=5 e=38) in package 0 (error -75)
05-04 12:00:06.515 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060027 (t=5 e=39) in package 0 (error -75)
05-04 12:00:06.523 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060028 (t=5 e=40) in package 0 (error -75)
05-04 12:00:06.523 3487-3487/? W/ResourceType: Failure getting entry for 0x7f06002a (t=5 e=42) in package 0 (error -75)
05-04 12:00:06.523 3487-3487/? W/ResourceType: Failure getting entry for 0x7f06002c (t=5 e=44) in package 0 (error -75)
05-04 12:00:06.523 3487-3487/? W/ResourceType: Failure getting entry for 0x7f06002b (t=5 e=43) in package 0 (error -75)
05-04 12:00:06.523 3487-3487/? W/ResourceType: Failure getting entry for 0x7f06002d (t=5 e=45) in package 0 (error -75)
05-04 12:00:06.531 3487-3487/? W/ResourceType: Failure getting entry for 0x7f06002f (t=5 e=47) in package 0 (error -75)
05-04 12:00:06.531 3487-3487/? W/ResourceType: Failure getting entry for 0x7f06002e (t=5 e=46) in package 0 (error -75)
05-04 12:00:06.531 3487-3487/? W/ResourceType: Failure getting entry for 0x7f060031 (t=5 e=49) in package 0 (error -75)
05-04 12:00:06.578 3487-3487/? I/SA: support phone number id : true
05-04 12:00:06.578 3487-3487/? I/SA: [DM] Supports Ref Jpn : false
05-04 12:00:06.578 3487-3487/? I/SA: [DM] init END

I'm not really sure how to fix it (I will look into it)

12
  • added <intent-filter> in Manifest
    – Gaurav
    Commented May 4, 2016 at 8:24
  • @Gaurav, there is one, I'll add the manifest to the post Commented May 4, 2016 at 8:25
  • Try to clear project and remove app from device in which you are running. some time it happens Commented May 4, 2016 at 8:27
  • its all OK in manifest try to restart adb
    – Gaurav
    Commented May 4, 2016 at 8:28
  • 1
    tried completely unfiltered logcat, e.g. $ adb logcat? AS doesn't show some things like the system's processes that start the apps.
    – zapl
    Commented May 4, 2016 at 8:46

5 Answers 5

1

Not sure but you may try disabling "instant run". To disable "instant run", you can go to Preference Dialog ( May be Setting dialog on Windows), then select "Build, Execution, Deployment" --> "Instant Run", and uncheck all the checkbox to disable "Instant Run".

1
  • Thanks, but I had already done that and it didn't work (it's still off though) Commented May 4, 2016 at 8:28
1

You can resolve your issue by restarting android studio as mentioned here

Sometimes run again (more than once) is working fine in my case and then other subsequent runs successfully.

4
  • Restarting Android Studio/Syncing Gradle both didn't solve the problem, I'd also like to mention that I haven't made changes to my package name and that this problem doesn't occur every time, but it started when I updated from Android Studio 1.5 to 2.1, not sure if this information is of any help, but I thought I'll tell it anyway. Commented May 9, 2016 at 7:12
  • @Dennis van Opstal Please check my edited answer. It may help you.
    – Smeet
    Commented May 9, 2016 at 7:17
  • When I run the application multiple times it does eventually work, but when I try to run it again later I'm having the same problem and then again I need to run it multiple times before it works, so running more than once makes it work for that moment (which I found out before posting this question, that is also the reason why I say it doesn't happen all the time), but I was hoping to find a solution that solves the problem in such a way that I can Run the app in one go instead of having to run it multiple times. Commented May 9, 2016 at 7:33
  • @Dennis van Opstal I am facing the same issue but not all the time. Still does not find exact solution that work all the time
    – Smeet
    Commented May 9, 2016 at 8:19
1

I thnk this problem is a bug with the latest update version of android studio, I encountered same problems and none of the above was the solution, the only thing that worked sometimes from all that was said above was if you "Sync Project with Gradle Files" first before running but you have to do this over and over again. For me, what worked always is to run the program and after it has installed the apk and gives the error of launching the activity, ignore the error and go directly to your emulator, find your project/app icon and tap or launch it directly, it will launch normally with all the changes you have made. This might be a workaround but it delivers the results

0

There are some devices which just deactivate the app instead of removing it and you have to take an extra step in settings to do this (e.g. Samsumg Galaxy S6) so maybe take a closer look.

I got the same error one day before and tried for an hour before I recognized...

4
  • I use a Samsung Galaxy S3 Mini and I deleted the app by going to settings>application manager>"name of the app" and press the "delete" button, what else do I need to do then? Commented May 4, 2016 at 8:42
  • 1
    Okay as I remember S3 Mini -> menu button in home screen -> uninstall -> pressing minus above app... Maybe try restarting your device and also try adb shell pm clear <package_name>
    – David
    Commented May 4, 2016 at 8:47
  • You were right about how to delete it, but when I put it back on my device I got the same error Commented May 4, 2016 at 8:56
  • Okay what you could try is reinstalling your adb drivers ... Everything else looks okay I think
    – David
    Commented May 4, 2016 at 9:00
0

For me was the solution to click the "Sync Project with Gradle Files" button, as described here: https://stackoverflow.com/a/29652750/3906364

1
  • I have synced my project (multiple times), but that also didn't do it. Commented May 9, 2016 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.