android 无法转换为android.support.v4.app.Fragment

package com.example.myapplication;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity implements View.OnClickListener{

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    Button button = (Button) findViewById(R.id.button);
    button.setOnClickListener(this);
    replaceFragment(new RightFragment());
}

@Override
public void onClick(View view) {
    switch (view.getId()){
        case R.id.button:
            replaceFragment(new AnotherRightFragment());
            break;
        default:
            break;
    }
}
private void replaceFragment(Fragment fragment){
    FragmentManager fragmentMananger = getSupportFragmentManager();
    FragmentTransaction transaction = fragmentMananger.beginTransaction();
    transaction.replace(R.id.right_fragment,fragment);
    transaction.addToBackStack(null);
    transaction.commit();
}

}

当导入V4包时图片说明

当导入app.Fragment包时图片说明

两者不能兼容啊,这程序好像没法执行

2个回答

qq_32793555
帕斯伦川三 谢谢啦,我知道了,全部都改成V4包就可以
接近 3 年之前 回复

继承FragmentActivity

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

java.lang.NoSuchMethodError: android.support.v4.app.FragmentActivity.getFragmentManager 实用的第三方框架 andbase 在安卓2.3.6的三星手机上报这个错误,停止运行 其他手机正常,三星总是板锉,该怎么解答 在线等 ![图片说明](https://img-ask.csdn.net/upload/201703/11/1489196373_165997.png)

为什么我的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

cannot cast 'android.support.v4.app.FragmentTransaction' to 'android.app.FragmentTransaction

网上的解决方法针对的都是把FragmentTransaction转化成V4包下的FragmentTransaction有问题 但是,我却遇到了相反的情况。 无法由V4包下的FragmentTransaction转化成app.FragmentTransaction 有没有高人来指点一下啊?? 注:**extends android.support.v4.app.Fragment**这个千万不能改 ``` package com.example.myslidepage.Fragment; import android.app.FragmentManager; import android.app.FragmentTransaction; import android.content.Context; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.*; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import com.example.myslidepage.R; /** * Created by lenovo on 4/30/2019. */ public class Fragment2 extends android.support.v4.app.Fragment implements View.OnClickListener { public Button btn_news,btn_contact,btn_message,btn_setting; public MyFragment f1,f2,f3,f4; @Nullable public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) { View view =inflater.inflate(R.layout.tab2,container,false); btn_news = view.findViewById(R.id.btn_news); btn_contact = view.findViewById(R.id.btn_contact); btn_message = view.findViewById(R.id.btn_message); btn_setting = view.findViewById(R.id.btn_setting); btn_news.setOnClickListener(this); btn_contact.setOnClickListener(this); btn_message.setOnClickListener(this); btn_setting.setOnClickListener(this); //第一次初始化首页默认显示第一个fragment initFragment1(); initFragment2(); initFragment3(); initFragment4(); return view; } @Override public void onClick(View v) { if(v==btn_news){ initFragment1(); } else if(v==btn_message){ initFragment2(); } else if(v==btn_contact){ initFragment3(); } else{ initFragment4(); } } private void initFragment1(){ android.support.v4.app.FragmentManager fragmentManager = getActivity().getSupportFragmentManager(); //开启事务,fragment的控制是由事务来实现的 FragmentTransaction transaction=(FragmentTransaction)fragmentManager.beginTransaction(); //第一种方式(add),初始化fragment并添加到事务中,如果为null就new一个 if(f1 == null){ f1 = new MyFragment("消息",R.drawable.message_selected); transaction.add(R.id.main_frame_layout, f1); } //隐藏所有fragment hideFragment(transaction); //显示需要显示的fragment transaction.show(f1); transaction.commit(); } private void initFragment2(){ android.support.v4.app.FragmentManager fragmentManager = getActivity().getSupportFragmentManager(); FragmentTransaction transaction=(FragmentTransaction)fragmentManager.beginTransaction(); if(f2 == null){ f2 = new MyFragment("消息",R.drawable.message_selected); transaction.add(R.id.main_frame_layout, f2); } //隐藏所有fragment hideFragment(transaction); //显示需要显示的fragment transaction.show(f2); transaction.commit(); } private void initFragment3(){ android.support.v4.app.FragmentManager fragmentManager = getActivity().getSupportFragmentManager(); FragmentTransaction transaction=(FragmentTransaction)fragmentManager.beginTransaction(); if(f3 == null){ f3 = new MyFragment("消息",R.drawable.message_selected); transaction.add(R.id.main_frame_layout, f3); } //隐藏所有fragment hideFragment(transaction); //显示需要显示的fragment transaction.show(f3); transaction.commit(); } private void initFragment4(){ android.support.v4.app.FragmentManager fragmentManager = getActivity().getSupportFragmentManager(); FragmentTransaction transaction=(FragmentTransaction)fragmentManager.beginTransaction(); if(f4 == null){ f4 = new MyFragment("消息",R.drawable.message_selected); transaction.add(R.id.main_frame_layout, f4); } //隐藏所有fragment hideFragment(transaction); //显示需要显示的fragment transaction.show(f4); transaction.commit(); } //这个方法其实很巧,这个hide方法看一眼就是唬人的。这个方法将所有的fragment都hide了,因为他的判断条件是if(f1 != null) //因为一开始初始化的时候,f1f2f3都已经初始化一遍了,所以不可能都为空,既然都不为空,那就都隐藏。然后点击哪个方法,那个再显示。 private void hideFragment(FragmentTransaction transaction) { if(f1 != null){ transaction.hide(f1); } if(f2 != null){ transaction.hide(f2); } if(f3 != null){ transaction.hide(f3); } if(f4 != null){ transaction.hide(f4); } } } ```

Android studio报错:无法解析v4.app.FragmentActivity

import android.content.Context; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; import com.bigkoo.convenientbanner.ConvenientBanner; import com.bigkoo.convenientbanner.holder.CBViewHolderCreator; import com.bigkoo.convenientbanner.holder.Holder; import com.example.administrator.cookbook.R; import com.example.administrator.cookbook.books.CookBookPresenter; import com.example.administrator.cookbook.books.CookBookPresenterImpl; import com.example.administrator.cookbook.books.CookBookView; import com.example.administrator.cookbook.cookbook.beans.CookBook; import com.squareup.picasso.Picasso; import java.util.ArrayList; import java.util.List; public class HomeFragment extends Fragment implements CookBookView{ ConvenientBanner convenientBanner; ListView listView; static List<Integer> localImages = new ArrayList<>(); CookBookPresenter cookBookPresenter; List<CookBook> list; static { localImages.add(R.drawable.test01); localImages.add(R.drawable.test02); localImages.add(R.drawable.test03); localImages.add(R.drawable.test04); } @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); list = new ArrayList<>(); cookBookPresenter = new CookBookPresenterImpl(this); cookBookPresenter.getCookBookListById(getActivity(),"xxx"); } @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_home,container,false); initViews(view); initBanner(); return view; } void initViews(View view){ listView = (ListView) view.findViewById(R.id.listview); convenientBanner = (ConvenientBanner)view.findViewById(R.id.convenientBanner); } @Override public void setCookBookList(List<CookBook> list) { this.list = list; } @Override public void setFail() { } class MyAdapter extends BaseAdapter{ @Override public int getCount() { return list.size(); } @Override public Object getItem(int position) { return null; } @Override public long getItemId(int position) { return 0; } @Override public View getView(int position, View convertView, ViewGroup parent) { View myView; if(convertView == null){ myView = getActivity().getLayoutInflater().inflate(R.layout.list_cookbook_item,null); }else { myView = convertView; } ImageView iv = (ImageView) myView.findViewById(R.id.imageView); TextView tv1 = (TextView) myView.findViewById(R.id.title); TextView tv2 = (TextView) myView.findViewById(R.id.intro); CookBook cookBook = list.get(position); String url = cookBook.getAlbums().get(0); String title = cookBook.getTitle(); String intro = cookBook.getImtro(); tv1.setText(title); tv2.setText(intro); Picasso.with(getActivity()).load(url).resize(120,120).into(iv); return myView; } } void initBanner(){ convenientBanner.setPages( new CBViewHolderCreator<LocalImageHolderView>() { @Override public LocalImageHolderView createHolder() { return new LocalImageHolderView(); } }, localImages) //设置两个点图片作为翻页指示器,不设置则没有指示器,可以根据自己需求自行配合自己的指示器,不需要圆点指示器可用不设 .setPageIndicator(new int[]{R.drawable.ic_page_indicator, R.drawable.ic_page_indicator_focused}) //设置指示器的方向 .setPageIndicatorAlign(ConvenientBanner.PageIndicatorAlign.ALIGN_PARENT_RIGHT); } class LocalImageHolderView implements Holder<Integer> { private ImageView imageView; @Override public View createView(Context context) { imageView = new ImageView(context); imageView.setScaleType(ImageView.ScaleType.FIT_XY); return imageView; } @Override public void UpdateUI(Context context, final int position, Integer data) { imageView.setImageResource(data); } } } 其中Picasso.with(getActivity()).load(url).resize(120,120).into(iv);中with报错Cannot resolve method 'with(android.support.v4.app.FragmentActivity),该如何解决,本人小白能否给出详细过程

遇到Program type already present: android.support.v4.app.BackStackRecord$Op这个问题

运行代码的时候,出现了这个问题 ``` Program type already present: android.support.v4.app.BackStackRecord$Op Message{kind=ERROR, text=Program type already present: android.support.v4.app.BackStackRecord$Op, sources=[Unknown source file], tool name=Optional.of(D8)} ``` 虽然不知道具体意思,感觉就是v4包冲突,可是我不会找在哪冲突的 在网上疯狂搜解决办法,没有一个奏效 给各位大佬呈上我的build.gradle ``` apply plugin: 'com.android.application' android { compileSdkVersion 27 defaultConfig { applicationId "com.example.asus.bs_im" minSdkVersion 16 targetSdkVersion 27 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" //use legacy for android 6.0 useLibrary 'org.apache.http.legacy' } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { api fileTree(include: ['*.jar'], dir: 'libs') api 'com.android.support.constraint:constraint-layout:1.0.2' implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support:support-v4:27.1.1' implementation 'com.squareup.okhttp3:okhttp:3.8.1' implementation 'com.google.code.gson:gson:2.8.1' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.1' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' api project(':easeui') configurations { all*.exclude group: 'com.android.support', module: 'support-v13' } } ``` 整了两三个小时了,各种办法都试过了,希望有大佬来拯救一下我这个辣鸡

cannot cast "androidx fragment" to "support fragment"

![图片说明](https://img-ask.csdn.net/upload/202003/20/1584668879_660864.jpg)![图片说明](https://img-ask.csdn.net/upload/202003/20/1584668888_748114.jpg)![图片说明](https://img-ask.csdn.net/upload/202003/20/1584668919_637912.jpg) 请问要怎么改或者导入呢

PopupWindow中放入Viewpager+Fragment 哪位 大神来指点一下

Process: com.example.qianfan, PID: 32599 java.lang.IllegalArgumentException: No view found for id 0x7f0d00b4 (com.example.qianfan:id/vp) for fragment Fragment_A{76a164f #1 id=0x7f0d00b4 android:switcher:2131558580:0} at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1293) at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595) at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:758) at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2363) at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2149) at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2103) at android.support.v4.app.FragmentManagerImpl.execSingleAction(FragmentManager.java:1984) at android.support.v4.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:626) at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:143) at android.support.v4.view.ViewPager.populate(ViewPager.java:1268) at android.support.v4.view.ViewPager.populate(ViewPager.java:1116) at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1642) at android.view.View.measure(View.java:18811) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5952) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465) at android.widget.LinearLayout.measureVertical(LinearLayout.java:748) at android.widget.LinearLayout.onMeasure(LinearLayout.java:630) at android.view.View.measure(View.java:18811) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5952) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:18811) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5952) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:18811) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2127) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1243) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1479) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1134) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6050) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:860) at android.view.Choreographer.doCallbacks(Choreographer.java:672) at android.view.Choreographer.doFrame(Choreographer.java:608) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:846) at android.os.Handler.handleCallback(Handler.java:742) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:5524) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:740) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:630)

pContext: java.lang.ClassNotFoundException:

28615-28615/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.tcsoft.gzoa, PID: 28615 java.lang.RuntimeException: Unable to instantiate application com.tcsoft.gzoa.AppContext: java.lang.ClassNotFoundException: Didn't find class "com.tcsoft.gzoa.AppContext" on path: DexPathList[[zip file "/data/app/com.tcsoft.gzoa-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.tcsoft.gzoa-2, /vendor/lib, /system/lib]] at android.app.LoadedApk.makeApplication(LoadedApk.java:507) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4481) at android.app.ActivityThread.access$1500(ActivityThread.java:145) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1266) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5181) 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:786) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.tcsoft.gzoa.AppContext" on path: DexPathList[[zip file "/data/app/com.tcsoft.gzoa-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.tcsoft.gzoa-2, /vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:497) at java.lang.ClassLoader.loadClass(ClassLoader.java:457) at android.app.Instrumentation.newApplication(Instrumentation.java:975) at android.app.LoadedApk.makeApplication(LoadedApk.java:502) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4481)  at android.app.ActivityThread.access$1500(ActivityThread.java:145)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1266)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:136)  at android.app.ActivityThread.main(ActivityThread.java:5181)  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:786)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)  at dalvik.system.NativeStart.main(Native Method) 

Android Studio找不到FragmentActivity类

FragmentActivity类是在android.support.v4中的,但是我没办法import到程序中,根据网上的说明要导入jar包,但是我发现在Android Studio\sdk\extras\android\support\v4中已经存在了,为什么还是无法使用,这个类到底如何使用

fragment 中 mRecyclerView.setLayoutManager()报错???????

Fragment中 onCreateView代码: ``` public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_fragment2, container, false); initDatas(); mRecyclerView = view.findViewById(R.id.item2); mRVAdapter = new RVAdapter(getActivity(),mData); mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity(),LinearLayoutManager.VERTICAL,false));//错误行; mRecyclerView.setItemAnimator(new DefaultItemAnimator()); mRecyclerView.setAdapter(mRVAdapter); mRecyclerView.addItemDecoration(new DividerItemDecoration(getActivity(),DividerItemDecoration.VERTICAL)); return view; } ``` adapter代码: ``` public class RVAdapter extends RecyclerView.Adapter<MyViewHolder> { private Context context; private List<String> data; public RVAdapter(Context context , List<String> data){ this.context = context; this.data = data; } @NonNull @Override public MyViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) { //创建ViewHolder View view = LayoutInflater.from (viewGroup.getContext ()).inflate (R.layout.item2,viewGroup,false); MyViewHolder viewHolder = new MyViewHolder(view); return viewHolder; } @Override public void onBindViewHolder(@NonNull MyViewHolder holder, int pos) { // 绑定viewholder holder.tv.setText(data.get(pos)); } @Override public int getItemCount() { return data.size(); } } class MyViewHolder extends RecyclerView.ViewHolder{ TextView tv; public MyViewHolder(@NonNull View arg0) { super(arg0); tv = arg0.findViewById(R.id.item2); } } ``` 所报错误: ``` 2019-04-18 21:18:25.483 25820-25820/cn.daun.player E/AndroidRuntime: FATAL EXCEPTION: main Process: cn.daun.player, PID: 25820 java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setLayoutManager(android.support.v7.widget.RecyclerView$LayoutManager)' on a null object reference at cn.daun.player.view.Fragment2.onCreateView(Fragment2.java:37) at android.support.v4.app.Fragment.performCreateView(Fragment.java:2439) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1460) at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852) at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:802) at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2625) at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2411) at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2366) at android.support.v4.app.FragmentManagerImpl.execSingleAction(FragmentManager.java:2243) at android.support.v4.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:654) at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:146) at android.support.v4.view.ViewPager.populate(ViewPager.java:1244) at android.support.v4.view.ViewPager.populate(ViewPager.java:1092) at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1622) at android.view.View.measure(View.java:23169) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6749) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1535) at android.widget.LinearLayout.measureVertical(LinearLayout.java:825) ```

IllegalArgumentException

Process: com.example.qianfan, PID: 32599 java.lang.IllegalArgumentException: No view found for id 0x7f0d00b4 (com.example.qianfan:id/vp) for fragment Fragment_A{76a164f #1 id=0x7f0d00b4 android:switcher:2131558580:0} at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1293) at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595) at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:758) at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2363) at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2149) at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2103) at android.support.v4.app.FragmentManagerImpl.execSingleAction(FragmentManager.java:1984) at android.support.v4.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:626) at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:143) at android.support.v4.view.ViewPager.populate(ViewPager.java:1268) at android.support.v4.view.ViewPager.populate(ViewPager.java:1116) at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1642) at android.view.View.measure(View.java:18811) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5952) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465) at android.widget.LinearLayout.measureVertical(LinearLayout.java:748) at android.widget.LinearLayout.onMeasure(LinearLayout.java:630) at android.view.View.measure(View.java:18811) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5952) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:18811) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5952) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:18811) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2127) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1243) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1479) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1134) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6050) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:860) at android.view.Choreographer.doCallbacks(Choreographer.java:672) at android.view.Choreographer.doFrame(Choreographer.java:608) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:846) at android.os.Handler.handleCallback(Handler.java:742) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:5524) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:740) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:630)

Android Studio3.6.3版本中导入包import android.support.design.widget.TextInputLayout报TextInputLayout爆红。

![图片说明](https://img-ask.csdn.net/upload/202006/06/1591438165_458514.png) 怎么解决啊?

关于java.lang.ClassCastException的问题 求大神解答 错误日志贴上 谢谢了

FATAL EXCEPTION: main Process: com.example.fxr.myapplication, PID: 10943 java.lang.ClassCastException: com.example.fxr.myapplication.friends_top cannot be cast to android.support.v4.app.Fragment at com.example.fxr.myapplication.messagetop$1.getItem(messagetop.java:54) at android.support.v4.app.FragmentPagerAdapter.instantiateItem(FragmentPagerAdapter.java:101) at android.support.v4.view.ViewPager.addNewItem(ViewPager.java:1006) at android.support.v4.view.ViewPager.populate(ViewPager.java:1154) 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:16514) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404) at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:1052) at android.widget.LinearLayout.onMeasure(LinearLayout.java:590) at android.view.View.measure(View.java:16514) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404) at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:1052) at android.widget.LinearLayout.onMeasure(LinearLayout.java:590) at android.view.View.measure(View.java:16514) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) at android.view.View.measure(View.java:16514) at android.widget.LinearLayout.measureVertical(LinearLayout.java:847) at android.widget.LinearLayout.onMeasure(LinearLayout.java:588) at android.view.View.measure(View.java:16514) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) at android.view.View.measure(View.java:16514) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404) at android.widget.LinearLayout.measureVertical(LinearLayout.java:695) at android.widget.LinearLayout.onMeasure(LinearLayout.java:588) at android.view.View.measure(View.java:16514) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2291) at android.view.View.measure(View.java:16514) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1912) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1109) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1291) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:996) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5600) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761) at android.view.Choreographer.doCallbacks(Choreographer.java:574) at android.view.Choreographer.doFrame(Choreographer.java:544) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5095) 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:786) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602) at dalvik.system.NativeStart.main(Native Method)

android 底部4个tabar来回快速切换 奔溃 No host错误

AndroidRuntime: FATAL EXCEPTION: main Process: com.yizooo.yizooo, PID: 21870 java.lang.IllegalStateException: No host at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1235) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1230) at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:2042) at android.support.v4.app.Fragment.performActivityCreated(Fragment.java:1976) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1092) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1248) at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738) at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1613) at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:517) at android.os.Handler.handleCallback(Handler.java:743) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:150) at android.app.ActivityThread.main(ActivityThread.java:5546) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:684) 10-21 18:25:32.393 27110-27110/com.yizooo.yizooo E/SMACK-Voe: enter JNI_OnLoad 截图: ![图片说明](https://img-ask.csdn.net/upload/201610/21/1477045669_89543.png)

app安装后点击闪退,log如下,请问是什么问题啊,麻烦各位指教一下

08-29 21:37:56.458 4962-4962/? I/art: Late-enabling -Xcheck:jni 08-29 21:37:56.618 4962-4962/com.example.coolweather W/System: ClassLoader referenced unknown path: /data/app/com.example.coolweather-1/lib/arm64 08-29 21:37:56.674 4962-4962/com.example.coolweather W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable 08-29 21:37:56.745 4962-4962/com.example.coolweather D/AndroidRuntime: Shutting down VM 08-29 21:37:56.745 4962-4962/com.example.coolweather E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.coolweather, PID: 4962 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.coolweather/com.example.coolweather.MainActivity}: java.lang.NumberFormatException: null at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2695) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2768) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1481) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6153) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:758) Caused by: java.lang.NumberFormatException: null at java.lang.Integer.parseInt(Integer.java:483) at java.lang.Integer.parseInt(Integer.java:556) at org.litepal.parser.LitePalParser.usePullParse(LitePalParser.java:160) at org.litepal.parser.LitePalParser.parseLitePalConfiguration(LitePalParser.java:102) at org.litepal.parser.LitePalAttr.loadLitePalXMLConfiguration(LitePalAttr.java:99) at org.litepal.parser.LitePalAttr.getInstance(LitePalAttr.java:90) at org.litepal.tablemanager.Connector.buildConnection(Connector.java:104) at org.litepal.tablemanager.Connector.getWritableDatabase(Connector.java:63) at org.litepal.tablemanager.Connector.getDatabase(Connector.java:87) at org.litepal.crud.DataSupport.findAll(DataSupport.java:1027) at org.litepal.crud.DataSupport.findAll(DataSupport.java:994) at com.example.coolweather.ChooseAreaFragment.queryProvinces(ChooseAreaFragment.java:115) at com.example.coolweather.ChooseAreaFragment.onActivityCreated(ChooseAreaFragment.java:106) at android.support.v4.app.Fragment.performActivityCreated(Fragment.java:2201) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1326) at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595) at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:2900) at android.support.v4.app.FragmentController.dispatchActivityCreated(FragmentController.java:201) at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:603) at android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:178) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1249) at android.app.Activity.performStart(Activity.java:6722) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2658) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2768)  at android.app.ActivityThread.-wrap12(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1481)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:154)  at android.app.ActivityThread.main(ActivityThread.java:6153)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:758)  08-29 21:37:56.752 4962-4962/? I/Process: Sending signal. PID: 4962 SIG: 9

为什么我的FragmentStatePagerAdapter返回空值

package com.example.administrator.criminalintent; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.app.FragmentStatePagerAdapter; import android.support.v4.view.ViewPager; import java.util.List; import java.util.UUID; /** * Created by Administrator on 2017/7/23 0023. */ public class CrimePagerActivity extends FragmentActivity { private ViewPager mViewPager; private List<Crime> mCrimes; private static final String EXTRA_CRIME_ID="com.example.android.criminalintent.crime_id"; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); mViewPager= (ViewPager) findViewById(R.id.activity_crime_pager_view_pager); mCrimes=CrimeLab.get(this).getCrimes(); FragmentManager fragmentManager=getSupportFragmentManager(); UUID crimeId= (UUID) getIntent().getSerializableExtra(EXTRA_CRIME_ID); FragmentStatePagerAdapter adapter=new FragmentStatePagerAdapter(fragmentManager) { @Override public Fragment getItem(int position) { Crime crime=mCrimes.get(position); return CrimeFragment.newInstance(crime.getmId()); } @Override public int getCount() { return mCrimes.size(); } }; mViewPager.setAdapter(adapter);//报错说我的adapter是空的 for(int i=0;i<mCrimes.size();i++){ if(mCrimes.get(i).getmId().equals(crimeId)){ mViewPager.setCurrentItem(i); break; } } } public static Intent newIntent(Context context, UUID crimeId){ Intent intent=new Intent(context,CrimePagerActivity.class); intent.putExtra(EXTRA_CRIME_ID,crimeId); return intent; } } //这下面是exception 07/24 00:51:55: Launching app Cold swapped changes. $ adb shell am start -n "com.example.administrator.criminalintent/com.example.administrator.criminalintent.CrimeListActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Client not ready yet..Waiting for process to come online Waiting for process to come online Connected to process 7959 on device New_Device_API_25 [emulator-5554] I/OpenGLRenderer: Initialized EGL, version 1.4 D/OpenGLRenderer: Swap behavior 1 W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without... D/OpenGLRenderer: Swap behavior 0 D/AndroidRuntime: Shutting down VM E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.administrator.criminalintent, PID: 7959 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.administrator.criminalintent/com.example.administrator.criminalintent.CrimePagerActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.view.ViewPager.setAdapter(android.support.v4.view.PagerAdapter)' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.view.ViewPager.setAdapter(android.support.v4.view.PagerAdapter)' on a null object reference at com.example.administrator.criminalintent.CrimePagerActivity.onCreate(CrimePagerActivity.java:46) at android.app.Activity.performCreate(Activity.java:6679) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)  at android.app.ActivityThread.-wrap12(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:154)  at android.app.ActivityThread.main(ActivityThread.java:6119)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)  Application terminated.

android 错误: 不兼容的类型: ImageFragment无法转换为Fragment

package com.example.actionbar; import android.app.ActionBar; import android.app.Activity; import android.app.FragmentTransaction; import android.os.Bundle; import android.support.v4.app.Fragment; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); final ActionBar actionBar =getActionBar(); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); actionBar.setDisplayShowTitleEnabled(false); TextFragment aFragment =new TextFragment(); ActionBar.Tab tab1=actionBar.newTab(); tab1.setText("文字"); tab1.setIcon(R.drawable.ic_launcher_foreground); tab1.setTabListener(new ListenerA(aFragment)); actionBar.addTab(tab1); ImageFragment bFragment = new ImageFragment(); ActionBar.Tab tab2 = actionBar.newTab(); tab2.setText("图片"); tab2.setTabListener(new Listenerb(bFragment)); actionBar.addTab(tab2); } private class ListenerA implements ActionBar.TabListener { private TextFragment mFragemnt; public ListenerA(TextFragment fragment) { mFragemnt =fragment; } @Override public void onTabSelected(ActionBar.Tab tab, FragmentTransaction ft) { ft.add(R.id.fragment_content, mFragemnt, null); } //mFragemnt 这出错 下面的也爆红 @Override public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction ft) { ft.remove(mFragemnt); } @Override public void onTabReselected(ActionBar.Tab tab, FragmentTransaction ft) { } } private class Listenerb implements ActionBar.TabListener { private ImageFragment ImFragment; public Listenerb(ImageFragment fragment) { ImFragment =fragment ; } public void onTabSelected(ActionBar.Tab tab, FragmentTransaction ft) { ft.add(R.id.fragment_content, ImFragment, null); } //ImFragment 这出错 下面的也爆红 public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction ft) { ft.remove(ImFragment); } @Override public void onTabReselected(ActionBar.Tab tab, FragmentTransaction ft) { } } }

用android viewPager出现的强转异常

用一个页面切换到另外一个页面出现了异常 02-19 19:56:32.645: E/GED(11205): Failed to get GED Log Buf, err(0) 02-19 19:56:37.141: E/AndroidRuntime(11205): FATAL EXCEPTION: main 02-19 19:56:37.141: E/AndroidRuntime(11205): Process: com.example.shuyannvshen, PID: 11205 02-19 19:56:37.141: E/AndroidRuntime(11205): java.lang.ClassCastException: com.viewpagerindicator.CirclePageIndicator$SavedState cannot be cast to android.widget.HorizontalScrollView$SavedState 02-19 19:56:37.141: E/AndroidRuntime(11205): at android.widget.HorizontalScrollView.onRestoreInstanceState(HorizontalScrollView.java:1667) 02-19 19:56:37.141: E/AndroidRuntime(11205): at android.view.View.dispatchRestoreInstanceState(View.java:14030) 02-19 19:56:37.141: E/AndroidRuntime(11205): at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3018) 02-19 19:56:37.141: E/AndroidRuntime(11205): at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3024) 02-19 19:56:37.141: E/AndroidRuntime(11205): at android.view.View.restoreHierarchyState(View.java:14008) 02-19 19:56:37.141: E/AndroidRuntime(11205): at android.support.v4.app.Fragment.restoreViewState(Fragment.java:449) 02-19 19:56:37.141: E/AndroidRuntime(11205): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:964) 02-19 19:56:37.141: E/AndroidRuntime(11205): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1121) 02-19 19:56:37.141: E/AndroidRuntime(11205): at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682) 02-19 19:56:37.141: E/AndroidRuntime(11205): at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1484) 02-19 19:56:37.141: E/AndroidRuntime(11205): at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:450) 02-19 19:56:37.141: E/AndroidRuntime(11205): at android.os.Handler.handleCallback(Handler.java:815) 02-19 19:56:37.141: E/AndroidRuntime(11205): at android.os.Handler.dispatchMessage(Handler.java:104) 02-19 19:56:37.141: E/AndroidRuntime(11205): at android.os.Looper.loop(Looper.java:194) 02-19 19:56:37.141: E/AndroidRuntime(11205): at android.app.ActivityThread.main(ActivityThread.java:5691) 02-19 19:56:37.141: E/AndroidRuntime(11205): at java.lang.reflect.Method.invoke(Native Method) 02-19 19:56:37.141: E/AndroidRuntime(11205): at java.lang.reflect.Method.invoke(Method.java:372) 02-19 19:56:37.141: E/AndroidRuntime(11205): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959) 02-19 19:56:37.141: E/AndroidRuntime(11205): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)

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学生成绩管理系统

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

相关热词 c#跨线程停止timer c#批量写入sql数据库 c# 自动安装浏览器 c#语言基础考试题 c# 偏移量打印是什么 c# 绘制曲线图 c#框体中的退出函数 c# 按钮透明背景 c# idl 混编出错 c#在位置0处没有任何行
立即提问