Ошибка привязки ресурсов Android Android Studio 3.3.1

Я пытаюсь сгенерировать APK из исходного кода и получаю следующие ошибки.

F:\breeze-2019-3-14\app\build\intermediates\merged_manifests\debug\AndroidManifest.xml:88: error: unexpected element <action> found in <manifest><application><activity>.
F:\breeze-2019-3-14\app\build\intermediates\merged_manifests\debug\AndroidManifest.xml:90: error: unexpected element <category> found in <manifest><application><activity>.

Мой файл манифеста, как показано ниже

<?xml version = "1.0" encoding = "utf-8" standalone = "no"?>
<manifest xmlns:android = "http://schemas.android.com/apk/res/android"
    xmlns:tools = "http://schemas.android.com/tools"
    package = "com.zaravoipcall.breeze">

    <supports-screens
        android:anyDensity = "true"
        android:largeScreens = "true"
        android:normalScreens = "true"
        android:smallScreens = "true" />


    <uses-permission android:name = "android.permission.INTERNET" />
    <uses-permission android:name = "android.permission.RECORD_AUDIO" />
    <uses-permission android:name = "android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name = "android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name = "android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name = "android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name = "android.permission.CHANGE_WIFI_STATE" />
    <uses-permission android:name = "android.permission.WRITE_CONTACTS" />
    <uses-permission android:name = "android.permission.VIBRATE" />
    <uses-permission android:name = "android.permission.PROCESS_OUTGOING_CALLS" />
    <uses-permission android:name = "android.permission.CALL_PHONE" />
    <uses-permission android:name = "android.permission.READ_PHONE_STATE" />
    <uses-permission android:name = "android.permission.WRITE_SETTINGS" />
    <uses-permission android:name = "android.permission.BROADCAST_STICKY" />
    <uses-permission android:name = "android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name = "android.permission.GET_ACCOUNTS" />
    <uses-permission android:name = "android.permission.WAKE_LOCK" />
    <uses-permission android:name = "com.google.android.c2dm.permission.RECEIVE" />

    <permission
        android:name = "com.zaravoipcall.breeze.permission.C2D_MESSAGE"
        android:protectionLevel = "signature" />

    <permission android:name = "com.ipsmarx.dialer.MsgDBProvider"
        android:protectionLevel = "signature" />

    <uses-permission android:name = "com.zaravoipcall.breeze.permission.C2D_MESSAGE" />

    <uses-feature
        android:name = "android.hardware.sip.voip"
        android:required = "false" />
    <uses-feature
        android:name = "android.hardware.wifi"
        android:required = "true" />
    <uses-feature
        android:name = "android.hardware.microphone"
        android:required = "true" />
    <uses-feature
        android:name = "android.hardware.telephony"
        android:required = "false" />
    <uses-feature
        android:name = "android.hardware.screen.portrait"
        android:required = "false" />
    <uses-feature android:name = "android.hardware.camera" />
    <uses-feature android:name = "android.hardware.camera.autofocus" />

    <uses-permission android:name = "android.permission.CAMERA" />
    <uses-permission android:name = "android.permission.USE_CREDENTIALS" />

    <uses-feature
        android:glEsVersion = "0x00020000"
        android:required = "true" />
    <uses-permission android:name = "android.permission.READ_EXTERNAL_STORAGE" />


    <application
        android:name = "com.ipsmarx.dialer.MyApplication"
        android:allowBackup = "true"
        android:configChanges = "keyboardHidden|orientation"
        android:hardwareAccelerated = "true"
        android:icon = "@drawable/ic_launcher"
        android:label = "@string/app_name"
        android:screenOrientation = "portrait"
        android:theme = "@style/AppBaseTheme">
        <activity
            android:name = "com.ipsmarx.newdesign.LoginActivity"
            android:configChanges = "keyboardHidden|orientation"
            android:label = "@string/app_display_name"
            android:launchMode = "singleTask"
            android:screenOrientation = "portrait">
            <action android:name = "com.google.android.gms.actions.SEARCH_ACTION" />
            <category android:name = "android.intent.category.DEFAULT" />
        </activity>
        <receiver
            android:name = "com.ipsmarx.newdesign.OutgoingCall"
            android:enabled = "false">
            <intent-filter>
                <action android:name = "android.intent.action.NEW_OUTGOING_CALL" />
            </intent-filter>
        </receiver>

        <activity
            android:name = "com.ipsmarx.newdesign.Splashscreen"
            android:configChanges = "keyboardHidden|orientation"
            android:label = "@string/app_display_name"
            android:launchMode = "singleTask"
            android:screenOrientation = "portrait">
            <intent-filter>
                <action android:name = "android.intent.action.VIEW" />
                <category android:name = "android.intent.category.DEFAULT" />
                <category android:name = "android.intent.category.BROWSABLE" />
            </intent-filter>
            <intent-filter>
                <action android:name = "android.intent.action.MAIN" />
                <category android:name = "android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name = "com.ipsmarx.newdesign.ModeSelectDialog"
            android:allowTaskReparenting = "false"
            android:configChanges = "orientation"
            android:excludeFromRecents = "true"
            android:launchMode = "singleTask" />
        <activity
            android:name = "com.ipsmarx.dialer.ConnectedCall"
            android:configChanges = "keyboardHidden|orientation"
            android:excludeFromRecents = "true"
            android:launchMode = "singleTask"
            android:screenOrientation = "portrait"
            android:windowSoftInputMode = "stateHidden">
            <intent-filter android:priority = "1000">
                <action android:name = "android.bluetooth.headset.action.VENDOR_SPECIFIC_HEADSET_EVENT" />
                <action android:name = "android.intent.action.VOICE_COMMAND" />
                <action android:name = "android.intent.action.CALL_BUTTON" />
            </intent-filter>
        </activity>
        <activity
            android:name = "com.ipsmarx.newdesign.Tabbar"
            android:label = "@string/login"
            android:launchMode = "singleTask"
            android:screenOrientation = "portrait"
            android:windowSoftInputMode = "stateHidden">
            <intent-filter>
                <action android:name = "android.intent.action.VIEW" />
                <category android:name = "android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity
            android:name = "com.ipsmarx.contactslist.ui.ContactDetailActivity"
            android:label = "Contact Details"
            android:screenOrientation = "portrait" />
        <activity
            android:name = "com.ipsmarx.contactslist.ui.ComposeActivity"
            android:label = "Compose Invite"
            android:screenOrientation = "portrait" />

        <receiver android:name = "com.ipsmarx.dialer.Receiver">
            <intent-filter>
                <action android:name = "android.net.conn.CONNECTIVITY_CHANGE" />
            </intent-filter>
        </receiver>
        <receiver
            android:name = "com.ipsmarx.dialer.WakeLockManager"
            android:enabled = "true">
            <intent-filter>
                <action android:name = "com.ipsmarx.dialer.custom.intent.action.cpuwakelock" />
            </intent-filter>
        </receiver>
        <receiver
            android:name = "com.ipsmarx.dialer.NotificationController"
            android:enabled = "true">
            <intent-filter>
                <action android:name = "com.ipsmarx.dialer.custom.intent.action.REG_STATUS" />
            </intent-filter>
            <intent-filter>
                <action android:name = "com.ipsmarx.dialer.custom.intent.action.MISSED_CALL" />
            </intent-filter>
            <intent-filter>
                <action android:name = "com.ipsmarx.dialer.custom.intent.action.SHOW_CALLLOG" />
            </intent-filter>
            <intent-filter>
                <action android:name = "com.ipsmarx.dialer.custom.intent.action.SHOW_CHATTHREAD" />
            </intent-filter>
            <intent-filter>
                <action android:name = "com.ipsmarx.dialer.custom.intent.action.MSG_STATUS" />
            </intent-filter>
        </receiver>

        <service
            android:name = "com.ipsmarx.dialer.SipService"
            android:enabled = "true" />
        <service android:name = "com.ipsmarx.dialer.ContactSyncService" />

        <!--<provider-->
            <!--android:name = "com.ipsmarx.dialer.MsgDBProvider"-->
            <!--android:authorities = "@string/app_name"-->
            <!--android:exported = "false"-->
            <!--android:permission = "android.permission.CONFIGURE_SIP" />-->
        <receiver
            android:name = "com.ipsmarx.pushnotification.GcmBroadcastReceiver"
            android:permission = "com.google.android.c2dm.permission.SEND">
            <intent-filter>
                <action android:name = "com.google.android.c2dm.intent.RECEIVE" />
                <action android:name = "com.google.android.c2dm.intent.REGISTRATION" />

                <category android:name = "com.ipsmarx.dialer" />
            </intent-filter>
        </receiver>
        <service android:name = "com.ipsmarx.pushnotification.GCMIntentService" />

        <activity
            android:name = "com.ipsmarx.newdesign.SignUp"
            android:label = "@string/title_activity_sign_up"
            android:screenOrientation = "portrait" />
        <activity
            android:name = "com.ipsmarx.newdesign.SignUpByPhone"
            android:label = "@string/title_activity_sign_up_by_phone"
            android:screenOrientation = "portrait" />
        <activity
            android:name = "com.ipsmarx.newdesign.ForgotPassword"
            android:label = "@string/title_activity_forgot_password"
            android:screenOrientation = "portrait" />
        <activity
            android:name = "com.ipsmarx.video.RTCActivity"
            android:configChanges = "orientation|screenSize"
            android:excludeFromRecents = "true"
            android:label = "@string/app_name"
            android:launchMode = "singleTask"
            android:screenOrientation = "fullUser"
            android:windowSoftInputMode = "stateHidden" />

        <meta-data
            android:name = "io.fabric.ApiKey"
            android:value = "6b5afe577fa0e4476d354af38bcdc075eee398a6" />
        <meta-data
            android:name = "com.google.android.gms.version"
            android:value = "@integer/google_play_services_version" />

        <activity
            android:name = "com.google.android.gms.ads.AdActivity"
            android:configChanges = "keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
            android:theme = "@android:style/Theme.Translucent"
            tools:replace = "android:configChanges" />
        <activity
            android:name = "com.google.android.gms.ads.purchase.InAppPurchaseActivity"
            android:theme = "@style/Theme.IAPTheme" />
    </application>
</manifest>

Я использую Android Studio 3.3.1 и Gradle 4.10.1. Я пытаюсь понять это за последние два часа и не понимаю, что не так в моем коде. Дайте мне знать, если кто-то может помочь мне решить проблему. Спасибо

опубликуйте свой файл манифеста.

VIISHRUT MAVANII 16.03.2019 05:22

@VishrutMavani Извините, я добавил это сейчас. Спасибо

Raju Bhatt 16.03.2019 05:24
0
2
1 696
2
Перейти к ответу Данный вопрос помечен как решенный

Ответы 2

Ответ принят как подходящий

ваш Manifest.xml поврежден, это:

 <action android:name = "com.google.android.gms.actions.SEARCH_ACTION" />
 <category android:name = "android.intent.category.DEFAULT" />

должно быть (android.intent.action.MAIN необязательно):

 <intent-filter>
     <action android:name = "android.intent.action.MAIN" />
     <action android:name = "com.google.android.gms.actions.SEARCH_ACTION" />
     <category android:name = "android.intent.category.DEFAULT" />
 </intent-filter>

Измените эту часть на

 <activity
        android:name = "com.ipsmarx.newdesign.LoginActivity"
        android:configChanges = "keyboardHidden|orientation"
        android:label = "@string/app_display_name"
        android:launchMode = "singleTask"
        android:screenOrientation = "portrait">
       <intent-filter> 
     <action android:name = "com.google.android.gms.actions.SEARCH_ACTION" />
        <category android:name = "android.intent.category.DEFAULT" />
  </intent-filter>
    </activity>     

Другие вопросы по теме