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