[英]Android Studio: android.intent.category.LAUNCHER Client not ready yet
Every time I try to run my app on my phone I get this message 每当我尝试在手机上运行我的应用程序时,都会收到此消息
and it crashes. 它崩溃了。 I don't know how to fix it, I already unchecked Instant Run and installed ADB Idea but still no luck. 我不知道如何解决它,我已经取消选中“即时运行”并安装了ADB Idea,但还是没有运气。 Any help? 有什么帮助吗?
EDIT (build.gradle): 编辑(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'
}
Did you export your launcher activity in AndroidManifest.xml? 您是否在AndroidManifest.xml中导出了启动器活动? Seeing you're launching it via adb you need to add: 看到您正在通过adb启动它,则需要添加:
<activity
android:name=".yourpackagename.YourActivity"
android:exported="true"/>
in order for your activity to be adb-launchable. 为了使您的活动能够进行adb发布。 Activities with intent-filter are exported by default. 带有意图过滤器的活动默认情况下被导出。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.