2012-12-13 61 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