2

FBReader サードパーティ ライブラリとのマニフェスト マージの問題に直面しています。StackOverflow で利用可能なすべてのソリューションを試しましたが、役に立ちませんでした。同じことに関する解決策を提案してください。以下のマニフェスト ファイルとエラーをご覧ください。

マニフェスト:

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

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

    <application
        tools:replace="android:icon, android:label, android:theme"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity
            android:name=".xxxxxxxxxxxx"
            android:theme="@style/AppTheme.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".TestAcitivity"
            android:label="@string/title_activity_test_acitivity"
            android:theme="@style/AppTheme.NoActionBar"></activity>




        <activity
            android:name="org.geometerplus.android.fbreader.crash.FixBooksDirectoryActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:process=":crash"
            android:theme="@style/FBReader.Dialog" >
            <intent-filter>
                <action android:name="android.fbreader.action.CRASH" />

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

                <data android:scheme="CachedCharStorageException" />
            </intent-filter>
        </activity>
        <activity
            android:name="org.geometerplus.android.fbreader.crash.MissingNativeLibraryActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:process=":crash"
            android:theme="@style/FBReader.Dialog" >
            <intent-filter>
                <action android:name="android.fbreader.action.CRASH" />

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

                <data android:scheme="ExceptionInInitializerError" />
            </intent-filter>
        </activity>

        <service
            android:name="org.geometerplus.android.fbreader.api.ApiService"
            android:exported="false"
            android:launchMode="singleTask" >
            <intent-filter>
                <action android:name="android.fbreader.action.API" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </service>

        <!--<activity
            android:name="com.artifex.mupdfdemo.ScreenShotsActivity"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" >
        </activity>-->
        <activity
            android:name="org.geometerplus.android.fbreader.SpeakActivity"
            android:configChanges="orientation|keyboardHidden"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.Light.Panel" />
        <activity
            android:name="org.geometerplus.android.fbreader.FBReader"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:icon="@drawable/app_icon"
            android:label="Rockstand"
            android:launchMode="singleTask"
            android:theme="@style/FBReader.Activity" >
            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />
            </intent-filter>

            <meta-data
                android:name="android.app.searchable"
                android:resource="@xml/searchable" />
        </activity>
        <activity android:name="org.geometerplus.android.fbreader.DictionaryBrowser" />
        <activity
            android:name="org.geometerplus.android.fbreader.CancelActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:theme="@style/FBReader.Dialog" />
        <activity
            android:name="org.geometerplus.android.fbreader.style.StyleListActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:theme="@style/FBReader.Dialog" />
        <activity
            android:name="org.geometerplus.android.fbreader.style.EditStyleActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:theme="@style/FBReader.Dialog" />
        <activity
            android:name="org.geometerplus.android.fbreader.image.ImageViewActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:theme="@style/FBReader.Activity" />
        <!-- android:process=":imageView" -->
        <service
            android:name="org.geometerplus.android.fbreader.libraryService.LibraryService"
            android:exported="false"
            android:launchMode="singleTask"
            android:process=":libraryService" >
            <intent-filter>
                <action android:name="android.fbreader.action.LIBRARY_SERVICE" />
            </intent-filter>
        </service>

        <activity
            android:name="org.geometerplus.android.fbreader.library.BookInfoActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:process=":library"
            android:theme="@style/FBReader.Activity" />
        <activity
            android:name="org.geometerplus.android.fbreader.library.LibrarySearchActivity"
            android:process=":library"
            android:theme="@android:style/Theme.NoDisplay" >
            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />
            </intent-filter>

            <meta-data
                android:name="android.app.searchable"
                android:resource="@xml/searchable" />
        </activity>
        <activity
            android:name="org.geometerplus.android.fbreader.library.LibraryActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:launchMode="singleTask"
            android:process=":library"
            android:theme="@style/FBReader.Activity" >
            <meta-data
                android:name="android.app.default_searchable"
                android:value="org.geometerplus.android.fbreader.library.LibrarySearchActivity" />
        </activity>
        <activity
            android:name="org.geometerplus.android.fbreader.TOCActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:theme="@style/FBReader.Activity" />
        <activity
            android:name="org.geometerplus.android.fbreader.BookmarksActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:theme="@style/FBReader.Activity" >
            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />
            </intent-filter>

            <meta-data
                android:name="android.app.searchable"
                android:resource="@xml/searchable" />
        </activity>
        <activity
            android:name="org.geometerplus.android.fbreader.BookmarkEditActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:theme="@style/FBReader.Dialog" />
        <activity
            android:name="org.geometerplus.android.fbreader.preferences.PreferenceActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:theme="@style/FBReader.Activity" />
        <activity
            android:name="org.geometerplus.android.fbreader.preferences.EditBookInfoActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:process=":library"
            android:theme="@style/FBReader.Activity" />
        <activity
            android:name="org.geometerplus.android.fbreader.network.BookDownloader"
            android:process=":networkLibrary"
            android:theme="@android:style/Theme.NoDisplay" >
        </activity>

        <service
            android:name="org.geometerplus.android.fbreader.network.BookDownloaderService"
            android:launchMode="singleTask"
            android:process=":networkLibrary" />

        <activity
            android:name="org.geometerplus.android.fbreader.network.NetworkSearchActivity"
            android:process=":networkLibrary"
            android:theme="@android:style/Theme.NoDisplay" >
            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />
            </intent-filter>

            <meta-data
                android:name="android.app.searchable"
                android:resource="@xml/searchable" />
        </activity>
        <activity
            android:name="org.geometerplus.android.fbreader.network.NetworkLibraryPrimaryActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:launchMode="singleTask"
            android:process=":networkLibrary"
            android:theme="@style/FBReader.Activity" >
        </activity>
        <activity
            android:name="org.geometerplus.android.fbreader.network.NetworkLibrarySecondaryActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:process=":networkLibrary"
            android:theme="@style/FBReader.Activity" />
        <activity
            android:name="org.geometerplus.android.fbreader.network.AuthenticationActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:process=":networkLibrary"
            android:theme="@style/FBReader.Dialog" />
        <activity
            android:name="org.geometerplus.android.fbreader.network.BuyBooksActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:process=":networkLibrary"
            android:theme="@style/FBReader.Dialog" />
        <activity
            android:name="org.geometerplus.android.fbreader.network.AddCatalogMenuActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:process=":networkLibrary"
            android:theme="@style/FBReader.Dialog" />
        <activity
            android:name="org.geometerplus.android.fbreader.network.AddCustomCatalogActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:process=":networkLibrary"
            android:theme="@style/FBReader.Dialog" >
        </activity>
        <activity
            android:name="org.geometerplus.android.fbreader.network.AuthorizationMenuActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:process=":networkLibrary"
            android:theme="@style/FBReader.Dialog" />
        <activity
            android:name="org.geometerplus.android.fbreader.network.TopupMenuActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:process=":networkLibrary"
            android:theme="@style/FBReader.Dialog" />
        <activity
            android:name="org.geometerplus.android.fbreader.network.NetworkBookInfoActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:process=":networkLibrary"
            android:theme="@style/FBReader.Activity" >
        </activity>
        <!--<activity
            android:name="com.artifex.mupdfdemo.MuPDFActivity"
            android:configChanges="orientation"
            android:label="@string/app_name"
            android:theme="@android:style/Theme.Light.NoTitleBar.Fullscreen" >
        </activity>-->

        <receiver
            android:name="org.geometerplus.android.fbreader.network.ListenerCallback"
            android:process=":networkLibrary" >
            <intent-filter>
                <action android:name="android.fbreader.action.network.SIGNIN" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </receiver>
    </application>

</manifest>

エラーログ:

/Users/sanatpandey/Desktop/Rockstand 2/app/src/main/AndroidManifest.xml:85:13-46 Error:
    Attribute activity#org.geometerplus.android.fbreader.FBReader@icon value=(@drawable/app_icon) from AndroidManifest.xml:85:13-46
    is also present at [Rockstand 2:FBReader:unspecified] AndroidManifest.xml:107:13-46 value=(@drawable/fbreader).
    Suggestion: add 'tools:replace="android:icon"' to <activity> element at AndroidManifest.xml:82:9-96:20 to override.
/Users/sanatpandey/Desktop/Rockstand 2/app/src/main/AndroidManifest.xml:86:13-38 Error:
    Attribute activity#org.geometerplus.android.fbreader.FBReader@label value=(Rockstand) from AndroidManifest.xml:86:13-38
    is also present at [Rockstand 2:FBReader:unspecified] AndroidManifest.xml:108:13-37 value=(FBReader).
    Suggestion: add 'tools:replace="android:label"' to <activity> element at AndroidManifest.xml:82:9-96:20 to override.
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
:app:processDebugManifest FAILED
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed with multiple errors, see logs
Information:BUILD FAILED
Information:Total time: 28.892 secs
Information:1 error
Information:0 warnings

前もって感謝します

4

1 に答える 1

2

エラー ログの指示に従っていないようです。あなただけtools:replace<application>ノードにあります。エラー ログの指示によると、アクティビティtools:replace<activity>ノードをブロックおよびに設定する必要があります。FBReaderandroid:labelandroid:icon

于 2016-02-01T13:14:52.937 に答える