プロジェクトで ksoap2 (ksoap2-android-assembly-2.4-jar-with-dependencies.jar) を使用しています。すべて正常に動作しますが、この (ksoap2) インターフェイスを実装したすべてのクラスで突然コードが動作しなくなり、エラーが発生します。 、これは LogCat の結果を示しています。
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) を使用していますが、ksoap インターフェイスを実装する呼び出しにヒットすると、コードがまだクラッシュします。このクラスの 1 つのコードを次に示します。
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;
}
}