2012-12-13 96 views
1

我遵循正確的過程在我的eclipse項目中生成ITelephony.java類。ITelephony .java沒有正確生成

但它似乎沒有正確生成,因爲我已經在文件中出現頻率很多的紅色警告。我在Ubuntu 12.04 64位下運行。奇怪的是,它在我工作的個人電腦上運行在windows下。事情是我真的需要在我的筆記本電腦上工作才能在家工作。

我在兩個設備上都使用eclipse的Juno版本。

什麼可能導致此問題?

任何答案/想法都會很棒,因爲我真的不知道如何解決它。

編輯1:抱歉忘了指定我得到的錯誤。所有相同類型的,例如使用「@覆蓋公共android.os.IBinder asBinder(){ 回報 本; }」

我得到:「方法asBinder()類型的ITelephony.Stub必須覆蓋超類方法「和」實現androidod.IIterface.asBinder「。

這裏是完全生成文件:

/* 
* This file is auto-generated. DO NOT MODIFY. 
* Original file: /home/lenore/workspace/Launcher/src/com/android/internal/telephony/ITelephony.aidl 
*/ 
package com.android.internal.telephony; 
public interface ITelephony extends android.os.IInterface 
{ 
/** Local-side IPC implementation stub class. */ 
public static abstract class Stub extends android.os.Binder implements com.android.internal.telephony.ITelephony 
{ 
private static final java.lang.String DESCRIPTOR = "com.android.internal.telephony.ITelephony"; 
/** Construct the stub at attach it to the interface. */ 
public Stub() 
{ 
this.attachInterface(this, DESCRIPTOR); 
} 
/** 
* Cast an IBinder object into an com.android.internal.telephony.ITelephony interface, 
* generating a proxy if needed. 
*/ 
public static com.android.internal.telephony.ITelephony asInterface(android.os.IBinder obj) 
{ 
if ((obj==null)) { 
return null; 
} 
android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR); 
if (((iin!=null)&&(iin instanceof com.android.internal.telephony.ITelephony))) { 
return ((com.android.internal.telephony.ITelephony)iin); 
} 
return new com.android.internal.telephony.ITelephony.Stub.Proxy(obj); 
} 
@Override public android.os.IBinder asBinder() 
{ 
return this; 
} 
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException 
{ 
switch (code) 
{ 
case INTERFACE_TRANSACTION: 
{ 
reply.writeString(DESCRIPTOR); 
return true; 
} 
case TRANSACTION_endCall: 
{ 
data.enforceInterface(DESCRIPTOR); 
boolean _result = this.endCall(); 
reply.writeNoException(); 
reply.writeInt(((_result)?(1):(0))); 
return true; 
} 
case TRANSACTION_dial: 
{ 
data.enforceInterface(DESCRIPTOR); 
java.lang.String _arg0; 
_arg0 = data.readString(); 
this.dial(_arg0); 
reply.writeNoException(); 
return true; 
} 
case TRANSACTION_answerRingingCall: 
{ 
data.enforceInterface(DESCRIPTOR); 
this.answerRingingCall(); 
reply.writeNoException(); 
return true; 
} 
} 
return super.onTransact(code, data, reply, flags); 
} 
private static class Proxy implements com.android.internal.telephony.ITelephony 
{ 
private android.os.IBinder mRemote; 
Proxy(android.os.IBinder remote) 
{ 
mRemote = remote; 
} 
@Override public android.os.IBinder asBinder() 
{ 
return mRemote; 
} 
public java.lang.String getInterfaceDescriptor() 
{ 
return DESCRIPTOR; 
} 
@Override public boolean endCall() throws android.os.RemoteException 
{ 
android.os.Parcel _data = android.os.Parcel.obtain(); 
android.os.Parcel _reply = android.os.Parcel.obtain(); 
boolean _result; 
try { 
_data.writeInterfaceToken(DESCRIPTOR); 
mRemote.transact(Stub.TRANSACTION_endCall, _data, _reply, 0); 
_reply.readException(); 
_result = (0!=_reply.readInt()); 
} 
finally { 
_reply.recycle(); 
_data.recycle(); 
} 
return _result; 
} 
@Override public void dial(java.lang.String number) throws android.os.RemoteException 
{ 
android.os.Parcel _data = android.os.Parcel.obtain(); 
android.os.Parcel _reply = android.os.Parcel.obtain(); 
try { 
_data.writeInterfaceToken(DESCRIPTOR); 
_data.writeString(number); 
mRemote.transact(Stub.TRANSACTION_dial, _data, _reply, 0); 
_reply.readException(); 
} 
finally { 
_reply.recycle(); 
_data.recycle(); 
} 
} 
@Override public void answerRingingCall() throws android.os.RemoteException 
{ 
android.os.Parcel _data = android.os.Parcel.obtain(); 
android.os.Parcel _reply = android.os.Parcel.obtain(); 
try { 
_data.writeInterfaceToken(DESCRIPTOR); 
mRemote.transact(Stub.TRANSACTION_answerRingingCall, _data, _reply, 0); 
_reply.readException(); 
} 
finally { 
_reply.recycle(); 
_data.recycle(); 
} 
} 
} 
static final int TRANSACTION_endCall = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0); 
static final int TRANSACTION_dial = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1); 
static final int TRANSACTION_answerRingingCall = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2); 
} 
public boolean endCall() throws android.os.RemoteException; 
public void dial(java.lang.String number) throws android.os.RemoteException; 
public void answerRingingCall() throws android.os.RemoteException; 
} 
+0

,你得到什麼錯誤?沒有實際告訴我們,我們沒有猜測的希望。 –

回答

6

嗯,我只是需要來設置Java編譯器級別1.6,而不是1.5 ...捂臉

+0

謝謝。爲我節省了很多時間。 –

+0

很高興我能幫到你! – MademoiselleLenore