我该如何解决这个错误?
引起:java.lang.illegalargumentexception 11-01 11:08:12.845:E/AndroidRuntime(28885):引起:java.lang.IllegalStateException:应用程序的AndroidManifest.xml中的元数据标签没有正确的值.预期4030500但找到0.您必须在元素中包含以下声明:
google-play-services_lib清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.gms"
android:versionCode="4030530"
android:versionName="4.0.30 (889083-30)" >
<uses-sdk android:minSdkVersion="8"/>
</manifest>
Run Code Online (Sandbox Code Playgroud)
public void loginGooglePlus() {
aHelper.setup(this, GameHelper.CLIENT_APPSTATE | GameHelper.CLIENT_GAMES);
mHelper = aHelper.getAppStateClient();
//crash is here
mHelper.connect();
}
Run Code Online (Sandbox Code Playgroud)
完整错误日志:
11-01 11:38:13.507: E/AndroidRuntime(31297): FATAL EXCEPTION: main
11-01 11:38:13.507: E/AndroidRuntime(31297): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.company.application.android.aja/com.company.application.android.aja.BeetleBattleAndroidActivity}: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4030500 but found 0. You must have the following declaration within the <application> element: <meta-data …Run Code Online (Sandbox Code Playgroud) 我尝试了一切,重命名包,更改权限等,仍然在我的控制台上看到错误INSTALL_PARSE_FAILED_MANIFEST_MALFORMED.
我尝试从logcat进行日志记录,这就是它所说的"在installPackageLI期间解析失败"和"android.content.pm.PackageParser $ PackageParserException:/data/app/vmdl170122893.tmp/base.apk"(在二进制XML文件行#33处) ):没有有效的android:name"和atlast说"调试器不再有效"
我试着在em21即Lollipop SDK上运行.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="Ca.Rushabh.Mobileproject"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<permission
android:name="com.example.mymapsv2.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.mymapsv2.permission.MAPS_RECEIVE" />
<application
android:allowBackup="true"
android:icon="@drawable/blue_droid"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="Ca.Rushabh.Mobileproject.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="Ca.Rushabh.Mobileproject.About"
android:label="@string/title_activity_about"
android:theme="@android:style/Theme.Dialog" >
</activity>
<activity
android:name="Ca.Rushabh.Mobileproject.ToDoList"
android:label="abcd" />
<activity
android:name="Ca.Rushabh.Mobileproject.ToDoDetailActivity" …Run Code Online (Sandbox Code Playgroud)