0

So I added this functionality of reading filesystem. When I debugged it on my android, there was a NullPointerException, so after some googling (on StackOverflow) I found that I need to add permission to the manifest file. After doing this, I rebuilt it many times, but it seems that after running it on my phone, it was not properly updated, because the NPE persisted. that's why I decided to manually (using Samsung's option ) uninstall it, hoping it will be reinstalled by Android Studio.

Sadly after that action, I cannot run this application anymore.

Default Activity not found

I don't see this application in apps list neither in main menu. I tried also

adb install ...pathtoapk...

But it says it is already installed

adb -r install ...pathtoapk...

Also does not work, says it is installed correctly, but app is still not visible neither in menu nor app list

pawel_j
  • 419
  • 4
  • 14
  • I restarted my computer and phone many times. – pawel_j Sep 25 '19 at 17:59
  • Possible duplicate of [Error: Default Activity Not Found](https://stackoverflow.com/questions/15825081/error-default-activity-not-found) – Martin Zeitler Sep 25 '19 at 18:01
  • 1
    Besides, adding the permission into `AndroidManifest.xml` (which you might have corrupted, when editing it) is not enough, these have to be requested at run-time, since Marshmallow. Without some default `Activity`, there might be no launcher icon in the app drawer. – Martin Zeitler Sep 25 '19 at 18:04

1 Answers1

0

if the error is Default Activity not found then you have to add this code in your launcher activity (whatever activity is launching first)

        `<intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>`

Or if problem is with permissions then use Dexter library or if still there is an error then share your logcat

Sayed Talha
  • 119
  • 8
  • I have these line in manifest. I just created another application and installed it and ran using Android Studio. Then I uninstalled it from Android level, and now I cannot install it again. This is repeatable. – pawel_j Oct 30 '19 at 18:38