【问题标题】:Can anyone check my manifest.xml?任何人都可以检查我的 manifest.xml 吗?
【发布时间】:2018-06-14 00:23:46
【问题描述】:

我是一名程序员新手。我想构建自己的应用程序。我已经构建了 APK 以在我的 LG G6 上对其进行测试。但是安装时出现错误信息“解析包时出现问题”。我读到这可能是由损坏的清单引起的。我在那里没有发现问题。但我只是一个初学者,所以如果你能检查一下,也许你能告诉我问题,那就太好了。

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="e.jonathan.kirchenappalpha">
    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="Kirchgemeinde Königshain BETA"
        android:roundIcon="@drawable/logo"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity
            android:name=".Menu"
            android:configChanges="orientation"
            android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <meta-data
            android:name="preloaded_fonts"
            android:resource="@array/preloaded_fonts" />

        <activity
            android:name=".Info"
            android:configChanges="orientation"
            android:screenOrientation="portrait" />
        <activity
            android:name=".veranstaltungen"
            android:configChanges="orientation"
            android:screenOrientation="portrait" />
        <activity
            android:name=".monat_1"
            android:configChanges="orientation"
            android:screenOrientation="portrait" />
        <activity
            android:name=".monat_2"
            android:configChanges="orientation"
            android:screenOrientation="portrait" />
        <activity
            android:name=".monat_3"
            android:configChanges="orientation"
            android:screenOrientation="portrait" />
        <activity android:name=".feedback" />
        <activity android:name=".Gemeindekreise"></activity>
    </application>

</manifest>

颗粒

应用插件:'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "e.jonathan.kirchenappalpha"
        minSdkVersion 16
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    implementation 'com.android.support:design:26.1.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    implementation 'com.google.android.gms:play-services-ads:12.0.1'
}

【问题讨论】:

  • 可以添加你的应用 gradle 吗?因为可能是其中的问题
  • 它可以在模拟器上运行吗?您如何构建 APK(通过 gradle 命令或 IDE)?
  • 我也遇到了这个问题,但由于清单而没有发生。检查这个stackoverflow.com/questions/50186569/…
  • Grandle 代码添加
  • 它在我的模拟器上运行。只有我的实体智能手机会出现这些问题。

标签: android android-studio android-manifest


【解决方案1】:

如果您想在物理设备上测试应用,请连接手机并打开手机上的开发者选项(在 Build Number 上点击 7 次)、setup ADBRun &gt; Run App (Shift + F10)

不过,要生成 APK,请转到 Build &gt; Generate Signed APK。你可以找到一些帮助here

【讨论】:

    猜你喜欢
    • 2019-07-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多