DatePicker
Androidアプリで使用しようとしています。レイアウトに追加すると、次のメッセージが表示されます。
The following classes could not be instantiated:
- android.widget.DatePicker (Open Class, Show Error Log)
See the Error Log (Window > Show View) for more details.
だから私はエラーログを調べました、そしてこれは私が見たものです:
android.widget.DatePicker failed to instantiate.
java.lang.NoClassDefFoundError: java/nio/charset/Charsets
at android.net.Uri.decode(Uri.java:1927)
at android.net.Uri$AbstractPart.getDecoded(Uri.java:1957)
at android.net.Uri$StringUri.getAuthority(Uri.java:579)
at android.provider.Settings$NameValueCache.getString(Settings.java:727)
at android.provider.Settings$System.getString(Settings.java:846)
at android.text.format.DateFormat.getDateFormatString(DateFormat.java:393)
at android.text.format.DateFormat.getDateFormatOrder(DateFormat.java:364)
at android.widget.DatePicker.reorderSpinners(DatePicker.java:511)
at android.widget.DatePicker.<init>(DatePicker.java:280)
at android.widget.DatePicker.<init>(DatePicker.java:145)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.android.ide.eclipse.adt.internal.editors.layout.ProjectCallback.instantiateClass(ProjectCallback.java:402)
at com.android.ide.eclipse.adt.internal.editors.layout.ProjectCallback.loadView(ProjectCallback.java:166)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:207)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:135)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:746)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:718)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:372)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:321)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:331)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:325)
at com.android.ide.eclipse.adt.internal.editors.layout.gle2.RenderService.createRenderSession(RenderService.java:372)
at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.renderWithBridge(GraphicalEditorPart.java:1640)
at [SNIPPED FOR LENGTH; SEE REVISION HISTORY FOR FULL TRACE -ed]
なぜこうなった?