2012-05-02 62 views
0

我在我的項目中使用kso​​ap2(ksoap2-android-assembly-2.4-jar-with-dependencies.jar), 一切工作正常,但突然代碼停止工作在我實現這個( ksoap2) 界面我得到一個錯誤,這裏是logcat的結果顯示:KSOAP2實現crecre

05-02 06:21:45.969: I/System.out(345): debugger has settled (1341) 
05-02 06:21:46.234: I/dalvikvm(345): Failed resolving Lbikorot/Main/Entities/Users; interface 170 'Lorg/ksoap2/serialization/KvmSerializable;' 
05-02 06:21:46.234: W/dalvikvm(345): Link of class 'Lbikorot/Main/Entities/Users;' failed 
05-02 06:21:46.245: I/dalvikvm(345): Failed resolving Lbikorot/Main/Entities/Users; interface 170 'Lorg/ksoap2/serialization/KvmSerializable;' 
05-02 06:21:46.245: W/dalvikvm(345): Link of class 'Lbikorot/Main/Entities/Users;' failed 
05-02 06:21:46.245: W/dalvikvm(345): VFY: unable to resolve instance field 284 
05-02 06:21:46.245: D/dalvikvm(345): VFY: replacing opcode 0x54 at 0x0017 
05-02 06:21:46.245: D/dalvikvm(345): VFY: dead code 0x0019-001e in Lbikorot/Main/LogInActivity;.Login()V 
05-02 06:21:46.264: I/dalvikvm(345): Failed resolving Lbikorot/Main/Entities/Users; interface 170 'Lorg/ksoap2/serialization/KvmSerializable;' 
05-02 06:21:46.264: W/dalvikvm(345): Link of class 'Lbikorot/Main/Entities/Users;' failed 
05-02 06:21:46.264: E/dalvikvm(345): Could not find class 'bikorot.Main.Entities.Users', referenced from method global.utilities.GlobalUtil.<init> 
05-02 06:21:46.264: W/dalvikvm(345): VFY: unable to resolve new-instance 90 (Lbikorot/Main/Entities/Users;) in Lglobal/utilities/GlobalUtil; 
05-02 06:21:46.264: D/dalvikvm(345): VFY: replacing opcode 0x22 at 0x0009 
05-02 06:21:46.264: D/dalvikvm(345): VFY: dead code 0x000b-0048 in Lglobal/utilities/GlobalUtil;.<init>()V 

請幫助!!!!!!!

確定我使用HttpTransportSE(ksoap2 2.6.4),但代碼仍然崩潰當它擊中一個呼叫implamenting的KSOAP接口,下面是這個類的一個的代碼:

package bikorot.Main.Entities; 

    import java.util.Hashtable; 
    import org.ksoap2.serialization.KvmSerializable; 
    import org.ksoap2.serialization.PropertyInfo; 

    public class Users implements KvmSerializable { 

    public int kod; 
    public String name; 
    public String password; 
    public int kod_users_group; 
    public boolean pail; 
    public String edu_Bikoret; 


    public Users() 
    { } 

    public Users(int kod, String name, String password) 
    { 
     this.kod = kod; 
     this.name = name; 
     this.password = password; 
    } 

    @Override 
public int getPropertyCount() { 
    return 6; 
} 
    @Override 
public void getPropertyInfo(int index, Hashtable arg1, PropertyInfo info) { 
    switch (index) { 
    case 0: 
     info.type = PropertyInfo.INTEGER_CLASS; 
     info.name = "kod"; 
     break; 
    case 1: 
     info.type = PropertyInfo.STRING_CLASS; 
     info.name = "name"; 
     break; 
    case 2: 
     info.type = PropertyInfo.STRING_CLASS; 
     info.name = "password"; 
     break; 
    case 3: 
     info.type = PropertyInfo.INTEGER_CLASS; 
     info.name = "kod_users_group"; 
     break; 
    case 4: 
     info.type = PropertyInfo.BOOLEAN_CLASS; 
     info.name = "pail"; 
     break; 
    case 5: 
     info.type = PropertyInfo.STRING_CLASS; 
     info.name = "edu_Bikoret"; 
     break; 

    default: 
     break; 
    } 
} 

    @Override 
public void setProperty(int index, Object value) { 
    switch (index) { 
    case 0: 
     kod = Integer.parseInt(value.toString()); 
     break; 
    case 1: 
     name = value.toString(); 
     break; 
    case 2: 
     password = value.toString(); 
    case 3: 
     kod_users_group = Integer.parseInt(value.toString()); 
     break; 
    case 4: 
     pail =Boolean.parseBoolean(value.toString()); 
    case 5: 
     edu_Bikoret = value.toString(); 
     break; 

    default: 
     break; 
    } 
} 

    @Override 
public Object getProperty(int arg0) { 

    switch (arg0) { 
    case 0: 
     return kod; 
    case 1: 
     return name; 
    case 2: 
     return password; 
    case 3: 
     return kod_users_group; 
    case 4: 
     return pail; 
    case 5: 
     return edu_Bikoret; 
    } 

    return null; 
     } 

    } 
+0

嗨,我不知道你的錯誤,但使用漂亮的舊JAR文件。可以在格式中添加你的錯誤形式,它很難像這樣讀取。 –

+0

嘗試新的jar ... –

+0

嗨Mohit,好吧,我用新的替換舊的jar(2.6.4)我得到一個錯誤androidHttpTransport不能解析爲類型 – Dude

回答

0

我認爲您需要將獲得者和設置者添加到Users類。