2012-03-08 7 views
2

私は、アクティビティとサービスで構成された非常に簡単なAndroidアプリケーションを作成しています。私は私のギャラクシータブの上または仮想デバイスでアプリケーションを実行すると、すべてが正常に見える、とmainTextが正しいクラス名を読み取りadbのみのエラー

@Override 
public void onResume() 
{ 
    super.onResume(); 

    mServiceIntent = new Intent(this, RemoteIntegerService.class); 
    ComponentName name = startService(mServiceIntent); 
    TextView mainText = (TextView)findViewById(R.id.mainText); 
    mainText.setText(name == null ? "(null)" : name.getClassName()); 
} 

を行うことで活動に私のサービスを読み込みます。

しかし、adbの "debug over usb feature"を使ってEclipseでアプリケーションを起動すると、インテントコンストラクタ(実際のデバイスと仮想デバイスの両方)にエラーがあります。 - > RemoteIntegerService(本名、スタックトレースとコヒーレントであるために)

RemoteInteger [Android Application] 
DalvikVM[localhost:8621]  
    Thread [<1> main] (Class load: RemoteIntegerService)  
     DexFile.defineClass(String, ClassLoader, int, ProtectionDomain) line: not available [native method] 
     DexFile.loadClassBinaryName(String, ClassLoader) line: 207 
     PathClassLoader.findClass(String) line: 211 
     PathClassLoader(ClassLoader).loadClass(String, boolean) line: 540 
     PathClassLoader(ClassLoader).loadClass(String) line: 500  
     RemoteIntegerActivity.onResume() line: 28 
     Instrumentation.callActivityOnResume(Activity) line: 1153 
     RemoteIntegerActivity(Activity).performResume() line: 4428 
     ActivityThread.performResumeActivity(IBinder, boolean) line: 2217 
     ActivityThread.handleResumeActivity(IBinder, boolean, boolean) line: 2255 
     ActivityThread.handleLaunchActivity(ActivityThread$ActivityClientRecord, Intent) line: 1769 
     ActivityThread.access$1500(ActivityThread, ActivityThread$ActivityClientRecord, Intent) line: 122 
     ActivityThread$H.handleMessage(Message) line: 1002 
     ActivityThread$H(Handler).dispatchMessage(Message) line: 99 
     Looper.loop() line: 132 
     ActivityThread.main(String[]) line: 4025  
     Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method] 
     Method.invoke(Object, Object...) line: 491 
     ZygoteInit$MethodAndArgsCaller.run() line: 841 
     ZygoteInit.main(String[]) line: 599 
     NativeStart.main(String[]) line: not available [native method] 
    Thread [<8> Binder Thread #2] (Running) 
    Thread [<7> Binder Thread #1] (Running) 

編集

  • コピーされたフルスタックトレース

  • たMyService:ここではスタックトレースです

編集2 - サブ質問

エラーに関する情報は見つかりませんでした。プログラムはちょうど停止します、私はスタックトレースを参照してください、しかし、他に何もありません。 Visual Studioには、発生した例外を説明するポップアップがあります。 Eclipseのようなものはありますか?

+0

これは完全なスタックトレースのようではありません。上部にはさらにいくつかの線がなければなりません。 –

+0

私はこれを取得していない:別の方法を使用してapk(eclipse以外)を作成しますか?もしそうなら、それをどのように構築しますか? –

+0

いいえ、私はEclipseでapkをビルドしますが、Eclipseを使用してapkをビルドした後は、デバイスにインストールしたままにしておくので、Eclipseなしでアプリを実行できます。 Eclipseでadbから実行すると、バグがあります。Eclipseなしで実行するとうまく動作します。 (しかし、私はEclipseでデバッグできるようにしたいと思っています...) – Julien

答えて

1

ジュリアンは、デバッガがメッセージで停止することが指摘されたように:ブレークポイントは、クラスに設定されているため

defineClass(String, ClassLoader, int, ProtectionDomain) line: not available [native method] 

。ブレークポイントを削除すると、この問題が解決されます。

関連する問題