0

This error keeps comes on my phone but it did not come before,I saw all the stack overflow methods but non of them could help me.

I get this error when I test the app from android studio to my phone.I tried on other phones too but still the problem exist.

This is my manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="my.patel.pritesh.smstimer">

    <uses-permission android:name="android.permission.SEND_SMS" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/sms_timer"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />

        <activity
            android:name=".Time_Picker"
            android:theme="@style/AppTheme.NoActionBar" />

        <receiver
            android:name=".MyReceiver"
            android:enabled="true"
            android:excludeFromRecents="true"
            android:exported="true"
            android:process="remote"
            android:taskAffinity="">
            <intent-filter>
                <action android:name="SEND" />
            </intent-filter>
        </receiver>
        <receiver
            android:name=".NotificationReciever"
            android:enabled="true"
            android:exported="true">
            <intent-filter>
                <action android:name="notification" />
            </intent-filter>
        </receiver>
        <receiver
            android:name=".deliveryReciever"
            android:enabled="true"
            android:exported="true">
            <intent-filter>
                <action android:name="notification_delivered" />
            </intent-filter>
        </receiver>

        <activity android:name=".sms_list">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".sms_review" />

        <service
            android:name=".alarmService"
            android:enabled="true"
            android:exported="true"></service>
    </application>

</manifest>

This error comes in the run tab:

Unexpected error while executing: am start -n "my.patel.pritesh.smstimer/my.patel.pritesh.smstimer.sms_list" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER

Error while Launching activity

Pritesh
  • 139
  • 2
  • 12

2 Answers2

0

Main tag of manifest file must be manifest. Instead of xml tag, write something like:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="org.dummy"
    android:versionCode="100"
    android:versionName="1.0.0" >

<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
    android:allowBackup="true"
    android:icon="@drawable/sms_timer"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">

   ...
</application>

</manifest>
xcesco
  • 4,690
  • 4
  • 34
  • 65
0

As you are using Android Studio, I believe that you are likely have the problem mentioned in this question, and as mentioned here in the answer this error happens when you change the build version for your project (like downgrading or upgrading):

I've been working on this same exact problem for the last 8 hours...you've had no issues after rolling back from 2.0 to 1.5.1?

I've noticed that, even with the error, running the app works fine sometimes.

so you have to make sure that there is no problem with the new release you are using, then you have to clean and rebuild your project again like mentioned here.


Or you can use the following hint from this answer:

Remove the .idea folder and gradle folder, then click button sync project with gradle gradle files, after this process finished, you are able to run your app as normal.

Community
  • 1
  • 1
Muhammed Refaat
  • 8,914
  • 14
  • 83
  • 118