[英]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.