Построение пакета приложений, дающего исключение FileUsesReservedNameException - PullRequest
0 голосов
/ 10 июня 2019

FAILURE: сборка не удалась, исключение.* Ошибкаroot / AndroidManifest.xml 'использует зарезервированное имя файла или каталога' AndroidManifest.xml '.

Я перепробовал все ответы, приведенные в StackOverflow здесь и здесь но не работает.Я могу создать APK-файл с заданной конфигурацией.

sinch-android-rtc-3.13.0.aar добавлен в пакет app -> libs.

Также пробовал

  1. Проект Clean & Build
  2. Добавление android:fullBackupContent="false" в файл AndroidManifest.xml под тегом приложения
  3. Изменение библиотеки сборки на implementation 'com.facebook.android:facebook-login:5.0.1'

build.gradle

apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.xyz.yz"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    repositories {
        maven { url "https://jitpack.io" }
        jcenter()
        flatDir {
            dirs 'libs'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
//    implementation(name: 'sinch-android-rtc', version: '+', ext: 'aar')
    implementation files('libs/sinch-android-rtc-3.13.0.aar')

    implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'com.github.bumptech.glide:glide:4.9.0'
    implementation 'com.squareup.okhttp3:okhttp:3.12.0'
    implementation 'com.wang.avi:library:2.1.3'
    implementation 'com.facebook.android:facebook-login:[5,6)'
    implementation 'com.google.android.gms:play-services-auth:16.0.1'
    implementation "com.google.android.gms:play-services-location:16.0.0"
    implementation 'com.google.firebase:firebase-core:16.0.9'
    implementation 'com.google.firebase:firebase-messaging:18.0.0'
    implementation 'com.github.krokyze:ucropnedit:2.2.3'
    implementation 'androidx.exifinterface:exifinterface:1.0.0'
    implementation 'com.fxn769:pix:1.4.4'
    implementation 'com.google.code.gson:gson:2.8.5'
    implementation 'com.google.android:flexbox:1.0.0'
    implementation 'com.stripe:stripe-android:8.7.0'

    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
}

apply plugin: 'com.google.gms.google-services'

AndroidManifest.xml

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

    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <!--<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />-->
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

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

    <!--
    TODO: largeheap removed
      android:largeHeap="true"
    -->
    <application
        android:name=".xyz"
        android:allowBackup="false"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="false"
        android:fullBackupContent="false"
        android:theme="@style/AppTheme"
        android:usesCleartextTraffic="true"
        tools:replace="android:supportsRtl">

        <service
            android:name=".call.SinchService"
            android:exported="false" />

        <uses-library
            android:name="org.apache.http.legacy"
            android:required="false" />

        <meta-data
            android:name="com.facebook.sdk.ApplicationId"
            android:value="@string/facebook_app_id" />

        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.provider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/provider_paths" />
        </provider>

        <!-- Set custom default icon. This is used when no icon is set for incoming notification messages. -->
        <meta-data
            android:name="com.google.firebase.messaging.default_notification_icon"
            android:resource="@drawable/logo_white" />
        <!-- Set color used with incoming notification messages. This is used when no color is set for the incoming
             notification message. -->
        <meta-data
            android:name="com.google.firebase.messaging.default_notification_color"
            android:resource="@color/buttonColor" />

        <meta-data
            android:name="com.google.firebase.messaging.default_notification_channel_id"
            android:value="@string/default_notification_channel_id" />

        <service android:name=".fcm.MyFirebaseMessagingService">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>

        <service
            android:name=".helpers.ForegroundService"
            android:enabled="true"
            android:exported="false" />

        <activity
            android:name=".Splash"
            android:configChanges="orientation|screenSize"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|stateAlwaysHidden">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".classes.WebLink"
            android:configChanges="orientation|screenSize"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|stateAlwaysHidden" />
        <activity
            android:name=".classes.LoginActivity"
            android:configChanges="orientation|screenSize"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|stateAlwaysHidden" />

        <activity
            android:name=".classes.TabBarActivity"
            android:configChanges="orientation|screenSize"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|stateAlwaysHidden" />

        <activity
            android:name="com.facebook.FacebookActivity"
            android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
            android:label="@string/app_name" />
        <activity
            android:name="com.facebook.CustomTabActivity"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data android:scheme="@string/fb_login_protocol_scheme" />
            </intent-filter>
        </activity>
        <activity
            android:name=".classes.SignupActivity"
            android:configChanges="orientation|screenSize"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|stateAlwaysHidden" />
        <activity
            android:name=".classes.ForgotPassword"
            android:configChanges="orientation|screenSize"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|stateAlwaysHidden" />
        <activity
            android:name=".classes.PasswordMessageSuccess"
            android:configChanges="orientation|screenSize"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|stateAlwaysHidden" />
        <activity
            android:name=".classes.ResetPassword"
            android:configChanges="orientation|screenSize"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|stateAlwaysHidden" />

        <activity
            android:name=".call.AudioCallActivity"
            android:configChanges="orientation|screenSize"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|stateAlwaysHidden" />

        <activity
            android:name=".call.AudioCallIncomingActivity"
            android:configChanges="orientation|screenSize"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|stateAlwaysHidden" />

        <activity
            android:name=".call.VideoCallActivity"
            android:configChanges="orientation|screenSize"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|stateAlwaysHidden" />

        <activity
            android:name=".call.VideoCallIncoming"
            android:configChanges="orientation|screenSize"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|stateAlwaysHidden" />

        <activity
            android:name=".call.VideoCallRecieved"
            android:configChanges="orientation|screenSize"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|stateAlwaysHidden" />

        <activity
            android:name=".classes.TransferInitiated"
            android:configChanges="orientation|screenSize"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|stateAlwaysHidden" />

        <activity
            android:name="com.yalantis.ucrop.UCropActivity"
            android:screenOrientation="portrait"
            android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
    </application>

</manifest>
...