package com.example.activity02;import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;public class MyAuthenticator extends Authenticator { private String strUser;
private String strPwd;
public MyAuthenticator() {
}
public PasswordAuthentication performCheck(String userName,String password)
{
this.strUser = userName;
this.strPwd = password;
return getPasswordAuthentication();
}
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(strUser, strPwd);
}
}这个类在android项目中编译没有问题,运行的时候,报java.lang.NoClassDefFoundError: com.example.activity02.MyAuthenticator
谁知道什么原因,求帮忙,这个是一个认证权限的类android问题
import javax.mail.PasswordAuthentication;public class MyAuthenticator extends Authenticator { private String strUser;
private String strPwd;
public MyAuthenticator() {
}
public PasswordAuthentication performCheck(String userName,String password)
{
this.strUser = userName;
this.strPwd = password;
return getPasswordAuthentication();
}
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(strUser, strPwd);
}
}这个类在android项目中编译没有问题,运行的时候,报java.lang.NoClassDefFoundError: com.example.activity02.MyAuthenticator
谁知道什么原因,求帮忙,这个是一个认证权限的类android问题
解决方案 »
- 怎么用fragment实现tabhost的功能
- adroid的DNK开发出来的so文件,怎样可以再Linux下直接调用?
- 各位看官,小弟下载源码不幸遇到错误,求各位大大帮忙分析分析~~~
- 怎样在高版本Api中用Geocoder
- android 内存问题
- 具体如何判断是否非系统应用呢????求大神赐教。。。
- 【离线版】关于asp.net 与Android离线数据同步的设计思想
- 显示unity3d的时候,切换页面黑色闪屏
- android的适配问题?在线等...
- 大神求解答,这个工作原理是什么,硬件怎么配置,怎么编程
- cocos2d-x 在层上加载一个tableview,结果这个tableview可以拖动,但是不能响应点击cell事件
- mplayer-android编译问题
你把Jar包放在libs目录(新建一个)