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

2
  • what is the error? post your locat
    – Onkar Nene
    Jul 11, 2016 at 14:30
  • these is no error in logcat just it shows there is a problem parsing the package on my phone
    – Pritesh
    Jul 11, 2016 at 14:33

2 Answers 2

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>
5
  • so do you mean I should remove the xml tag on top?
    – Pritesh
    Jul 11, 2016 at 14:38
  • What's exactly the error on logcat? In your manifest i didn't see manifest tag. Do you have it?
    – xcesco
    Jul 11, 2016 at 14:46
  • I added the whole manifest file,I cant understand about the manifest tab.The tag<manifest> is there
    – Pritesh
    Jul 11, 2016 at 14:48
  • I just noticed there is an error showing cannot resolver getDefaultProguardFile.How do i fix that.
    – Pritesh
    Jul 11, 2016 at 14:53
  • Are you using proguard? Are you building debug version or release version of you apk? Try in debug flavor without proguard.
    – xcesco
    Jul 11, 2016 at 15:02
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.

0

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.