【问题标题】:Android webview app not installed through the directoryAndroid webview 应用程序未通过目录安装
【发布时间】:2019-08-03 18:50:42
【问题描述】:

我是安卓新手。我已经创建了一个 WebView 应用程序。 当我通过模拟器测试我的应用程序时,它运行良好。

当我选择该应用程序时也会安装

运行 -> 运行 'app' -> 然后选择我连接的设备(不是模拟器)。

但是当我去我的项目文件夹/app/build/outputs/apk/debug/xyz.apk

或在/app/build/outputs/apk/release/xyz.apk文件夹下

然后当我选择安装时,我收到一个错误,即未安装应用程序。

任何我做错的建议。

我还通过Build->Generate signed Bundle or Apk选项生成了签名的apk。但没有取得任何成功。

非常感谢任何帮助。

这是我的 AndroidManifest.xml 文件

<?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        package="com.example.test">
        <uses-sdk android:minSdkVersion="21"/>

        <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
        <uses-permission android:name="android.permission.INTERNET" />
        <uses-permission android:name="android.permission.MEDIA_CONTENT_CONTROL"
            tools:ignore="ProtectedPermissions" />
        <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
        <uses-permission android:name="android.permission.CAMERA" />
        <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
        <uses-feature android:name="android.hardware.camera" />

        <application
            android:hardwareAccelerated="true"
            android:allowBackup="true"
            android:icon="@mipmap/ic_launcher"
            android:label="Test"
            android:roundIcon="@mipmap/ic_launcher"
            android:supportsRtl="true"
            android:theme="@style/AppTheme"
            android:name=".MyApp">
            <activity android:name=".SplashActivity" android:theme="@style/SplashTheme" android:configChanges="orientation|screenSize">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
                    <category android:name="android.intent.category.LAUNCHER" />

                </intent-filter>

            </activity>

            <activity android:name=".MainActivity" android:configChanges="orientation|screenSize"/>
        </application>       
    </manifest>

【问题讨论】:

  • 你能分享你的清单文件吗?
  • @Jay 我在我的问题上添加了清单文件。
  • 卸载以前安装的应用程序。通过禁用即时运行创建新的,然后尝试安装它。
  • @Aks 您在哪个设备上测试这个应用程序??该设备的 Android 版本?

标签: android webview


【解决方案1】:

这是通过最简单的过程完成的。转到 Build -> 单击 Rebuild Project。 而已。我得到了这个解决方案。我正在将此 apk 安装到我的手机(真实设备)

【讨论】:

    猜你喜欢
    • 2017-10-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多