gpt4 book ai didi

java - Android Studio : android.intent.category.LAUNCHER 客户端尚未准备好

转载 作者:行者123 更新时间:2023-12-01 06:03:55 25 4
gpt4 key购买 nike

每次我尝试在手机上运行应用程序时,都会收到此消息

然后就崩溃了。我不知道如何修复它,我已经取消选中 Instant Run 并安装了 ADB Idea,但仍然没有运气。有什么帮助吗?

编辑(build.gradle):

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
defaultConfig {
applicationId "com.fretshot.ihc.sapp"
minSdkVersion 22
targetSdkVersion 22
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
resValue "string", "google_maps_key", (project.findProperty("GOOGLE_MAPS_API_KEY") ?: "")
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.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-maps:15.0.0'
implementation 'com.google.android.gms:play-services-location:15.0.0'
implementation 'com.ncorti:slidetoact:0.3.0'
}

最佳答案

您是否在 AndroidManifest.xml 中导出您的启动器 Activity ?看到您通过 adb 启动它,您需要添加:

<activity
android:name=".yourpackagename.YourActivity"
android:exported="true"/>

为了让您的 Activity 可 adb 启动。默认情况下会导出带有 Intent 过滤器的 Activity 。

关于java - Android Studio : android.intent.category.LAUNCHER 客户端尚未准备好,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50015949/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com