Android Studio报错 java.lang.IllegalStateException

package com.example.q9722.biancheng1;

import android.media.Image;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.widget.ImageView;

import java.util.ArrayList;
import java.util.List;

public class MainActivity extends AppCompatActivity implements View.OnClickListener{
ViewPager mviewPager;
mFragmentAdapter madapter;
FragmentOne mone;
FragmentTwo mtwo;
FragmentThree mthree;
List mFragmentList;
ImageView[] mimageViews;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getSupportActionBar().hide();
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_main);
initViews();
madapter = new mFragmentAdapter(getSupportFragmentManager(),mFragmentList);
mviewPager.setOffscreenPageLimit(3);
mviewPager.setAdapter(madapter);
mviewPager.setCurrentItem(0);
mimageViews[1].setImageResource(R.drawable.blue_circle);
mviewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {

        }

        @Override
        public void onPageSelected(int position) {
            for(int i=0;i<3;i++) {
                mimageViews[i].setImageResource(R.drawable.write_circle);
            }
            mimageViews[position].setImageResource(R.drawable.blue_circle);
        }

        @Override
        public void onPageScrollStateChanged(int state) {

        }
    });
}

private void initViews() {
    mviewPager = (ViewPager) findViewById(R.id.viewpager);
    mFragmentList = new ArrayList<Fragment>();
    mone = new FragmentOne();
    mtwo = new FragmentTwo();
    mthree = new FragmentThree();
    mFragmentList.add(mone);
    mFragmentList.add(mtwo);
    mFragmentList.add(mthree);
    mimageViews = new ImageView[3];
    mimageViews[0] = (ImageView) findViewById(R.id.iv1);
    mimageViews[1] = (ImageView) findViewById(R.id.iv2);
    mimageViews[2] = (ImageView) findViewById(R.id.iv3);
    mimageViews[0].setOnClickListener(this);
    mimageViews[1].setOnClickListener(this);
    mimageViews[2].setOnClickListener(this);
}

@Override
public void onClick(View v) {
    switch (v.getId()) {
        case R.id.iv1:
            mviewPager.setCurrentItem(0,true);
            break;
        case R.id.iv2:
            mviewPager.setCurrentItem(1,true);
            break;
        case R.id.iv3:
            mviewPager.setCurrentItem(2,true);
            break;
    }
}

}

10个回答

引用v4,v7只需其中一个即可,无需重复添加,会报错

q9722088
q9722088 怎么改v4v7呢
2 年多之前 回复

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.q9722.biancheng1, PID: 10821
java.lang.IllegalStateException: No tab known for tag null
at android.support.v4.app.FragmentTabHost.doTabChanged(FragmentTabHost.java:336)
at android.support.v4.app.FragmentTabHost.onAttachedToWindow(FragmentTabHost.java:282)
at android.view.View.dispatchAttachedToWindow(View.java:15417)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2955)
at android.view.ViewGroup.addViewInner(ViewGroup.java:4495)
at android.view.ViewGroup.addViewInLayout(ViewGroup.java:4432)
at android.view.ViewGroup.addViewInLayout(ViewGroup.java:4410)
at android.support.v4.view.ViewPager.addView(ViewPager.java:1475)
at android.view.ViewGroup.addView(ViewGroup.java:4237)
at android.view.ViewGroup.addView(ViewGroup.java:4210)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1124)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1290)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:801)
at android.support.v4.app.FragmentManagerImpl.execSingleAction(FragmentManager.java:1638)
at android.support.v4.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:679)
at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:143)
at android.support.v4.view.ViewPager.populate(ViewPager.java:1240)
at android.support.v4.view.ViewPager.populate(ViewPager.java:1088)
at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1614)
at android.view.View.measure(View.java:19759)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6122)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:758)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:640)
at android.view.View.measure(View.java:19759)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6122)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:135)
at android.view.View.measure(View.java:19759)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6122)
at android.support.v7.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:389)
at android.view.View.measure(View.java:19759)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6122)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:19759)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6122)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:758)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:640)
at android.view.View.measure(View.java:19759)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6122)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at com.android.internal.policy.DecorView.onMeasure(DecorView.java:690)
at android.view.View.measure(View.java:19759)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2317)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1404)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1653)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1292)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6368)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:873)
at android.view.Choreographer.doCallbacks(Choreographer.java:685)
at android.view.Choreographer.doFrame(Choreographer.java:621)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:859)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6321)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770)
Application terminated.

引用v4,v7只需其中一个,无需重复添加,会报错

http://ask.csdn.net/questions/349183

要不用v4,要不用v7,不要混用

import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;

dcxy0
Q544471255 回复q9722088: 只用一个就可以了啊
2 年多之前 回复
q9722088
q9722088 怎么改v4v7呢
2 年多之前 回复

可以加我的qq,我给你讲讲

要么用v4,要么用v7,不要混用,引用v4,v7只需其中一个,无需重复添加,会报错

q9722088
q9722088 怎么改v4v7呢
2 年多之前 回复

v4,v7两者只需使用一个,不要混用。建议使用v7,适应于任何版本的开发,保证了兼容性。

q9722088
q9722088 怎么改v4v7呢
2 年多之前 回复

fragmengAdapter里面有没报错

尝试一下将API的版本调低,一般来说API 19是兼容性最广的。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
MediaRecorder录屏,Socket传输录屏内容报错java.lang.IllegalStateException

用模拟器调试可以运行,用真机测试在 mediaRecorder.prepare();抛异常 ``` package www.xjw.com.mymiracast2.screenrecordservice; import android.app.Notification; import android.app.Service; import android.content.Context; import android.content.Intent; import android.hardware.display.DisplayManager; import android.hardware.display.VirtualDisplay; import android.media.MediaRecorder; import android.media.projection.MediaProjection; import android.media.projection.MediaProjectionManager; import android.os.IBinder; import android.os.ParcelFileDescriptor; import java.net.Socket; /** * Created by dzjin on 2018/1/9. */ public class ScreenRecordService extends Service { private int resultCode; private Intent resultData=null; private MediaProjection mediaProjection=null; private MediaRecorder mediaRecorder=null; private VirtualDisplay virtualDisplay=null; private int mScreenWidth; private int mScreenHeight; private int mScreenDensity; private static String filePathName; private Socket receiver = null; private ParcelFileDescriptor pfd = null; private Context context=null; private String host = null; private int port = 8989; @Override public void onCreate() { super.onCreate(); //startForeground(2, new Notification()); } /** * 每次客户端通过调用startService(Intent)显式启动服务时,系统调用startService(Intent), *提供它提供的参数和表示启动请求的唯一整数标记。 * 不要直接调用这个方法。 * @param intent * @param flags * @param startId * @return */ @Override public int onStartCommand(Intent intent, int flags, int startId) { try{ resultCode=intent.getIntExtra("resultCode",-1); resultData=intent.getParcelableExtra("resultData"); mScreenWidth=intent.getIntExtra("mScreenWidth",0); mScreenHeight=intent.getIntExtra("mScreenHeight",0); mScreenDensity=intent.getIntExtra("mScreenDensity",0); filePathName=intent.getStringExtra("filePathName"); host=intent.getStringExtra("host"); port=intent.getIntExtra("port",8989); receiver = new Socket(host, port); pfd = ParcelFileDescriptor .fromSocket(receiver); mediaProjection=createMediaProjection(); mediaRecorder=createMediaRecorder(); virtualDisplay=createVirtualDisplay(); mediaRecorder.start(); }catch (Exception e) { e.printStackTrace(); } /** * START_NOT_STICKY: *从onStartCommand返回的常量(Intent, int, int):如果这个服务的进程是 *在启动时被杀死(从onStartCommand(Intent, int, int)返回后), *没有新的start意图交付给它,然后将服务从 *启动状态,在以后显式调用Context.startService(Intent)之前不要重新创建。 *服务将不会接收带有空意图的onStartCommand(Intent, int, int)调用 *因为如果没有等待交付的意图,它将不会重新启动。 */ return Service.START_NOT_STICKY; } public MediaProjection createMediaProjection(){ /** *使用getSystemService(类)检索MediaProjectionManager实例 *管理媒体放映会议。 */ return ((MediaProjectionManager)getSystemService(Context.MEDIA_PROJECTION_SERVICE)) .getMediaProjection(resultCode,resultData); /** *检索从成功的屏幕捕获请求中获得的MediaProjection。 *如果startActivityForResult()的结果不是RESULT_OK,则*将为null。 */ } private MediaRecorder createMediaRecorder(){ //用于录制音频和视频。录音控制是基于一个简单的状态机。 MediaRecorder mediaRecorder=new MediaRecorder(); //设置要录音的源。 //mediaRecorder.setAudioSource(MediaRecorder. AudioSource.CAMCORDER); //设置要录制的视频源。 mediaRecorder.setVideoSource(MediaRecorder.VideoSource.SURFACE); //设置录制过程中产生的输出的格式。 //3GPP媒体文件格式 mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_2_TS); //设置录音格式 //mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); //设置录像编码比特率。 //param:以比特/秒为单位的视频编码比特率 mediaRecorder.setVideoEncodingBitRate(5*mScreenWidth*mScreenHeight); //设置录像编码器用于录像。 mediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264); //设置要拍摄的视频的宽度和高度。 mediaRecorder.setVideoSize(mScreenWidth,mScreenHeight); //设置要捕获视频的帧速率。 mediaRecorder.setVideoFrameRate(60); try{ mediaRecorder.setOutputFile(pfd.getFileDescriptor()); //mediaRecorder.setOutputFile(filePathName); **此次抛异常** //准备记录器开始捕捉和编码数据。 mediaRecorder.prepare(); }catch (Exception e){ e.printStackTrace(); } return mediaRecorder; } private VirtualDisplay createVirtualDisplay(){ /** *名称字符串:虚拟显示的名称,必须是非空的。这个值不能为空。 width int:虚拟显示的宽度,以像素为单位。必须大于0。 高度int:虚拟显示器的高度,以像素为单位。必须大于0。 dpi int: dpi中虚拟显示的密度。必须大于0。 标志int:虚拟显示标志的组合。有关标志的完整列表,请参见DisplayManager。 surface surface:虚拟显示内容应该呈现到的表面,如果一开始没有,则为null。 回调virtualdisplay。回调:当虚拟显示的状态改变时调用的回调,如果没有,则为空。 处理程序处理程序:应该在其上调用回调的处理程序,如果应该在调用线程的主循环程序上调用回调,则为null。 */ /** * DisplayManager.VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR *虚拟显示标志:当没有显示内容时,允许在私有显示上镜像内容。 */ return mediaProjection.createVirtualDisplay("mediaProjection",mScreenWidth,mScreenHeight,mScreenDensity, DisplayManager.VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR,mediaRecorder.getSurface(),null,null); } @Override public void onDestroy() { super.onDestroy(); if(virtualDisplay!=null){ virtualDisplay.release(); virtualDisplay=null; } if(mediaRecorder!=null){ mediaRecorder.stop(); mediaRecorder=null; } if(mediaProjection!=null){ mediaProjection.stop(); mediaProjection=null; } } @Override public IBinder onBind(Intent intent) { System.out.println("==============================="); return null; } } ``` I/MediaRecorder: enter in file frameworks/av/media/libmedia/mediarecorder.cpp, function prepare, line 461 I/IMediaRecorder: prepare (BpMediaRecorder client) in file frameworks/av/media/libmedia/IMediaRecorder.cpp, function prepare, line 249 W/com.mymiracast2: type=1400 audit(0.0:104572): avc: denied { read write } for path="socket:[8870267]" dev="sockfs" ino=8870267 scontext=u:r:mediaserver:s0 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=tcp_socket permissive=0 E/MediaRecorder: prepare failed: -38 W/zygote64: Got a deoptimization request on un-deoptimizable method void android.media.MediaRecorder._prepare() W/System.err: java.lang.IllegalStateException W/System.err: at android.media.MediaRecorder._prepare(Native Method) W/System.err: at android.media.MediaRecorder.prepare(MediaRecorder.java:1017) W/System.err: at www.xjw.com.mymiracast2.screenrecordservice.ScreenRecordService.createMediaRecorder(ScreenRecordService.java:137) W/System.err: at www.xjw.com.mymiracast2.screenrecordservice.ScreenRecordService.onStartCommand(ScreenRecordService.java:79) W/System.err: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4151) W/System.err: at android.app.ActivityThread.-wrap21(Unknown Source:0) W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2119) W/System.err: at android.os.Handler.dispatchMessage(Handler.java:108) W/System.err: at android.os.Looper.loop(Looper.java:166) W/System.err: at android.app.ActivityThread.main(ActivityThread.java:7529) W/System.err: at java.lang.reflect.Method.invoke(Native Method) W/System.err: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245) W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921) E/MediaRecorder: SurfaceMediaSource could not be initialized! W/System.err: java.lang.IllegalStateException: failed to get surface at android.media.MediaRecorder.getSurface(Native Method) W/System.err: at www.xjw.com.mymiracast2.screenrecordservice.ScreenRecordService.createVirtualDisplay(ScreenRecordService.java:160) at www.xjw.com.mymiracast2.screenrecordservice.ScreenRecordService.onStartCommand(ScreenRecordService.java:80) W/System.err: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4151) at android.app.ActivityThread.-wrap21(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2119) at android.os.Handler.dispatchMessage(Handler.java:108) W/System.err: at android.os.Looper.loop(Looper.java:166) at android.app.ActivityThread.main(ActivityThread.java:7529) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245) W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921) D/StrictMode: StrictMode policy violation; ~duration=7334 ms: android.os.StrictMode$StrictModeNetworkViolation: policy=65543 violation=4 at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1466) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:356) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:201) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:183) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:356) at java.net.Socket.connect(Socket.java:616) at java.net.Socket.connect(Socket.java:565) at java.net.Socket.<init>(Socket.java:445) at java.net.Socket.<init>(Socket.java:217) at www.xjw.com.mymiracast2.screenrecordservice.ScreenRecordService.onStartCommand(ScreenRecordService.java:74) at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4151) at android.app.ActivityThread.-wrap21(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2119) at android.os.Handler.dispatchMessage(Handler.java:108) at android.os.Looper.loop(Looper.java:166) at android.app.ActivityThread.main(ActivityThread.java:7529) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921) D/StrictMode: StrictMode policy violation; ~duration=7332 ms: android.os.StrictMode$StrictModeNetworkViolation: policy=65543 violation=4 ``` ```

com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $报错

使用gson出现的问题,logcat显示如下 Process: vip.markxu.instagram1, PID: 12426 ``` com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $ at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226) at com.google.gson.Gson.fromJson(Gson.java:927) at com.google.gson.Gson.fromJson(Gson.java:892) at com.google.gson.Gson.fromJson(Gson.java:841) at com.google.gson.Gson.fromJson(Gson.java:813) at vip.markxu.instagram.fuhaoyi.LoginActivity$1$1.run(LoginActivity.java:104) at android.os.Handler.handleCallback(Handler.java:754) ``` 试过网上说的方法,每一个具体例子,大概都是说后台程序返回数据格式不正确,有理但没用。 -———————————————————————————————— 代码段 UserPOJO类 ``` public class UserPOJO { private String userid; private String account; private String password; private String userfavicon; private String username; private int status; public UserPOJO(String userid,String account,String password,String userfavicon,String username,int status){ this.userid=userid; this.account=account; this.password=password; this.userfavicon=userfavicon; this.username=username; this.status=status; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getAccount() { return account; } public void setAccount(String account) { this.account = account; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getUserid() { return userid; } public void setUserid(String userid) { this.userid = userid; } public String getUserfavicon() { return userfavicon; } public void setUserfavicon(String userfavicon) { this.userfavicon = userfavicon; } public int getStatus() { return status; } public void setStatus(int status) { this.status = status; } } ``` 应用gson代码段 ```java public void registerWithOkHttp(String address,String account,String password){ HttpUtil.registerWithOkHttp(address, account, password, new Callback() { @Override public void onFailure(Call call, IOException e) { //在这里对异常情况进行处理 } @Override public void onResponse(Call call, Response response) throws IOException { final String responseData = response.body().string(); runOnUiThread(new Runnable() { @Override public void run() { Gson gson=new Gson(); //报错地方 user = gson.fromJson(responseData, UserPOJO.class); if(user.getStatus()==1){ SharedPreferences sharedPreferences = getSharedPreferences("user", Context.MODE_PRIVATE); SharedPreferences.Editor editor = sharedPreferences.edit(); editor.putString("user_id", user.getUserid()); editor.putString("userfavicon",user.getUserfavicon()); editor.apply(); Intent intent = new Intent(LoginActivity.this, MainActivity.class); startActivity(intent); finish(); } else{ Toast.makeText(LoginActivity.this,"注册失败",Toast.LENGTH_SHORT).show(); } } }); } }); } ``` json格式: ``` package vip.markxu.instagram.xiexizhou.Utils; import java.io.Serializable; import java.util.List; public class IndexJson implements Serializable { List<item> data; public List<item> getList() { return data; } @Override public String toString() { return "IndexJson{" + "data=" + data + '}'; } public void setList(List<item> list) { this.data = list; } public static class item implements Serializable{ private Integer comments_numb; private String contents; private String img; private String mime; private String post_id; private String postdate; private String userid; private String userfavicon; private String likes; private String username; private List<Comments> comments; public List<Comments> getComments() { return comments; } public void setComments(List<Comments> comments) { this.comments = comments; } public static class Comments implements Serializable{ private String comment_id; private String comment_time; private String content; private String post_id; private String username; private String user_favicon; public String getUser_favicon() { return user_favicon; } public void setUser_favicon(String user_favicon) { this.user_favicon = user_favicon; } public String getComment_id() { return comment_id; } public void setComment_id(String comment_id) { this.comment_id = comment_id; } public String getComment_time() { return comment_time; } public void setComment_time(String comment_time) { this.comment_time = comment_time; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public String getPost_id() { return post_id; } public void setPost_id(String post_id) { this.post_id = post_id; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } } @Override public String toString() { return "item{" + "comments_numb=" + comments_numb + ", contents='" + contents + '\'' + ", img='" + img + '\'' + ", mime='" + mime + '\'' + ", post_id='" + post_id + '\'' + ", postdate='" + postdate + '\'' + ", userid='" + userid + '\'' + ", userfavicon='" + userfavicon + '\'' + ", likes='" + likes + '\'' + ", username='" + username + '\'' + '}'; } public String getUserfavicon() { return userfavicon; } public void setUserfavicon(String userfavicon) { this.userfavicon = userfavicon; } public String getLikes() { return likes; } public void setLikes(String likes) { this.likes = likes; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public Integer getComments_numb() { return comments_numb; } public void setComments_numb(Integer comments_numb) { this.comments_numb = comments_numb; } public String getContents() { return contents; } public void setContents(String contents) { this.contents = contents; } public String getImg() { return img; } public void setImg(String img) { this.img = img; } public String getMime() { return mime; } public void setMime(String mime) { this.mime = mime; } public String getPost_id() { return post_id; } public void setPost_id(String post_id) { this.post_id = post_id; } public String getPostdate() { return postdate; } public void setPostdate(String postdate) { this.postdate = postdate; } public String getUserid() { return userid; } public void setUserid(String userid) { this.userid = userid; } } } ``` 求解决,具体方法

Android studio打包编译遇到的问题

最近开发过程中遇到个问题:如果不打包的话直接编译运行程序没什么问题,一但打包就会报错,但是只是部分机型,目前发现的有:魅族MX4、 奇酷 8681-M02。所报错误如下: java.lang.IllegalStateException:Fatal Exception thrown on Scheduler.Worker thread. en.c$b.run(SourceFile:114) ...... Caused by: java.lang.IncompatibleClassChangeError:Class 'java.lang.Class' does not implement interface 'java.util.Collection' in call to 'java.lang.Object[] java.util.Collection.toArray()' (declaration of 'java.lang.reflect.ArtMethod' appears in /system/framework/core-libart.jar) java.util.ArrayList.addAll(ArrayList.java:188) 目前尝试过的方法:开始想打包无非做的就是混淆,结果去掉混淆打包还是报这个错,于是乎怀疑是.so 文件的不兼容,但是不管是全平台还是部分针对报错的cpu打包还是会报这个错。实在无解了,希望大神指点下,万分感谢~~

android studio 新建项目运行报错

Logcat 报错如下: **09-08 10:11:56.694 6639-6639/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.max.myapplication, PID: 6639 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.max.myapplication/com.max.myapplication.MainActivity}: java.lang.IllegalStateException: This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2219) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2269) at android.app.ActivityThread.access$800(ActivityThread.java:135) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5045) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.IllegalStateException: This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat. at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:692) at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:186) at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:77) at android.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java:83) at android.support.v7.app.AppCompatDelegateImplV7.<init>(AppCompatDelegateImplV7.java:146) at android.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java:28) at android.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java:41) at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:193) at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:173) at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:511) at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:71) at com.max.myapplication.MainActivity.onCreate(MainActivity.java:10) at android.app.Activity.performCreate(Activity.java:5231) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2163) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2269)  at android.app.ActivityThread.access$800(ActivityThread.java:135)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:136)  at android.app.ActivityThread.main(ActivityThread.java:5045)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:515)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)  at dalvik.system.NativeStart.main(Native Method)  09-08 10:11:58.562 6639-6639/? I/Process: Sending signal. PID: 6639 SIG: 9****

android 混淆报错,使用的是android studio

Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'. > java.io.IOException: Please correct the above warnings first.

新手AndroidStudio点击AndroidDeviceMonitor报错,不知道怎么解决

![图片说明](https://img-ask.csdn.net/upload/201711/25/1511585106_228731.png) ![图片说明](https://img-ask.csdn.net/upload/201711/25/1511585121_969835.png) !SESSION 2017-11-25 12:22:22.347 ----------------------------------------------- eclipse.buildId=unknown java.version=9.0.1 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN Command-line arguments: -os win32 -ws win32 -arch x86_64 -data @noDefault !ENTRY org.eclipse.osgi 4 0 2017-11-25 12:22:22.832 !MESSAGE Bundle reference:file:org.apache.ant_1.8.3.v201301120609/@4 not found. !ENTRY org.eclipse.osgi 4 0 2017-11-25 12:22:22.832 !MESSAGE Bundle reference:file:org.apache.jasper.glassfish_2.2.2.v201205150955.jar@4 not found. !ENTRY org.eclipse.osgi 4 0 2017-11-25 12:22:22.832 !MESSAGE Bundle reference:file:org.apache.lucene.core_2.9.1.v201101211721.jar@4 not found. !ENTRY org.eclipse.osgi 4 0 2017-11-25 12:22:22.847 !MESSAGE Bundle reference:file:org.eclipse.help.base_3.6.101.v201302041200.jar@4 not found. !ENTRY org.eclipse.osgi 4 0 2017-11-25 12:22:22.863 !MESSAGE Bundle reference:file:org.eclipse.help.ui_3.5.201.v20130108-092756.jar@4 not found. !ENTRY org.eclipse.osgi 4 0 2017-11-25 12:22:22.863 !MESSAGE Bundle reference:file:org.eclipse.help.webapp_3.6.101.v20130116-182509.jar@4 not found. !ENTRY org.eclipse.osgi 4 0 2017-11-25 12:22:22.863 !MESSAGE Bundle reference:file:org.eclipse.jetty.server_8.1.3.v20120522.jar@4 not found. !ENTRY org.eclipse.osgi 4 0 2017-11-25 12:22:22.863 !MESSAGE Bundle reference:file:org.eclipse.platform.doc.user_4.2.2.v20130121-200410.jar@4 not found. !ENTRY org.eclipse.osgi 4 0 2017-11-25 12:22:22.863 !MESSAGE Bundle reference:file:org.eclipse.team.core_3.6.100.v20120524-0627.jar@4 not found. !ENTRY org.eclipse.osgi 4 0 2017-11-25 12:22:22.863 !MESSAGE Bundle reference:file:org.eclipse.team.ui_3.6.201.v20130125-135424.jar@4 not found.

Android Studio编程 加了进度条组件之后,报错,无法实例化应用

Android Studio编程 加了进度条组件之后,运行之后,报错,无法实例化应用 但运行之后,可以正常显示进度条 ``` <ProgressBar android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/progress1" /> ``` ``` final ProgressBar progressBar = (ProgressBar)findViewById(R.id.progress1); ``` 报错信息 ``` java.lang.RuntimeException: Unable to instantiate application android.app.Application: java.lang.IllegalStateException: Unable to get package info for com.example.zp.myapplication_1; is package not installed?```

fragment.replace报错

我的androidsdk29 在跟写一个影音项目时: 报错:java.lang.IllegalStateException: Fragment com.example.mobileplayer.MainActivity.ReplaceFragment must be a public static class to be properly recreated from instance state. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2817) 代码:1.ft.replace(R.id.fl_main,new ReplaceFragment()); 2.public class ReplaceFragment extends Fragment{ @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { BasePager basePager = getBasePager(); if (basePager!=null){ return basePager.rootView; } return null; } } 请大神有空的帮看下

android APP连接mysql时,APP闪退

安卓程序连接MySQL一直不成功,本地连接可以。我是用手机调试的,点击接mysql按钮时,APP闪退。在网上找了好多方法都不行。求看看什么问题 错误日志如下: 2019-08-25 08:25:33.377 5570-5570/mark.zhang E/AndroidRuntime: FATAL EXCEPTION: main Process: mark.zhang, PID: 5570 java.lang.IllegalStateException: Could not execute method for android:onClick at android.view.View$DeclaredOnClickListener.onClick(View.java:5692) at android.view.View.performClick(View.java:6663) at android.view.View.performClickInternal(View.java:6635) at android.view.View.access$3100(View.java:794) at android.view.View$PerformClick.run(View.java:26199) at android.os.Handler.handleCallback(Handler.java:907) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:216) at android.app.ActivityThread.main(ActivityThread.java:7625) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987) Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at android.view.View$DeclaredOnClickListener.onClick(View.java:5687) at android.view.View.performClick(View.java:6663)  at android.view.View.performClickInternal(View.java:6635)  at android.view.View.access$3100(View.java:794)  at android.view.View$PerformClick.run(View.java:26199)  at android.os.Handler.handleCallback(Handler.java:907)  at android.os.Handler.dispatchMessage(Handler.java:105)  at android.os.Looper.loop(Looper.java:216)  at android.app.ActivityThread.main(ActivityThread.java:7625)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)  Caused by: java.lang.BootstrapMethodError: Exception from call site #39 bootstrap method at com.mysql.cj.jdbc.AbandonedConnectionCleanupThread.<clinit>(AbandonedConnectionCleanupThread.java:58) at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:453) at java.lang.Class.forName(Class.java:378) at com.mysql.cj.jdbc.NonRegisteringDriver.<clinit>(NonRegisteringDriver.java:99) at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:453) at java.lang.Class.forName(Class.java:378) at mark.zhang.Util.openConnection(Util.java:16) at mark.zhang.Main.onConn(Main.java:30) at java.lang.reflect.Method.invoke(Native Method)  at android.view.View$DeclaredOnClickListener.onClick(View.java:5687)  at android.view.View.performClick(View.java:6663)  at android.view.View.performClickInternal(View.java:6635)  at android.view.View.access$3100(View.java:794)  at android.view.View$PerformClick.run(View.java:26199)  at android.os.Handler.handleCallback(Handler.java:907)  at android.os.Handler.dispatchMessage(Handler.java:105)  at android.os.Looper.loop(Looper.java:216)  at android.app.ActivityThread.main(ActivityThread.java:7625)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)  Caused by: java.lang.ClassCastException: Bootstrap method returned null at com.mysql.cj.jdbc.AbandonedConnectionCleanupThread.<clinit>(AbandonedConnectionCleanupThread.java:58)  at java.lang.Class.classForName(Native Method)  at java.lang.Class.forName(Class.java:453)  at java.lang.Class.forName(Class.java:378)  at com.mysql.cj.jdbc.NonRegisteringDriver.<clinit>(NonRegisteringDriver.java:99)  at java.lang.Class.classForName(Native Method)  at java.lang.Class.forName(Class.java:453)  at java.lang.Class.forName(Class.java:378)  at mark.zhang.Util.openConnection(Util.java:16)  at mark.zhang.Main.onConn(Main.java:30)  at java.lang.reflect.Method.invoke(Native Method)  at android.view.View$DeclaredOnClickListener.onClick(View.java:5687)  at android.view.View.performClick(View.java:6663)  at android.view.View.performClickInternal(View.java:6635)  at android.view.View.access$3100(View.java:794)  at android.view.View$PerformClick.run(View.java:26199)  at android.os.Handler.handleCallback(Handler.java:907)  at android.os.Handler.dispatchMessage(Handler.java:105)  at android.os.Looper.loop(Looper.java:216)  at android.app.ActivityThread.main(ActivityThread.java:7625)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)  2019-08-25 08:25:33.398 5570-5570/mark.zhang I/Process: Sending signal. PID: 5570 SIG: 9 源码如下: 这是util.java ``` package mark.zhang; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class Util { public static Connection openConnection(String url, String user, String password) { Connection conn = null; try { final String DRIVER_NAME = "com.mysql.cj.jdbc.Driver"; Class.forName(DRIVER_NAME); conn = DriverManager.getConnection(url, user, password); } catch (ClassNotFoundException e) { conn = null; } catch (SQLException e) { conn = null; } return conn; } public static void query(Connection conn, String sql) { if (conn == null) { return; } Statement statement = null; ResultSet result = null; try { statement = conn.createStatement(); result = statement.executeQuery(sql); if (result != null && result.first()) { int idColumnIndex = result.findColumn("id"); int nameColumnIndex = result.findColumn("name"); System.out.println("id\t\t" + "name"); while (!result.isAfterLast()) { System.out.print(result.getString(idColumnIndex) + "\t\t"); System.out.println(result.getString(nameColumnIndex)); result.next(); } } } catch (SQLException e) { e.printStackTrace(); } finally { try { if (result != null) { result.close(); result = null; } if (statement != null) { statement.close(); statement = null; } } catch (SQLException sqle) { } } } public static boolean execSQL(Connection conn, String sql) { boolean execResult = false; if (conn == null) { return execResult; } Statement statement = null; try { statement = conn.createStatement(); if (statement != null) { execResult = statement.execute(sql); } } catch (SQLException e) { execResult = false; } return execResult; } } ``` 这是main.java ``` package mark.zhang; import com.mysql.cj.jdbc.AbandonedConnectionCleanupThread; import java.sql.Connection; import java.sql.SQLException; import androidx.appcompat.app.AppCompatActivity; import android.app.Activity; import android.os.Bundle; import android.view.View; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class Main extends Activity { private static final String REMOTE_IP = "223.104.64.237"; private static final String URL = "jdbc:mysql://223.104.64.237:3306/mydb?useSSL=false&serverTimezone=GMT&characterEncoding=utf-8&autoReconnect=true"; private static final String USER = "root"; private static final String PASSWORD = "123"; private Connection conn; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } public void onConn(View view) { conn = Util.openConnection(URL, USER, PASSWORD); /* final Thread thread = new Thread(new Runnable() { @Override public void run() { // 反复尝试连接,直到连接成功后退出循环 while (!Thread.interrupted()) { try { Thread.sleep(100); // 每隔0.1秒尝试连接 } catch (InterruptedException e) { System.out.println("链接数据库"); } // 2.设置好IP/端口/数据库名/用户名/密码等必要的连接信息 String url="jdbc:mysql://223.104.64.237:3306/mydb?useSSL=false&serverTimezone=Hongkong&characterEncoding=utf-8&autoReconnect=true"; String user = "root"; String password = "123"; // 3.连接JDBC try { Class.forName("com.mysql.cj.jdbc.Driver"); Connection conn = DriverManager.getConnection(url,user,password); System.out.println("远程连接成功!"); conn.close(); return; } catch (SQLException e) { System.out.println("远程连接失败!"); } catch (ClassNotFoundException e){ } } } }); thread.start();*/ } public void onInsert(View view) { String sql = "insert into mytable values(9, 'hanmeimei')"; Util.execSQL(conn, sql); } public void onDelete(View view) { String sql = "delete from mytable where name='mark'"; Util.execSQL(conn, sql); } public void onUpdate(View view) { String sql = "update mytable set name='李磊' where name='韩美'"; Util.execSQL(conn, sql); } public void onQuery(View view) { System.out.println("All users info:"); Util.query(conn, "select * from mytable"); } @Override protected void onDestroy() { super.onDestroy(); if (conn != null) { try { conn.close(); } catch (SQLException e) { conn = null; } finally { conn = null; } } } } ```

service本地服务通信(无法查看状态)

可以绑定服务与解绑,但是无法查看状态 ![图片说明](https://img-ask.csdn.net/upload/201911/09/1573263669_233388.png) 也没有服务断开连接的提示 MainActivity的代码 ``` public class MainActivity extends AppCompatActivity { MyService.MyBinder myBinder; //定义一个ServiceConnection对象 private ServiceConnection connection = new ServiceConnection() { @Override public void onServiceConnected(ComponentName componentName, IBinder iBinder) { Log.v("MainActivity", "服务连接成功"); myBinder = (MyService.MyBinder) iBinder; } @Override public void onServiceDisconnected(ComponentName componentName) { Log.v("MainActivity", "服务断开连接"); } }; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } public void onClick(View view) { switch (view.getId()) { case R.id.b1: //绑定服务service Intent intent = new Intent(this, MyService.class); bindService(intent, connection, BIND_AUTO_CREATE); break; case R.id.b2: //解除绑定服务service unbindService(connection); break; case R.id.b3: Toast.makeText(this, myBinder.getCount(), Toast.LENGTH_SHORT).show(); break; default: break; } } } ``` 以下是报错信息 ``` E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.sixteenapplication, PID: 2005 java.lang.IllegalStateException: Could not execute method for android:onClick at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:402) at android.view.View.performClick(View.java:5198) at android.view.View$PerformClick.run(View.java:21147) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:397) at android.view.View.performClick(View.java:5198)  at android.view.View$PerformClick.run(View.java:21147)  at android.os.Handler.handleCallback(Handler.java:739)  at android.os.Handler.dispatchMessage(Handler.java:95)  at android.os.Looper.loop(Looper.java:148)  at android.app.ActivityThread.main(ActivityThread.java:5417)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)  Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x5 at android.content.res.Resources.getText(Resources.java:312) at android.widget.Toast.makeText(Toast.java:286) at com.example.sixteenapplication.MainActivity.onClick(MainActivity.java:42) at java.lang.reflect.Method.invoke(Native Method)  at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:397)  at android.view.View.performClick(View.java:5198)  at android.view.View$PerformClick.run(View.java:21147)  at android.os.Handler.handleCallback(Handler.java:739)  at android.os.Handler.dispatchMessage(Handler.java:95)  at android.os.Looper.loop(Looper.java:148)  at android.app.ActivityThread.main(ActivityThread.java:5417)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)  I/Process: Sending signal. PID: 2005 SIG: 9 Application terminated. ```

项目运行时出错,求解决方法!!!

刚从SVN下了个项目,可是在Eclipse里面,用tomcat跑时,就报出下面的错误了,在网上找过各种方法,可是都不行,请各位路过的大大,有空帮忙看看这是个什么情况,错在什么地方了,给个解决办法,谢谢!!! ``` 2017-05-15 11:10:15,522 ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [applicationContext-service.xml]; nested exception is java.lang.IllegalStateException: AnnotationTransactionAttributeSource is only available on Java 1.5 and higher at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4276) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4779) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061) at org.apache.catalina.core.StandardHost.start(StandardHost.java:822) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:761) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: java.lang.IllegalStateException: AnnotationTransactionAttributeSource is only available on Java 1.5 and higher at org.springframework.transaction.config.TxNamespaceUtils.getAnnotationTransactionAttributeSourceClass(TxNamespaceUtils.java:43) at org.springframework.transaction.config.AnnotationDrivenBeanDefinitionParser$AopAutoProxyConfigurer.configureAutoProxyCreator(AnnotationDrivenBeanDefinitionParser.java:115) at org.springframework.transaction.config.AnnotationDrivenBeanDefinitionParser.parse(AnnotationDrivenBeanDefinitionParser.java:80) at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398) ... 28 more 五月 15, 2017 11:10:15 上午 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [applicationContext-service.xml]; nested exception is java.lang.IllegalStateException: AnnotationTransactionAttributeSource is only available on Java 1.5 and higher at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4276) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4779) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061) at org.apache.catalina.core.StandardHost.start(StandardHost.java:822) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:761) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: java.lang.IllegalStateException: AnnotationTransactionAttributeSource is only available on Java 1.5 and higher at org.springframework.transaction.config.TxNamespaceUtils.getAnnotationTransactionAttributeSourceClass(TxNamespaceUtils.java:43) at org.springframework.transaction.config.AnnotationDrivenBeanDefinitionParser$AopAutoProxyConfigurer.configureAutoProxyCreator(AnnotationDrivenBeanDefinitionParser.java:115) at org.springframework.transaction.config.AnnotationDrivenBeanDefinitionParser.parse(AnnotationDrivenBeanDefinitionParser.java:80) at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398) ... 28 more ```

android应用程序报错:MediaPlayer错误

Android程序报错:MediaPlayer:should have subtitle controller already set.程序可以正常运行,但是略卡,反应速度有点慢。

Android调用java 写的webservices 报错

``` private EditText nametex,passwordtex; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE);//去除图标 setContentView(R.layout.activity_main); nametex=(EditText) findViewById(R.id.name); passwordtex=(EditText) findViewById(R.id.password); } //确定按钮 public void btnOk(View view) throws IOException, XmlPullParserException { String names = nametex.getText().toString(); String pwds = passwordtex.getText().toString(); if (TextUtils.isEmpty(names) || TextUtils.isEmpty(pwds)) { Toast.makeText(this, "用户名和密码不能为空", Toast.LENGTH_LONG).show(); }else{ // 命名空间 String nameSpace = "http://Impi.services.jksd.com/"; // 调用的方法名称 String methodName = "Account_isPasswordCorrect"; // String action=nameSpace+methodName; // SOAP Action SoapObject request = new SoapObject(nameSpace, methodName); request.addProperty("Account_Name", names); request.addProperty("Account_Password", pwds); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = false;//.net的接口为true envelope.bodyOut = request; envelope.setOutputSoapObject(request); envelope.encodingStyle="UTF-8"; HttpTransportSE transport = new HttpTransportSE("http://192.168.2.181:19999/webservices?wsdl");// wsdl文档 // 调用WebService transport.call(null, envelope); System.err.println(envelope.getResponse().toString()); } } ``` 报错 ``` 06-16 02:36:49.390: D/AndroidRuntime(891): Shutting down VM 06-16 02:36:49.390: W/dalvikvm(891): threadid=1: thread exiting with uncaught exception (group=0xb3a82b90) 06-16 02:36:49.460: E/AndroidRuntime(891): FATAL EXCEPTION: main 06-16 02:36:49.460: E/AndroidRuntime(891): Process: com.jksd.app, PID: 891 06-16 02:36:49.460: E/AndroidRuntime(891): java.lang.IllegalStateException: Could not execute method of the activity 06-16 02:36:49.460: E/AndroidRuntime(891): at android.view.View$1.onClick(View.java:3814) 06-16 02:36:49.460: E/AndroidRuntime(891): at android.view.View.performClick(View.java:4424) 06-16 02:36:49.460: E/AndroidRuntime(891): at android.view.View$PerformClick.run(View.java:18383) 06-16 02:36:49.460: E/AndroidRuntime(891): at android.os.Handler.handleCallback(Handler.java:733) 06-16 02:36:49.460: E/AndroidRuntime(891): at android.os.Handler.dispatchMessage(Handler.java:95) 06-16 02:36:49.460: E/AndroidRuntime(891): at android.os.Looper.loop(Looper.java:137) 06-16 02:36:49.460: E/AndroidRuntime(891): at android.app.ActivityThread.main(ActivityThread.java:4998) 06-16 02:36:49.460: E/AndroidRuntime(891): at java.lang.reflect.Method.invokeNative(Native Method) 06-16 02:36:49.460: E/AndroidRuntime(891): at java.lang.reflect.Method.invoke(Method.java:515) 06-16 02:36:49.460: E/AndroidRuntime(891): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777) 06-16 02:36:49.460: E/AndroidRuntime(891): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593) 06-16 02:36:49.460: E/AndroidRuntime(891): at dalvik.system.NativeStart.main(Native Method) 06-16 02:36:49.460: E/AndroidRuntime(891): Caused by: java.lang.reflect.InvocationTargetException 06-16 02:36:49.460: E/AndroidRuntime(891): at java.lang.reflect.Method.invokeNative(Native Method) 06-16 02:36:49.460: E/AndroidRuntime(891): at java.lang.reflect.Method.invoke(Method.java:515) 06-16 02:36:49.460: E/AndroidRuntime(891): at android.view.View$1.onClick(View.java:3809) 06-16 02:36:49.460: E/AndroidRuntime(891): ... 11 more 06-16 02:36:49.460: E/AndroidRuntime(891): Caused by: android.os.NetworkOnMainThreadException 06-16 02:36:49.460: E/AndroidRuntime(891): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1145) 06-16 02:36:49.460: E/AndroidRuntime(891): at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:84) 06-16 02:36:49.460: E/AndroidRuntime(891): at libcore.io.IoBridge.connectErrno(IoBridge.java:127) 06-16 02:36:49.460: E/AndroidRuntime(891): at libcore.io.IoBridge.connect(IoBridge.java:112) 06-16 02:36:49.460: E/AndroidRuntime(891): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192) 06-16 02:36:49.460: E/AndroidRuntime(891): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459) 06-16 02:36:49.460: E/AndroidRuntime(891): at java.net.Socket.connect(Socket.java:843) 06-16 02:36:49.460: E/AndroidRuntime(891): at com.android.okhttp.internal.Platform.connectSocket(Platform.java:131) 06-16 02:36:49.460: E/AndroidRuntime(891): at com.android.okhttp.Connection.connect(Connection.java:101) 06-16 02:36:49.460: E/AndroidRuntime(891): at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:294) 06-16 02:36:49.460: E/AndroidRuntime(891): at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255) 06-16 02:36:49.460: E/AndroidRuntime(891): at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206) 06-16 02:36:49.460: E/AndroidRuntime(891): at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345) 06-16 02:36:49.460: E/AndroidRuntime(891): at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:89) 06-16 02:36:49.460: E/AndroidRuntime(891): at org.ksoap2.transport.ServiceConnectionSE.connect(ServiceConnectionSE.java:75) 06-16 02:36:49.460: E/AndroidRuntime(891): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:136) 06-16 02:36:49.460: E/AndroidRuntime(891): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:90) 06-16 02:36:49.460: E/AndroidRuntime(891): at com.jksd.app.MainActivity.btnOk(MainActivity.java:55) 06-16 02:36:49.460: E/AndroidRuntime(891): ... 14 more 06-16 02:36:49.530: D/dalvikvm(891): GC_FOR_ALLOC freed 253K, 10% free 3027K/3360K, paused 57ms, total 60ms ``` 有没有Android的大佬帮忙看看!!!

为什么我的fg老是显示出现错误,提示我androidx.fragment.app.Fragment无法转换为android.app.Fragmen

package com.example.wechatinterfacechange; import androidx.appcompat.app.AppCompatActivity; import androidx.fragment.app.Fragment; import android.app.FragmentManager; import android.app.FragmentTransaction; import android.os.Bundle; import android.view.View; import android.widget.ImageView; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ImageView imageView1=(ImageView)findViewById(R.id.image1); ImageView imageView2=(ImageView)findViewById(R.id.image2); ImageView imageView3=(ImageView)findViewById(R.id.image3); ImageView imageView4=(ImageView)findViewById(R.id.image4); imageView1.setOnClickListener(l); imageView2.setOnClickListener(l); imageView3.setOnClickListener(l); imageView4.setOnClickListener(l); } View.OnClickListener l=new View.OnClickListener() { @Override public void onClick(View v) { FragmentManager fm=getFragmentManager(); FragmentTransaction ft=fm.beginTransaction(); Fragment fg=null; switch (v.getId()){ case R.id.image1: fg=new WeChat_Fragment(); break; case R.id.image2: fg=new Message_Fragment(); break; case R.id.image3: fg=new Find_Fragment(); break; case R.id.image4: fg=new Me_Fragment(); break; default: break; } ft.replace(R.id.fragment,fg); ft.commit(); } }; } 为什么我的fg老是显示出现错误,提示我androidx.fragment.app.Fragment无法转换为android.app.Fragment

您需要在这个活动中使用 Theme.AppCompat 主题(或子主题)

<div class="post-text" itemprop="text"> <p>Android Studio 0.4.5</p> <p>Android documentation for creating custom dialog boxes: <a href="http://developer.android.com/guide/topics/ui/dialogs.html">http://developer.android.com/guide/topics/ui/dialogs.html</a></p> <p>If you want a custom dialog, you can instead display an Activity as a dialog instead of using the Dialog APIs. Simply create an activity and set its theme to Theme.Holo.Dialog in the <code>&lt;activity&gt;</code> manifest element:</p> <pre><code>&lt;activity android:theme="@android:style/Theme.Holo.Dialog" &gt; </code></pre> <p>However, when I tried this I get the following exception:</p> <pre><code>java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity </code></pre> <p>I am supporting the following, and I can't using something greater than 10 for the min:</p> <pre><code>minSdkVersion 10 targetSdkVersion 19 </code></pre> <p>In my styles I have the following:</p> <pre><code>&lt;!-- Base application theme. --&gt; &lt;style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"&gt; </code></pre> <p>And in my manifest I have this for the activity:</p> <pre><code> &lt;application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" &gt; &lt;activity android:theme="@android:style/Theme.Holo.Light.Dialog" android:name="com.ssd.register.Dialog_update" android:label="@string/title_activity_dialog_update" &gt; &lt;/activity&gt; </code></pre> <p>Creating the dialog box like this was something I was hopping to do, as I have already completed the layout.</p> <p>Can anyone tell me how I can get around this problem?</p> </div> <p>转载于:https://stackoverflow.com/questions/21814825/you-need-to-use-a-theme-appcompat-theme-or-descendant-with-this-activity</p>

一点击ListView就闪退

一点击ListVIew就闪退,调试了两天了,好痛苦,望大家解救。 **这是部分日志** *02-06 10:58:39.207: E/InputEventReceiver(764): Exception dispatching input event. 02-06 10:58:39.207: E/MessageQueue-JNI(764): Exception in MessageQueue callback: handleReceiveCallback 02-06 10:58:39.377: E/MessageQueue-JNI(764): java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. [in ListView(16908298, class android.widget.ListView) with Adapter(class android.widget.SimpleAdapter)] 02-06 10:58:39.377: E/MessageQueue-JNI(764): at android.widget.ListView.layoutChildren(ListView.java:1538) * 部分代码: * protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_clear); bar = (ProgressBar) findViewById(R.id.progressBar0); list = new ArrayList<HashMap<String, String>>(); SimpleAdapter adapter = new SimpleAdapter(this, list, R.layout.list_view, new String[] { "name", "size", "path"}, new int[] { R.id.name, R.id.size, R.id.path }); setListAdapter(adapter); System.out.println("hh"); handler = new MyHandler(); thread = new MyThread(); thread.start(); } private void SendMessage(String name, String path, String size) { Message message = handler.obtainMessage(); HashMap<String, String> hashMap = new HashMap<String, String>(); hashMap.put("name", name); hashMap.put("path", path); hashMap.put("size", size); message.obj = hashMap; handler.sendMessage(message); } class MyHandler extends Handler { @Override public void handleMessage(Message msg) { HashMap<String, String> hashMap = (HashMap<String, String>) msg.obj; list.add(hashMap); } } *

MySQL 8.0.19安装教程(windows 64位)

话不多说直接开干 目录 1-先去官网下载点击的MySQL的下载​ 2-配置初始化的my.ini文件的文件 3-初始化MySQL 4-安装MySQL服务 + 启动MySQL 服务 5-连接MySQL + 修改密码 先去官网下载点击的MySQL的下载 下载完成后解压 解压完是这个样子 配置初始化的my.ini文件的文件 ...

Python+OpenCV计算机视觉

Python+OpenCV计算机视觉系统全面的介绍。

Vue.js 2.0之全家桶系列视频课程

基于新的Vue.js 2.3版本, 目前新全的Vue.js教学视频,让你少走弯路,直达技术前沿! 1. 包含Vue.js全家桶(vue.js、vue-router、axios、vuex、vue-cli、webpack、ElementUI等) 2. 采用笔记+代码案例的形式讲解,通俗易懂

navicat(内含激活码)

navicat支持mysql的可视化操作,内涵激活码,不用再忍受弹框的痛苦。

HTML期末大作业

这是我自己做的HTML期末大作业,花了很多时间,稍加修改就可以作为自己的作业了,而且也可以作为学习参考

150讲轻松搞定Python网络爬虫

【为什么学爬虫?】 &nbsp; &nbsp; &nbsp; &nbsp;1、爬虫入手容易,但是深入较难,如何写出高效率的爬虫,如何写出灵活性高可扩展的爬虫都是一项技术活。另外在爬虫过程中,经常容易遇到被反爬虫,比如字体反爬、IP识别、验证码等,如何层层攻克难点拿到想要的数据,这门课程,你都能学到! &nbsp; &nbsp; &nbsp; &nbsp;2、如果是作为一个其他行业的开发者,比如app开发,web开发,学习爬虫能让你加强对技术的认知,能够开发出更加安全的软件和网站 【课程设计】 一个完整的爬虫程序,无论大小,总体来说可以分成三个步骤,分别是: 网络请求:模拟浏览器的行为从网上抓取数据。 数据解析:将请求下来的数据进行过滤,提取我们想要的数据。 数据存储:将提取到的数据存储到硬盘或者内存中。比如用mysql数据库或者redis等。 那么本课程也是按照这几个步骤循序渐进的进行讲解,带领学生完整的掌握每个步骤的技术。另外,因为爬虫的多样性,在爬取的过程中可能会发生被反爬、效率低下等。因此我们又增加了两个章节用来提高爬虫程序的灵活性,分别是: 爬虫进阶:包括IP代理,多线程爬虫,图形验证码识别、JS加密解密、动态网页爬虫、字体反爬识别等。 Scrapy和分布式爬虫:Scrapy框架、Scrapy-redis组件、分布式爬虫等。 通过爬虫进阶的知识点我们能应付大量的反爬网站,而Scrapy框架作为一个专业的爬虫框架,使用他可以快速提高我们编写爬虫程序的效率和速度。另外如果一台机器不能满足你的需求,我们可以用分布式爬虫让多台机器帮助你快速爬取数据。 &nbsp; 从基础爬虫到商业化应用爬虫,本套课程满足您的所有需求! 【课程服务】 专属付费社群+每周三讨论会+1v1答疑

三个项目玩转深度学习(附1G源码)

从事大数据与人工智能开发与实践约十年,钱老师亲自见证了大数据行业的发展与人工智能的从冷到热。事实证明,计算机技术的发展,算力突破,海量数据,机器人技术等,开启了第四次工业革命的序章。深度学习图像分类一直是人工智能的经典任务,是智慧零售、安防、无人驾驶等机器视觉应用领域的核心技术之一,掌握图像分类技术是机器视觉学习的重中之重。针对现有线上学习的特点与实际需求,我们开发了人工智能案例实战系列课程。打造:以项目案例实践为驱动的课程学习方式,覆盖了智能零售,智慧交通等常见领域,通过基础学习、项目案例实践、社群答疑,三维立体的方式,打造最好的学习效果。

基于STM32的电子时钟设计

时钟功能 还有闹钟功能,温湿度功能,整点报时功能 你值得拥有

学生成绩管理系统(PHP + MYSQL)

做的是数据库课程设计,使用的php + MySQL,本来是黄金搭配也就没啥说的,推荐使用wamp服务器,里面有详细的使用说明,带有界面的啊!呵呵 不行的话,可以给我留言!

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

程序员的兼职技能课

获取讲师答疑方式: 在付费视频第一节(触摸命令_ALL)片头有二维码及加群流程介绍 限时福利 原价99元,今日仅需39元!购课添加小助手(微信号:itxy41)按提示还可领取价值800元的编程大礼包! 讲师介绍: 苏奕嘉&nbsp;前阿里UC项目工程师 脚本开发平台官方认证满级(六级)开发者。 我将如何教会你通过【定制脚本】赚到你人生的第一桶金? 零基础程序定制脚本开发课程,是完全针对零脚本开发经验的小白而设计,课程内容共分为3大阶段: ①前期将带你掌握Q开发语言和界面交互开发能力; ②中期通过实战来制作有具体需求的定制脚本; ③后期将解锁脚本的更高阶玩法,打通任督二脉; ④应用定制脚本合法赚取额外收入的完整经验分享,带你通过程序定制脚本开发这项副业,赚取到你的第一桶金!

实用主义学Python(小白也容易上手的Python实用案例)

原价169,限时立减100元! 系统掌握Python核心语法16点,轻松应对工作中80%以上的Python使用场景! 69元=72讲+源码+社群答疑+讲师社群分享会&nbsp; 【哪些人适合学习这门课程?】 1)大学生,平时只学习了Python理论,并未接触Python实战问题; 2)对Python实用技能掌握薄弱的人,自动化、爬虫、数据分析能让你快速提高工作效率; 3)想学习新技术,如:人工智能、机器学习、深度学习等,这门课程是你的必修课程; 4)想修炼更好的编程内功,优秀的工程师肯定不能只会一门语言,Python语言功能强大、使用高效、简单易学。 【超实用技能】 从零开始 自动生成工作周报 职场升级 豆瓣电影数据爬取 实用案例 奥运冠军数据分析 自动化办公:通过Python自动化分析Excel数据并自动操作Word文档,最终获得一份基于Excel表格的数据分析报告。 豆瓣电影爬虫:通过Python自动爬取豆瓣电影信息并将电影图片保存到本地。 奥运会数据分析实战 简介:通过Python分析120年间奥运会的数据,从不同角度入手分析,从而得出一些有趣的结论。 【超人气老师】 二两 中国人工智能协会高级会员 生成对抗神经网络研究者 《深入浅出生成对抗网络:原理剖析与TensorFlow实现》一书作者 阿里云大学云学院导师 前大型游戏公司后端工程师 【超丰富实用案例】 0)图片背景去除案例 1)自动生成工作周报案例 2)豆瓣电影数据爬取案例 3)奥运会数据分析案例 4)自动处理邮件案例 5)github信息爬取/更新提醒案例 6)B站百大UP信息爬取与分析案例 7)构建自己的论文网站案例

Java8零基础入门视频教程

这门课程基于主流的java8平台,由浅入深的详细讲解了java SE的开发技术,可以使java方向的入门学员,快速扎实的掌握java开发技术!

Python数据挖掘简易入门

&nbsp; &nbsp; &nbsp; &nbsp; 本课程为Python数据挖掘方向的入门课程,课程主要以真实数据为基础,详细介绍数据挖掘入门的流程和使用Python实现pandas与numpy在数据挖掘方向的运用,并深入学习如何运用scikit-learn调用常用的数据挖掘算法解决数据挖掘问题,为进一步深入学习数据挖掘打下扎实的基础。

零基础学C#编程—C#从小白到大咖

本课程从初学者角度出发,提供了C#从入门到成为程序开发高手所需要掌握的各方面知识和技术。 【课程特点】 1 由浅入深,编排合理; 2 视频讲解,精彩详尽; 3 丰富实例,轻松易学; 4 每章总结配有难点解析文档。 15大章节,228课时,1756分钟与你一同进步!

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

多功能数字钟.zip

利用数字电子计数知识设计并制作的数字电子钟(含multisim仿真),该数字钟具有显示星期、24小时制时间、闹铃、整点报时、时间校准功能

极简JAVA学习营第四期(报名以后加助教微信:eduxy-1)

想学好JAVA必须要报两万的培训班吗? Java大神勿入 如果你: 零基础想学JAVA却不知道从何入手 看了一堆书和视频却还是连JAVA的环境都搭建不起来 囊中羞涩面对两万起的JAVA培训班不忍直视 在职没有每天大块的时间专门学习JAVA 那么恭喜你找到组织了,在这里有: 1. 一群志同道合立志学好JAVA的同学一起学习讨论JAVA 2. 灵活机动的学习时间完成特定学习任务+每日编程实战练习 3. 热心助人的助教和讲师及时帮你解决问题,不按时完成作业小心助教老师的家访哦 上一张图看看前辈的感悟: &nbsp; &nbsp; 大家一定迫不及待想知道什么是极简JAVA学习营了吧,下面就来给大家说道说道: 什么是极简JAVA学习营? 1. 针对Java小白或者初级Java学习者; 2. 利用9天时间,每天1个小时时间; 3.通过 每日作业 / 组队PK / 助教答疑 / 实战编程 / 项目答辩 / 社群讨论 / 趣味知识抢答等方式让学员爱上学习编程 , 最终实现能独立开发一个基于控制台的‘库存管理系统’ 的学习模式 极简JAVA学习营是怎么学习的? &nbsp; 如何报名? 只要购买了极简JAVA一:JAVA入门就算报名成功! &nbsp;本期为第四期极简JAVA学习营,我们来看看往期学员的学习状态: 作业看这里~ &nbsp; 助教的作业报告是不是很专业 不交作业打屁屁 助教答疑是不是很用心 &nbsp; 有奖抢答大家玩的很嗨啊 &nbsp; &nbsp; 项目答辩终于开始啦 &nbsp; 优秀者的获奖感言 &nbsp; 这是答辩项目的效果 &nbsp; &nbsp; 这么细致的服务,这么好的氛围,这样的学习效果,需要多少钱呢? 不要1999,不要199,不要99,只要9.9 是的你没听错,只要9.9以上所有就都属于你了 如果你: 1、&nbsp;想学JAVA没有基础 2、&nbsp;想学JAVA没有整块的时间 3、&nbsp;想学JAVA没有足够的预算 还等什么?赶紧报名吧,抓紧抢位,本期只招300人,错过只有等时间待定的下一期了 &nbsp; 报名请加小助手微信:eduxy-1 &nbsp; &nbsp;

Python可以这样学(第一季:Python内功修炼)

董付国系列教材《Python程序设计基础》、《Python程序设计(第2版)》、《Python可以这样学》配套视频,讲解Python 3.5.x和3.6.x语法、内置对象用法、选择与循环以及函数设计与使用、lambda表达式用法、字符串与正则表达式应用、面向对象编程、文本文件与二进制文件操作、目录操作与系统运维、异常处理结构。

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

机器学习实战系列套餐(必备基础+经典算法+案例实战)

机器学习实战系列套餐以实战为出发点,帮助同学们快速掌握机器学习领域必备经典算法原理并结合Python工具包进行实战应用。建议学习顺序:1.Python必备工具包:掌握实战工具 2.机器学习算法与实战应用:数学原理与应用方法都是必备技能 3.数据挖掘实战:通过真实数据集进行项目实战。按照下列课程顺序学习即可! 课程风格通俗易懂,用最接地气的方式带领大家轻松进军机器学习!提供所有课程代码,PPT与实战数据,有任何问题欢迎随时与我讨论。

Java面试题大全(2020版)

发现网上很多Java面试题都没有答案,所以花了很长时间搜集整理出来了这套Java面试题大全,希望对大家有帮助哈~ 本套Java面试题大全,全的不能再全,哈哈~ 一、Java 基础 1. JDK 和 JRE 有什么区别? JDK:Java Development Kit 的简称,java 开发工具包,提供了 java 的开发环境和运行环境。 JRE:Java Runtime Environ...

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

深度学习原理+项目实战+算法详解+主流框架(套餐)

深度学习系列课程从深度学习基础知识点开始讲解一步步进入神经网络的世界再到卷积和递归神经网络,详解各大经典网络架构。实战部分选择当下最火爆深度学习框架PyTorch与Tensorflow/Keras,全程实战演示框架核心使用与建模方法。项目实战部分选择计算机视觉与自然语言处理领域经典项目,从零开始详解算法原理,debug模式逐行代码解读。适合准备就业和转行的同学们加入学习! 建议按照下列课程顺序来进行学习 (1)掌握深度学习必备经典网络架构 (2)深度框架实战方法 (3)计算机视觉与自然语言处理项目实战。(按照课程排列顺序即可)

HoloLens2开发入门教程

本课程为HoloLens2开发入门教程,讲解部署开发环境,安装VS2019,Unity版本,Windows SDK,创建Unity项目,讲解如何使用MRTK,编辑器模拟手势交互,打包VS工程并编译部署应用到HoloLens上等。

几率大的Redis面试题(含答案)

本文的面试题如下: Redis 持久化机制 缓存雪崩、缓存穿透、缓存预热、缓存更新、缓存降级等问题 热点数据和冷数据是什么 Memcache与Redis的区别都有哪些? 单线程的redis为什么这么快 redis的数据类型,以及每种数据类型的使用场景,Redis 内部结构 redis的过期策略以及内存淘汰机制【~】 Redis 为什么是单线程的,优点 如何解决redis的并发竞争key问题 Red...

MFC一站式终极全套课程包

该套餐共包含从C小白到C++到MFC的全部课程,整套学下来绝对成为一名C++大牛!!!

【数据结构与算法综合实验】欢乐连连看(C++ & MFC)案例

这是武汉理工大学计算机学院数据结构与算法综合实验课程的第三次项目:欢乐连连看(C++ & MFC)迭代开发代码。运行环境:VS2017。已经实现功能:开始游戏、消子、判断胜负、提示、重排、计时、帮助。

YOLOv3目标检测实战:训练自己的数据集

YOLOv3是一种基于深度学习的端到端实时目标检测方法,以速度快见长。本课程将手把手地教大家使用labelImg标注和使用YOLOv3训练自己的数据集。课程分为三个小项目:足球目标检测(单目标检测)、梅西目标检测(单目标检测)、足球和梅西同时目标检测(两目标检测)。 本课程的YOLOv3使用Darknet,在Ubuntu系统上做项目演示。包括:安装Darknet、给自己的数据集打标签、整理自己的数据集、修改配置文件、训练自己的数据集、测试训练出的网络模型、性能统计(mAP计算和画出PR曲线)和先验框聚类。 Darknet是使用C语言实现的轻型开源深度学习框架,依赖少,可移植性好,值得深入探究。 除本课程《YOLOv3目标检测实战:训练自己的数据集》外,本人推出了有关YOLOv3目标检测的系列课程,请持续关注该系列的其它课程视频,包括: 《YOLOv3目标检测实战:交通标志识别》 《YOLOv3目标检测:原理与源码解析》 《YOLOv3目标检测:网络模型改进方法》 敬请关注并选择学习!

u-boot-2015.07.tar.bz2

uboot-2015-07最新代码,喜欢的朋友请拿去

php+mysql学生成绩管理系统

学生成绩管理系统,分三个模块:学生,教师和管理员。 管理员模块:负责学生、老师信息的增删改;发布课程信息的增删改,以便让学生选课;审核老师提交的学生成绩并且打印成绩存档;按照课号查询每个课号的学生成绩

web网页制作期末大作业

分享思维,改变世界. web网页制作,期末大作业. 所用技术:html css javascript 分享所学所得

Git 实用技巧

这几年越来越多的开发团队使用了Git,掌握Git的使用已经越来越重要,已经是一个开发者必备的一项技能;但很多人在刚开始学习Git的时候会遇到很多疑问,比如之前使用过SVN的开发者想不通Git提交代码为什么需要先commit然后再去push,而不是一条命令一次性搞定; 更多的开发者对Git已经入门,不过在遇到一些代码冲突、需要恢复Git代码时候就不知所措,这个时候哪些对 Git掌握得比较好的少数人,就像团队中的神一样,在队友遇到 Git 相关的问题的时候用各种流利的操作来帮助队友于水火。 我去年刚加入新团队,发现一些同事对Git的常规操作没太大问题,但对Git的理解还是比较生疏,比如说分支和分支之间的关联关系、合并代码时候的冲突解决、提交代码前未拉取新代码导致冲突问题的处理等,我在协助处理这些问题的时候也记录各种问题的解决办法,希望整理后通过教程帮助到更多对Git操作进阶的开发者。 本期教程学习方法分为“掌握基础——稳步进阶——熟悉协作”三个层次。从掌握基础的 Git的推送和拉取开始,以案例进行演示,分析每一个步骤的操作方式和原理,从理解Git 工具的操作到学会代码存储结构、演示不同场景下Git遇到问题的不同处理方案。循序渐进让同学们掌握Git工具在团队协作中的整体协作流程。 在教程中会通过大量案例进行分析,案例会模拟在工作中遇到的问题,从最基础的代码提交和拉取、代码冲突解决、代码仓库的数据维护、Git服务端搭建等。为了让同学们容易理解,对Git简单易懂,文章中详细记录了详细的操作步骤,提供大量演示截图和解析。在教程的最后部分,会从提升团队整体效率的角度对Git工具进行讲解,包括规范操作、Gitlab的搭建、钩子事件的应用等。 为了让同学们可以利用碎片化时间来灵活学习,在教程文章中大程度降低了上下文的依赖,让大家可以在工作之余进行学习与实战,并同时掌握里面涉及的Git不常见操作的相关知识,理解Git工具在工作遇到的问题解决思路和方法,相信一定会对大家的前端技能进阶大有帮助。

相关热词 c# 解析cad c#数字格式化万 c#int转byte c#格式化日期 c# wpf 表格 c# 实现ad域验证登录 c#心跳包机制 c#使用fmod.dll c#dll vb 调用 c# outlook
立即提问
相关内容推荐