0
我是新來的亞馬遜SNS服務,我今天剛剛訂閱開始嘗試使用它。我登錄到移動Hub控制檯,並創建了一個新項目。然後,我選擇了Android的推送通知,並選擇了Build。亞馬遜SNS示例應用程序
在說明中它應該與將生成步驟中提供的源項目導入Android Studio一樣簡單,然後單擊調試應用程序。
當我這樣做時,我立即在Android Studio的事件日誌中得到一個NullPointerException:null錯誤。我正在嘗試將MySampleApp加載到模擬器上以測試推送通知的工作方式,但由於此錯誤,我甚至無法運行應用程序。
當我點擊事件日誌中的錯誤時,彈出窗口顯示以下詳細信息。我不知道該怎麼做,因爲說明中除了將項目導入到Android Studio並單擊調試應用程序之外沒有任何其他說明。
null
java.lang.NullPointerException
at com.android.tools.idea.run.AndroidSessionInfo.isEmbeddable(AndroidSessionInfo.java:62)
at com.android.tools.idea.run.AndroidRunConfigurationBase.getOldSessionTarget(AndroidRunConfigurationBase.java:307)
at com.android.tools.idea.run.AndroidRunConfigurationBase.getState(AndroidRunConfigurationBase.java:279)
at com.intellij.execution.runners.ExecutionEnvironment.getState(ExecutionEnvironment.java:201)
at com.intellij.execution.runners.BaseProgramRunner.execute(BaseProgramRunner.java:58)
at com.intellij.execution.runners.GenericProgramRunner.execute(GenericProgramRunner.java:31)
at com.intellij.execution.runners.BaseProgramRunner.execute(BaseProgramRunner.java:53)
at com.intellij.execution.runners.GenericProgramRunner.execute(GenericProgramRunner.java:31)
at com.intellij.execution.ProgramRunnerUtil.executeConfiguration(ProgramRunnerUtil.java:94)
at com.intellij.execution.impl.ExecutionManagerImpl.start(ExecutionManagerImpl.java:396)
at com.intellij.execution.impl.ExecutionManagerImpl.access$400(ExecutionManagerImpl.java:61)
at com.intellij.execution.impl.ExecutionManagerImpl$5.run(ExecutionManagerImpl.java:384)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:351)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:332)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:734)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:569)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
我今天早上我的Android工作室促使我升級注意到。升級到最新版本1.5.1後,我現在可以構建和調試示例應用程序。謝謝您的幫助! – Phil