android wear-debug.apk shows parsing error

浪尽此生 提交于 2019-12-11 08:15:48

问题


i placed configuration as wear and run it into emulator, then i found apk in my project output folder. i emailed that one, at the time of installation on wearable watch it shows there was a error while parsing the package. any one suggest me

Here is my manifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="de.peterfriese.wearablelistviewsample" >

    <uses-feature android:name="android.hardware.type.watch" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.DeviceDefault" >
        <activity
            android:name=".MyActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

回答1:


I had a same error just make sure that the micro app is signed.

Here is a snippet of my wearable build.gradle:

android {
    compileSdkVersion 20
    buildToolsVersion "20.0.0"

    defaultConfig {
        applicationId "my.package.name" // same as the main app!
        minSdkVersion 20
        targetSdkVersion 20
        versionCode 1
        versionName "1.0"
    }
    signingConfigs {
        release {
            storeFile file("path/to/keystore")
            storePassword '...'
            keyAlias '...'
            keyPassword '...'
        }
    }
    buildTypes {
        debug {
            runProguard false
            signingConfig signingConfigs.release
        }
        release {
            runProguard true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
        }
    }
}


来源:https://stackoverflow.com/questions/25886350/android-wear-debug-apk-shows-parsing-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!