0

下書きのライブ壁紙 .apk ファイルを Google Play にアップロードしていますが、次のエラーが発生しました。

this file is invalid: error getting 'android name' attribute for service: attribute is not a string value

エミュレーターと実際のデバイスでテストしたところ、すべて正常に動作しました。

アップロードする前にapkファイルにも署名しました。

一部のオンライン リソースでは、manifest.xml が原因でこの問題が発生することがわかりましたが、まだ問題を見つけることができません..

これが私のmanifest.xmlです:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.test.wallpaper"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="8" />
    <uses-feature android:name="android.software.live_wallpaper" />


    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >



            <activity android:name="com.test.wallpaper.SplashActivity"
            android:label="@string/app_name" android:configChanges="keyboardHidden"
            android:windowSoftInputMode="adjustPan" android:launchMode="singleTop"
            android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

      <service
            android:permission="android.permission.BIND_WALLPAPER"
            android:name    = "@string/app_name"
            android:label   = "@string/app_name"
            android:icon    = "@drawable/icon"
        >

            <intent-filter>
                <action android:name="android.service.wallpaper.WallpaperService" />
            </intent-filter>

            <meta-data android:name="android.service.wallpaper" android:resource="@xml/wallpaper"/>

        </service>

        <activity
            android:label       = "Settings"
            android:name        = "Settings"
            android:theme       = "@android:style/Theme.Black"
            android:exported    = "true">
        </activity>
         <activity
            android:name        = "GalleryPreference"
            android:label       = "GalleryPreference"
            android:theme       = "@android:style/Theme.Black"
            android:exported    = "true"
        />

        <activity
            android:name        = "GalleryActivity"
            android:label       = "GalleryActivity"
            android:exported    = "true"
        />

        <service android:name = "com.test.wallpaper.AdapterService" android:enabled="true" android:exported="true"/>
    </application>


</manifest>

どんな考えや提案も大歓迎です!

ありがとう、
ビンボン

4

2 に答える 2

0

私の場合、app_name 文字列の "\n" でした。それは間違っていました。

于 2012-07-16T05:35:28.467 に答える
0

android:nameマニフェストの最初のサービスは、属性を に定義しています"@string/app_name"Android docsによると、これはマニフェストのさらに下にあるサービス定義のように、完全修飾クラス名でなければなりません。文字列「app_name」は完全修飾クラス名ではないと推測しています。

于 2012-06-10T02:52:53.703 に答える