微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Android 生成调试 apk 它在我的设备上运行但在其他设备上它被安装但它永远不会打开

如何解决Android 生成调试 apk 它在我的设备上运行但在其他设备上它被安装但它永远不会打开

我正在开发一个应用程序,它在我的设备上运行良好,但是当我尝试生成一个 (Debug-Apk) 并将其发送给我的朋友时,它会被安装但从未打开过。

这是我的清单文件

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

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />


    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.RealState">
        <activity android:name="com.example.realEstate.RestorePasswordActivity"/>
        <activity android:name="com.example.realEstate.Registeractivity" />
        <activity android:name="com.example.realEstate.LoginActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

</manifest>

这是我的gradle文件

  plugins {
    id 'com.android.application'
}

android {
    compileSdkVersion 30
    buildToolsversion "30.0.3"

    defaultConfig {
        applicationId "com.example.realstate"
        minSdkVersion 23
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {

    implementation 'androidx.appcompat:appcompat:1.3.0'
    //implementation 'com.google.android.material:material:1.1.0'
    implementation'com.google.android.material:material:1.4.0-rc01'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。