当我运行我的 android 应用程序时,我在我的 Logcat 中遇到了这个问题。有谁知道这个问题以及如何解决它?
该应用程序没有崩溃,但是当我每次尝试在 Google 地图的自动完成搜索栏中键入内容时,它都会关闭该活动。并返回上一个,在谷歌地图上显示当前位置。
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
Run Code Online (Sandbox Code Playgroud)
这不起作用,这个问题实际上已经被谷歌修复了。
安卓
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.example.project_seraphim_disease_tracker"
minSdkVersion 29
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
Run Code Online (Sandbox Code Playgroud)
依赖
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.navigation:navigation-fragment:2.2.2'
implementation 'androidx.navigation:navigation-ui:2.2.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
//new implementation
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.squareup.okhttp3:okhttp:4.1.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0' …Run Code Online (Sandbox Code Playgroud)