小编Nir*_*dri的帖子

Google 地方信息自动完成无法加载搜索结果

我正在尝试实现 Google Places Autocomplete API,有时我能够获取位置列表,但有时我会收到“无法加载搜索结果”的消息。有人可以帮我解决这个问题。

android google-maps google-maps-api-3 google-places-api

11
推荐指数
1
解决办法
1万
查看次数

如何修复 Android .aar 项目中的“java.lang.NoClassDefFoundError”

.aar构建了一个 android库,我正在尝试将它与其中一个项目集成。当应用程序尝试打开.aar我使用改造进行 API 调用的库的初始屏幕时。我收到以下异常

java.lang.NoClassDefFoundError:解析失败:Lokhttp3/OkHttpClient$Builder;

我没有在我的.aar项目中混淆或启用 pro-guard 。

以下是我的.aarGradle 依赖项

implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.okhttp3:okhttp:3.12.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.retrofit2:converter-gson:2.2.0'

testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
Run Code Online (Sandbox Code Playgroud)

android aar retrofit2 okhttp3

5
推荐指数
2
解决办法
2645
查看次数