简体   繁体   English

将.apk上传到Google Play时出错:此文件无效:获取服务的“ Android名称”属性时出错:该属性不是字符串值

[英]Error when uploading .apk to google play : this file is invalid: error getting 'android name' attribute for service: attribute is not a string value

I'm uploading my draft live wallpaper .apk file to google play but I got this error: 我正在将我的动态壁纸草稿.apk文件上传到Google Play,但出现此错误:

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

I have tested in my emulator + real device and everything works fine. 我已经在模拟器和真实设备中进行了测试,并且一切正常。

I signed the apk file before uploading also. 我也上传了apk文件签名。

Some of the online resources told me that this problem occurs because of the manifest.xml, but I still cant find the problem.. 一些在线资源告诉我,此问题是由于manifest.xml引起的,但是我仍然找不到该问题。

Here is my 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>

Any thoughts ideas or suggestions are appreciated! 任何想法或建议,表示赞赏!

Thanks, 谢谢,
Binbon 宾邦

The first service in your manifest is defining the android:name attribute to be "@string/app_name" . 清单中的第一个服务是将android:name属性定义为"@string/app_name" According to the Android docs , this must be a fully qualified class name, like the service definition further down in the manifest. 根据Android 文档 ,该名称必须是完全合格的类名称,例如清单中后面的服务定义。 I'm guessing the string "app_name" is not a fully qualified class name. 我猜字符串“ app_name”不是完全合格的类名称。

in my case it was "\\n" in the app_name string. 在我的情况下,app_name字符串中为“ \\ n”。 That was wrong. 错了

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将 APK 上传到 Play 商店时出现“'android:icon' 属性:属性不是字符串值”错误 - getting " 'android:icon' attribute: attribute is not a string value” error while uploading an APK to the play store 文件无效:错误获取“ android:name”属性:该属性不是字符串值 - The file is invalid: ERROR getting 'android:name' attribute: attribute is not a string value 上载到Google Play时发生错误:android:label属性:属性不是字符串值 - error on uploading to google play: android:label attribute: attribute is not a string value 在将APK上传到PlayStore时错误获取&#39;android:icon&#39;属性:该属性不是字符串值 - ERROR getting 'android:icon' attribute: attribute is not a string value while uploading apk to playstore aapt ERROR获取&#39;android:name&#39;属性:属性不是字符串值 - aapt ERROR getting 'android:name' attribute: attribute is not a string value 获取“名称”属性时出错:属性不是字符串值 - ERROR getting 'name' attribute: attribute is not a string value 将Android .apk文件上传到Google Play时出错 - Error while uploading Android .apk file to Google Play 将APK上传到Google Play时清单错误 - Error with manifest when uploading APK to Google Play 将APK上传到Google Play时出错 - Error with Uploading APK to Google Play 获取“名称”属性时出错:该属性不是字符串值Hybrid Cordova App - ERROR getting 'name' attribute: attribute is not a string value Hybrid Cordova App
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM