我正面临一个问题,我已经使用调试和发布密钥SHA为谷歌地图创建了api密钥,如下所示:

并在我的清单中更新了该密钥
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyBY34afkPU6TRw5v9yM1wqI3vFbk90zMt0" />
Run Code Online (Sandbox Code Playgroud)
拥有所有必需的权限,但每隔几天谷歌地图看起来空白像这样:

在我的清单地图中更改密钥后可见.我的问题是为什么我需要每隔几天更改一次这个API密钥?
我正在尝试使用Quickblox的示例聊天应用程序.
http://quickblox.com/developers/Android_XMPP_Chat_Sample
但我收到此错误"导入vc908无法解决"在这一行:
import vc908.stickerfactory.StickersManager;
Run Code Online (Sandbox Code Playgroud)
我使用过这些库: - quickblox-android-sdk-chat-2.2.6.jar - quickblox-android-sdk-core-2.2.6.jar
还添加了以下内容: - android-support-v7-appcompat - google-play-services_lib - pull-to-refresh
我正在使用QuickBlox SDK加载聊天记录.像这样:
Bundle bundle = new Bundle();
QBRequestGetBuilder customObjectRequestBuilder = new QBRequestGetBuilder();
customObjectRequestBuilder.setPagesLimit(ConstsCore.CHATS_DIALOGS_PER_PAGE);
try
{
List<QBDialog> chatDialogsList = QBChatService.getChatDialogs(null, customObjectRequestBuilder,bundle);
} catch (QBResponseException e)
{
e.printStackTrace();
}
Run Code Online (Sandbox Code Playgroud)
在这一步,我得到这个例外:
基地禁止.需要用户.
我正在尝试使用kotlin for android并试图像这样声明Linearlayout:
internal var linlay_SuccessfulPayment : LinearLayout = null!!
internal var linlay_failPayment : LinearLayout
linlay_SuccessfulPayment = findViewById(R.id.linlay_SuccessfulPayment) as LinearLayout
linlay_failPayment = findViewById(R.id.linlay_failPayment) as LinearLayout
Run Code Online (Sandbox Code Playgroud)
但是在日志中我得到了这个:
Caused by: kotlin.KotlinNullPointerException
at com.example.activities.PaymentResult.<init>(Result.kt:14)
at java.lang.Class.newInstance(Native Method)
at android.app.Instrumentation.newActivity(Instrumentation.java:1096)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3122)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3415)
at android.app.ActivityThread.access$1100(ActivityThread.java:229)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1821)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:7329)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Run Code Online (Sandbox Code Playgroud)
请帮帮我.