Android的磨损debug.apk显示解析错误 [英] android wear-debug.apk shows parsing error

查看:277
本文介绍了Android的磨损debug.apk显示解析错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我把配置磨损并运行它到模拟器,然后我发现APK在我的项目输出文件夹。我通过电子邮件发送的那一个,在安装上可穿戴式手表的时候就说明在解析包出现了一个错误。任何一个建议我

下面是我的的manifest.xml

 <?XML版本=1.0编码=UTF-8&GT?;
<清单的xmlns:机器人=htt​​p://schemas.android.com/apk/res/android
    包=de.peterfriese.wearablelistviewsample>    <使用特征的android:NAME =android.hardware.type.watch/>    <应用
        机器人:allowBackup =真
        机器人:图标=@绘制/ ic_launcher
        机器人:标签=@字符串/ APP_NAME
        机器人:主题=@安卓风格/ Theme.DeviceDefault>
        <活动
            机器人:MyActivityNAME =
            机器人:标签=@字符串/ APP_NAME>
            &所述;意图滤光器>
                <作用机器人:名字=android.intent.action.MAIN/>
                <类机器人:名字=android.intent.category.LAUNCHER/>
            &所述; /意图滤光器>
        < /活性GT;
    < /用途>< /清单>


解决方案

我做了一个相同的错误只是确保微应用程序是的签署

下面是一个片段我的耐磨的build.gradle

 安卓{
    compileSdkVersion 20
    buildToolsVersion20.0.0    defaultConfig {
        的applicationIDmy.package.name//一样,主要的应用程序!
        20的minSdkVersion
        targetSdkVersion 20
        版本code 1
        的versionName1.0
    }
    signingConfigs {
        发布 {
            storeFile文件(路径/要/密钥库)
            storePassword'...'
            keyAlias​​'...'
            keyPassword'...'
        }
    }
    buildTypes {
        调试{
            runProguard假
            signingConfig signingConfigs.release
        }
        发布 {
            runProguard真
            proguardFiles getDefaultProguardFile('proguard的-android.txt'),'proguard-rules.pro
            signingConfig signingConfigs.release
        }
    }
}

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>

解决方案

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
        }
    }
}

这篇关于Android的磨损debug.apk显示解析错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆