0

私はアプリを開発しています。2.3.x バージョンを除くすべてのバージョンで正常に動作します。バージョン2.3.6および2.3.3のsamsung galaxy y電話でテストしましたが、動作しません

Manifest.xml で使用したアクセス許可は次のとおりです。

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="me.radhakrishna.buddyreader"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-permission android:name="android.permission.RECEIVE_SMS" />

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />

    <supports-screens android:smallScreens="true"
                      android:normalScreens="true"
                      android:largeScreens="true"/>

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="me.radhakrishna.buddyreader.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <receiver android:name=".TextMessageReceiver">
            <intent-filter> 
                <action android:name="android.provider.Telephony.SMS_RECEIVED" /> 
            </intent-filter> 
        </receiver>
    </application>

</manifest>

この問題を解決するにはどうすればよいですか。上記の Manifest.xml で説明したすべてのレベルの API のシミュレーターで正常に動作していても問題ありません。

エラーログ

02-18 18:44:16.920: I/TextToSpeech.java(345): initTts() successfully bound to service
02-18 18:44:40.639: V/(345): 9866235007
02-18 18:44:40.639: I/TextToSpeech.java - speak(345): speak text of length 64
02-18 18:45:04.080: W/KeyCharacterMap(345): No keyboard for id 0
02-18 18:45:04.080: W/KeyCharacterMap(345): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
02-18 18:45:05.189: E/ActivityThread(345): Activity me.radhakrishna.buddyreader.MainActivity has leaked ServiceConnection android.speech.tts.TextToSpeech$1@40520cf0 that was originally bound here
02-18 18:45:05.189: E/ActivityThread(345): android.app.ServiceConnectionLeaked: Activity me.radhakrishna.buddyreader.MainActivity has leaked ServiceConnection android.speech.tts.TextToSpeech$1@40520cf0 that was originally bound here
02-18 18:45:05.189: E/ActivityThread(345):  at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:938)
02-18 18:45:05.189: E/ActivityThread(345):  at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:833)
02-18 18:45:05.189: E/ActivityThread(345):  at android.app.ContextImpl.bindService(ContextImpl.java:867)
02-18 18:45:05.189: E/ActivityThread(345):  at android.content.ContextWrapper.bindService(ContextWrapper.java:347)
02-18 18:45:05.189: E/ActivityThread(345):  at android.speech.tts.TextToSpeech.initTts(TextToSpeech.java:467)
02-18 18:45:05.189: E/ActivityThread(345):  at android.speech.tts.TextToSpeech.<init>(TextToSpeech.java:433)
02-18 18:45:05.189: E/ActivityThread(345):  at me.radhakrishna.buddyreader.MainActivity.onActivityResult(MainActivity.java:59)
02-18 18:45:05.189: E/ActivityThread(345):  at android.app.Activity.dispatchActivityResult(Activity.java:3908)
02-18 18:45:05.189: E/ActivityThread(345):  at android.app.ActivityThread.deliverResults(ActivityThread.java:2528)
02-18 18:45:05.189: E/ActivityThread(345):  at android.app.ActivityThread.handleSendResult(ActivityThread.java:2574)
02-18 18:45:05.189: E/ActivityThread(345):  at android.app.ActivityThread.access$2000(ActivityThread.java:117)
02-18 18:45:05.189: E/ActivityThread(345):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:961)
02-18 18:45:05.189: E/ActivityThread(345):  at android.os.Handler.dispatchMessage(Handler.java:99)
02-18 18:45:05.189: E/ActivityThread(345):  at android.os.Looper.loop(Looper.java:123)
02-18 18:45:05.189: E/ActivityThread(345):  at android.app.ActivityThread.main(ActivityThread.java:3683)
02-18 18:45:05.189: E/ActivityThread(345):  at java.lang.reflect.Method.invokeNative(Native Method)
02-18 18:45:05.189: E/ActivityThread(345):  at java.lang.reflect.Method.invoke(Method.java:507)
02-18 18:45:05.189: E/ActivityThread(345):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
02-18 18:45:05.189: E/ActivityThread(345):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
02-18 18:45:05.189: E/ActivityThread(345):  at dalvik.system.NativeStart.main(Native Method)

私を助けてください。

4

1 に答える 1

0

この行が問題の原因です。

02-18 18:45:05.189: E/ActivityThread(345): Activity me.radhakrishna.buddyreader.MainActivity has leaked ServiceConnection android.speech.tts.TextToSpeech$1@40520cf0 that was originally bound here
02-18 18:45:05.189: E/ActivityThread(345): android.app.ServiceConnectionLeaked: Activity me.radhakrishna.buddyreader.MainActivity has leaked ServiceConnection android.speech.tts.TextToSpeech$1@40520cf0 that was originally bound
at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:938)

MainActivityを確認してください。このエラーは、静的クラス変数の誤用が原因である可能性があります。

于 2013-02-18T17:13:34.620 に答える