こんにちは、samsung skyrocket s2 (SGH-I727) で Android バージョン リリース 2.3.5 から 2.3.6 にアップグレードすると、addTab でこのエラーが発生します。しかし、私の友人はバージョン リリース 2.3.6 の samsung s2 (SGH-I777) を持っており、正常に動作しています。エミュレーターは正常に動作します。この問題について何か考えはありますか?
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): java.lang.SecurityException: Requesting code from com.ifs.s.activity (with uid 10179)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at android.app.ActivityThread.getPackageInfo(ActivityThread.java:1296)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1546)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at android.app.ActivityThread.startActivityNow(ActivityThread.java:1491)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:127)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:339)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:691)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at android.widget.TabHost.setCurrentTab(TabHost.java:341)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at android.widget.TabHost.addTab(TabHost.java:226)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at com.ifs.s.view.MainTabView.populateTabs(MainTabView.java:79)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at com.ifs.s.view.MainTabView.onAttachedToWindow(MainTabView.java:73)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at android.view.View.dispatchAttachedToWindow(View.java:6309)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:1122)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:1127)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:1127)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at android.view.ViewRoot.performTraversals(ViewRoot.java:854)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at android.view.ViewRoot.handleMessage(ViewRoot.java:1949)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at android.os.Handler.dispatchMessage(Handler.java:99)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at android.os.Looper.loop(Looper.java:130)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at android.app.ActivityThread.main(ActivityThread.java:3691)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at java.lang.reflect.Method.invokeNative(Native Method)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at java.lang.reflect.Method.invoke(Method.java:507)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
05-01 15:24:34.625: E/com.ifs.s.view.MainTabView(21297): at dalvik.system.NativeStart.main(Native Method)
05-01 15:24:34.665: D/CLIPBOARD(21297): Hide Clipboard dialog at Starting input: finished by someone else... !
問題を引き起こす DefaultHttpClient() に絞り込みました。以下のコード、何かアイデアはありますか?
protected HttpClient createClient() {
return new DefaultHttpClient();
}
HttpClient createHttpClient() {
try {
KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
trustStore.load(null, null);
SSLSocketFactory sf = new AllowAllSSLSocketFactory(trustStore);
sf.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
HttpParams params = new BasicHttpParams();
HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
HttpProtocolParams.setContentCharset(params, HTTP.UTF_8);
SchemeRegistry registry = new SchemeRegistry();
registry.register(new Scheme(HTTP_PROTOCOL, PlainSocketFactory.getSocketFactory(), 80));
registry.register(new Scheme(HTTPS_PROTOCOL, sf, 443));
ClientConnectionManager ccm = new ThreadSafeClientConnManager(params, registry);
return createClient(params, ccm);
}
catch (Exception e) {
return createClient();
}
}