0
点赞
收藏
分享

微信扫一扫

Anroid Studion 4.2.2 归纳

覃榜言 2022-04-30 阅读 66

Anroid Studion 4.2.2 归纳

1.下载链接

Android Studio 历史版本下载

1.1 Manifest.xml文件添加

android:exported= "true"

<activity
            android:name=".MainActivity"
            android:exported="true"
            android:label="@string/app_name"
            android:theme="@style/Theme.Learn.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

1.2 应用安装到手机显示安装失败,安装包异常。

报错信息如下
The application could not be installed: INSTALL_FAILED_TEST_ONLY
处理方法:在项目中的gradle.properties全局配置中最末尾添加 android.injected.testOnly=false

# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
android.injected.testOnly=false
举报

相关推荐

0 条评论