android studio3.2 运行app出现 app has stopped

我用AS3.2 建了一个Acitivity,然后写入

我打开模拟器 运行这个app出现

我打开logcat,出现

 怎么回事,空指针异常? 怎么解决   
 哪位大佬帮帮忙      谢谢

2个回答

这个是你mainactivity 里面button 定义了没有给它赋值,或者赋值的语句写在了setContent前面了,又或者根本没有setContent,详细的问题需要看你的activity文件。报错信息在16行在那里看看。一般给button赋值可以通过button=(Button) findViewById(R.id.button_1)

没有MainActivity部分的代码吗

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

您好!我在Android studio中运行时出现Unfortunatelyl app has stopped!!这是logcat 中的错误提示。求如何解决?谢谢! ![图片说明](https://img-ask.csdn.net/upload/201609/19/1474268792_895632.png)

Android程序在genymotion模拟器上能够成功安装但无法运行,点击app是显示Unfortunately,XXX has stopped求大神指教一下解决方法

![图片说明](https://img-ask.csdn.net/upload/202003/20/1584675551_868605.png) ## AndroidManifest.xml文件内容 ```xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.servicedemo"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> ``` ## activity_main.xml文件内容 ```xml <?xml version="1.0" encoding="utf-8"?> <androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/app_name" android:gravity="center_horizontal" android:padding="10sp" android:textColor="#00FF00" android:textSize="16pt" /> <Button android:id="@+id/BTN_START" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:text="@string/start_service" /> <Button android:id="@+id/BTN_STOP" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:text="@string/stop_service"/> </androidx.appcompat.widget.LinearLayoutCompat> ```

求助!在Android Studio 中跑程序最后 虚拟机界面总是出现Unfortunately,xxx has stopped

再看高德地图开发手册,跟着官网贴出的开发流程走显示3D地图,代码也没有错误,总是在最后的虚拟机页面无法显示,图片是logcat中标红部分,我看不懂找不出错误请教一下大家请问我是哪里出错了,因为是导师布置的任务好紧急,也没有C币,老师们不要嫌弃帮帮忙看看我这个小问题吧,希望能解决,谢谢大家 。![图片说明](https://img-ask.csdn.net/upload/201912/18/1576638824_873576.png) ![图片说明](https://img-ask.csdn.net/upload/201912/18/1576638935_649636.png)![图片说明](https://img-ask.csdn.net/upload/201912/18/1576638947_750704.jpg)![图片说明](https://img-ask.csdn.net/upload/201912/18/1576638959_248114.jpg)

“Unfortunately, app name has stopped.”android设备或者是模拟器

我在根据一些教程来创建app,当我想要运行app的时候,没有显示错误,但是在emulator显示"Unfortunately, Viewfinder blabla has stopped." 代码: AndroidManifest.xml file <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.viewfinderee368" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".ViewfinderEE368" android:label="@string/app_name" android:screenOrientation="landscape"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> </application> <uses-sdk android:minSdkVersion="6"/> <uses-permission android:name="android.permission.CAMERA"/> <uses-feature android:name="android.hardware.camera"/> <uses-feature android:name="android.hardware.camera.autofocus"/> </manifest> src/.java file package com.example.viewfinderee368; import java.io.IOException; import android.app.Activity; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.RectF; import android.hardware.Camera; import android.hardware.Camera.PreviewCallback; import android.os.Bundle; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.View; import android.view.Window; import android.view.WindowManager; import android.view.ViewGroup.LayoutParams; // ---------------------------------------------------------------------- public class ViewfinderEE368 extends Activity { private Preview mPreview; private DrawOnTop mDrawOnTop; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // 隐藏窗口标题H getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); requestWindowFeature(Window.FEATURE_NO_TITLE); //创建预览视图然后将它设置为activity的目录 //创建DrawOnTop视图. mDrawOnTop = new DrawOnTop(this); mPreview = new Preview(this, mDrawOnTop); setContentView(mPreview); addContentView(mDrawOnTop, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); } } //---------------------------------------------------------------------- class DrawOnTop extends View { Bitmap mBitmap; Paint mPaintBlack; Paint mPaintYellow; Paint mPaintRed; Paint mPaintGreen; Paint mPaintBlue; byte[] mYUVData; int[] mRGBData; int mImageWidth, mImageHeight; int[] mRedHistogram; int[] mGreenHistogram; int[] mBlueHistogram; double[] mBinSquared; public DrawOnTop(Context context) { super(context); mPaintBlack = new Paint(); mPaintBlack.setStyle(Paint.Style.FILL); mPaintBlack.setColor(Color.BLACK); mPaintBlack.setTextSize(25); mPaintYellow = new Paint(); mPaintYellow.setStyle(Paint.Style.FILL); mPaintYellow.setColor(Color.YELLOW); mPaintYellow.setTextSize(25); mPaintRed = new Paint(); mPaintRed.setStyle(Paint.Style.FILL); mPaintRed.setColor(Color.RED); mPaintRed.setTextSize(25); mPaintGreen = new Paint(); mPaintGreen.setStyle(Paint.Style.FILL); mPaintGreen.setColor(Color.GREEN); mPaintGreen.setTextSize(25); mPaintBlue = new Paint(); mPaintBlue.setStyle(Paint.Style.FILL); mPaintBlue.setColor(Color.BLUE); mPaintBlue.setTextSize(25); mBitmap = null; mYUVData = null; mRGBData = null; mRedHistogram = new int[256]; mGreenHistogram = new int[256]; mBlueHistogram = new int[256]; mBinSquared = new double[256]; for (int bin = 0; bin < 256; bin++) { mBinSquared[bin] = ((double)bin) * bin; } // bin } @Override protected void onDraw(Canvas canvas) { if (mBitmap != null) { int canvasWidth = canvas.getWidth(); int canvasHeight = canvas.getHeight(); int newImageWidth = canvasWidth; int newImageHeight = canvasHeight; int marginWidth = (canvasWidth - newImageWidth)/2; // 从YUV转换成RGB decodeYUV420SP(mRGBData, mYUVData, mImageWidth, mImageHeight); // 画位图 // mBitmap.setPixels(mRGBData, 0, mImageWidth, 0, 0, // mImageWidth, mImageHeight); // Rect src = new Rect(0, 0, mImageWidth, mImageHeight); // Rect dst = new Rect(marginWidth, 0, // canvasWidth-marginWidth, canvasHeight); // canvas.drawBitmap(mBitmap, src, dst, mPaintBlack); // 画黑色边缘 // canvas.drawRect(0, 0, marginWidth, canvasHeight, mPaintBlack); // canvas.drawRect(canvasWidth - marginWidth, 0, // canvasWidth, canvasHeight, mPaintBlack); // 计算直方图 calculateIntensityHistogram(mRGBData, mRedHistogram, mImageWidth, mImageHeight, 0); calculateIntensityHistogram(mRGBData, mGreenHistogram, mImageWidth, mImageHeight, 1); calculateIntensityHistogram(mRGBData, mBlueHistogram, mImageWidth, mImageHeight, 2); // 计算平均值 double imageRedMean = 0, imageGreenMean = 0, imageBlueMean = 0; double redHistogramSum = 0, greenHistogramSum = 0, blueHistogramSum = 0; for (int bin = 0; bin < 256; bin++) { imageRedMean += mRedHistogram[bin] * bin; redHistogramSum += mRedHistogram[bin]; imageGreenMean += mGreenHistogram[bin] * bin; greenHistogramSum += mGreenHistogram[bin]; imageBlueMean += mBlueHistogram[bin] * bin; blueHistogramSum += mBlueHistogram[bin]; } // bin imageRedMean /= redHistogramSum; imageGreenMean /= greenHistogramSum; imageBlueMean /= blueHistogramSum; double imageRed2ndMoment = 0, imageGreen2ndMoment = 0, imageBlue2ndMoment = 0; for (int bin = 0; bin < 256; bin++) { imageRed2ndMoment += mRedHistogram[bin] * mBinSquared[bin]; imageGreen2ndMoment += mGreenHistogram[bin] * mBinSquared[bin]; imageBlue2ndMoment += mBlueHistogram[bin] * mBinSquared[bin]; } // bin imageRed2ndMoment /= redHistogramSum; imageGreen2ndMoment /= greenHistogramSum; imageBlue2ndMoment /= blueHistogramSum; double imageRedStdDev = Math.sqrt( imageRed2ndMoment - imageRedMean*imageRedMean ); double imageGreenStdDev = Math.sqrt( imageGreen2ndMoment - imageGreenMean*imageGreenMean ); double imageBlueStdDev = Math.sqrt( imageBlue2ndMoment - imageBlueMean*imageBlueMean ); // 画平均值 String imageMeanStr = "Mean (R,G,B): " + String.format("%.4g", imageRedMean) + ", " + String.format("%.4g", imageGreenMean) + ", " + String.format("%.4g", imageBlueMean); canvas.drawText(imageMeanStr, marginWidth+10-1, 30-1, mPaintBlack); canvas.drawText(imageMeanStr, marginWidth+10+1, 30-1, mPaintBlack); canvas.drawText(imageMeanStr, marginWidth+10+1, 30+1, mPaintBlack); canvas.drawText(imageMeanStr, marginWidth+10-1, 30+1, mPaintBlack); canvas.drawText(imageMeanStr, marginWidth+10, 30, mPaintYellow); // 画标准差 String imageStdDevStr = "Std Dev (R,G,B): " + String.format("%.4g", imageRedStdDev) + ", " + String.format("%.4g", imageGreenStdDev) + ", " + String.format("%.4g", imageBlueStdDev); canvas.drawText(imageStdDevStr, marginWidth+10-1, 60-1, mPaintBlack); canvas.drawText(imageStdDevStr, marginWidth+10+1, 60-1, mPaintBlack); canvas.drawText(imageStdDevStr, marginWidth+10+1, 60+1, mPaintBlack); canvas.drawText(imageStdDevStr, marginWidth+10-1, 60+1, mPaintBlack); canvas.drawText(imageStdDevStr, marginWidth+10, 60, mPaintYellow); // 画红色直方图 float barMaxHeight = 3000; float barWidth = ((float)newImageWidth) / 256; float barMarginHeight = 2; RectF barRect = new RectF(); barRect.bottom = canvasHeight - 200; barRect.left = marginWidth; barRect.right = barRect.left + barWidth; for (int bin = 0; bin < 256; bin++) { float prob = (float)mRedHistogram[bin] / (float)redHistogramSum; barRect.top = barRect.bottom - Math.min(80,prob*barMaxHeight) - barMarginHeight; canvas.drawRect(barRect, mPaintBlack); barRect.top += barMarginHeight; canvas.drawRect(barRect, mPaintRed); barRect.left += barWidth; barRect.right += barWidth; } // bin // 画绿色直方图 barRect.bottom = canvasHeight - 100; barRect.left = marginWidth; barRect.right = barRect.left + barWidth; for (int bin = 0; bin < 256; bin++) { barRect.top = barRect.bottom - Math.min(80, ((float)mGreenHistogram[bin])/((float)greenHistogramSum) * barMaxHeight) - barMarginHeight; canvas.drawRect(barRect, mPaintBlack); barRect.top += barMarginHeight; canvas.drawRect(barRect, mPaintGreen); barRect.left += barWidth; barRect.right += barWidth; } // bin // 画蓝色直方图 barRect.bottom = canvasHeight; barRect.left = marginWidth; barRect.right = barRect.left + barWidth; for (int bin = 0; bin < 256; bin++) { barRect.top = barRect.bottom - Math.min(80, ((float)mBlueHistogram[bin])/((float)blueHistogramSum) * barMaxHeight) - barMarginHeight; canvas.drawRect(barRect, mPaintBlack); barRect.top += barMarginHeight; canvas.drawRect(barRect, mPaintBlue); barRect.left += barWidth; barRect.right += barWidth; } // bin } //结束条件语句 super.onDraw(canvas); } // 结束onDraw方法 static public void decodeYUV420SP(int[] rgb, byte[] yuv420sp, int width, int height) { final int frameSize = width * height; for (int j = 0, yp = 0; j < height; j++) { int uvp = frameSize + (j >> 1) * width, u = 0, v = 0; for (int i = 0; i < width; i++, yp++) { int y = (0xff & ((int) yuv420sp[yp])) - 16; if (y < 0) y = 0; if ((i & 1) == 0) { v = (0xff & yuv420sp[uvp++]) - 128; u = (0xff & yuv420sp[uvp++]) - 128; } int y1192 = 1192 * y; int r = (y1192 + 1634 * v); int g = (y1192 - 833 * v - 400 * u); int b = (y1192 + 2066 * u); if (r < 0) r = 0; else if (r > 262143) r = 262143; if (g < 0) g = 0; else if (g > 262143) g = 262143; if (b < 0) b = 0; else if (b > 262143) b = 262143; rgb[yp] = 0xff000000 | ((r << 6) & 0xff0000) | ((g >> 2) & 0xff00) | ((b >> 10) & 0xff); } } } static public void decodeYUV420SPGrayscale(int[] rgb, byte[] yuv420sp, int width, int height) { final int frameSize = width * height; for (int pix = 0; pix < frameSize; pix++) { int pixVal = (0xff & ((int) yuv420sp[pix])) - 16; if (pixVal < 0) pixVal = 0; if (pixVal > 255) pixVal = 255; rgb[pix] = 0xff000000 | (pixVal << 16) | (pixVal << 8) | pixVal; } } static public void calculateIntensityHistogram(int[] rgb, int[] histogram, int width, int height, int component) { for (int bin = 0; bin < 256; bin++) { histogram[bin] = 0; } // bin if (component == 0) // red { for (int pix = 0; pix < width*height; pix += 3) { int pixVal = (rgb[pix] >> 16) & 0xff; histogram[ pixVal ]++; } // pix } else if (component == 1) // green { for (int pix = 0; pix < width*height; pix += 3) { int pixVal = (rgb[pix] >> 8) & 0xff; histogram[ pixVal ]++; } // pix } else // blue { for (int pix = 0; pix < width*height; pix += 3) { int pixVal = rgb[pix] & 0xff; histogram[ pixVal ]++; } // pix } } } // ---------------------------------------------------------------------- class Preview extends SurfaceView implements SurfaceHolder.Callback { SurfaceHolder mHolder; Camera mCamera; DrawOnTop mDrawOnTop; boolean mFinished; Preview(Context context, DrawOnTop drawOnTop) { super(context); mDrawOnTop = drawOnTop; mFinished = false; // 安装SurfaceHolder.Callback以便当下垫面被创建和销毁的时候我们能够获得通知 mHolder = getHolder(); mHolder.addCallback(this); mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); } public void surfaceCreated(SurfaceHolder holder) { mCamera = Camera.open(); try { mCamera.setPreviewDisplay(holder); mCamera.setPreviewCallback(new PreviewCallback() { public void onPreviewFrame(byte[] data, Camera camera) { if ( (mDrawOnTop == null) || mFinished ) return; if (mDrawOnTop.mBitmap == null) { // 初始化draw-on-top companion Camera.Parameters params = camera.getParameters(); mDrawOnTop.mImageWidth = params.getPreviewSize().width; mDrawOnTop.mImageHeight = params.getPreviewSize().height; mDrawOnTop.mBitmap = Bitmap.createBitmap(mDrawOnTop.mImageWidth, mDrawOnTop.mImageHeight, Bitmap.Config.RGB_565); mDrawOnTop.mRGBData = new int[mDrawOnTop.mImageWidth * mDrawOnTop.mImageHeight]; mDrawOnTop.mYUVData = new byte[data.length]; } System.arraycopy(data, 0, mDrawOnTop.mYUVData, 0, data.length); mDrawOnTop.invalidate(); } }); } catch (IOException exception) { mCamera.release(); mCamera = null; } } public void surfaceDestroyed(SurfaceHolder holder) { // 但给我们返回的时候,Surface将被摧毁,所以停止预览 // 因为CameraDevice object不是共享的对象,所以当activity停止的时候要释放它。这个很重要。 mFinished = true; mCamera.setPreviewCallback(null); mCamera.stopPreview(); mCamera.release(); mCamera = null; } public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { // 现在这个大小是知道的,设置相机参数然后开始预览 Camera.Parameters parameters = mCamera.getParameters(); parameters.setPreviewSize(320, 240); parameters.setPreviewFrameRate(15); parameters.setSceneMode(Camera.Parameters.SCENE_MODE_NIGHT); parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_AUTO); mCamera.setParameters(parameters); mCamera.startPreview(); } } 我尝试在真机下和模拟器下运行,但是错误都一样 LogCat 11-20 02:50:38.943: E/AndroidRuntime(614): FATAL EXCEPTION: main 11-20 02:50:38.943: E/AndroidRuntime(614): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.viewfinderee368/com.example.viewfinderee368.ViewfinderEE368}: android.util.AndroidRuntimeException: requestFeature() must be called before adding content 11-20 02:50:38.943: E/AndroidRuntime(614): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059) 11-20 02:50:38.943: E/AndroidRuntime(614): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084) 11-20 02:50:38.943: E/AndroidRuntime(614): at android.app.ActivityThread.access$600(ActivityThread.java:130) 11-20 02:50:38.943: E/AndroidRuntime(614): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195) 11-20 02:50:38.943: E/AndroidRuntime(614): at android.os.Handler.dispatchMessage(Handler.java:99) 11-20 02:50:38.943: E/AndroidRuntime(614): at android.os.Looper.loop(Looper.java:137) 11-20 02:50:38.943: E/AndroidRuntime(614): at android.app.ActivityThread.main(ActivityThread.java:4745) 11-20 02:50:38.943: E/AndroidRuntime(614): at java.lang.reflect.Method.invokeNative(Native Method) 11-20 02:50:38.943: E/AndroidRuntime(614): at java.lang.reflect.Method.invoke(Method.java:511) 11-20 02:50:38.943: E/AndroidRuntime(614): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) 11-20 02:50:38.943: E/AndroidRuntime(614): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 11-20 02:50:38.943: E/AndroidRuntime(614): at dalvik.system.NativeStart.main(Native Method) 11-20 02:50:38.943: E/AndroidRuntime(614): Caused by: android.util.AndroidRuntimeException: requestFeature() must be called before adding content 11-20 02:50:38.943: E/AndroidRuntime(614): at com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:215) 11-20 02:50:38.943: E/AndroidRuntime(614): at android.app.Activity.requestWindowFeature(Activity.java:3225) 11-20 02:50:38.943: E/AndroidRuntime(614): at com.example.viewfinderee368.ViewfinderEE368.onCreate(ViewfinderEE368.java:52) 11-20 02:50:38.943: E/AndroidRuntime(614): at android.app.Activity.performCreate(Activity.java:5008) 11-20 02:50:38.943: E/AndroidRuntime(614): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079) 11-20 02:50:38.943: E/AndroidRuntime(614): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023) 11-20 02:50:38.943: E/AndroidRuntime(614): ... 11 more

android编译显示没有问题,一运行就显示has stopped 跪求大神解答!!

我也查看了logcat,显示错误是在23行,但不知道如何修改QAQ,求大神指点 logcat和layout、活动代码见图![![![![![图片说明](https://img-ask.csdn.net/upload/201711/14/1510597786_161567.png)图片说明](https://img-ask.csdn.net/upload/201711/14/1510597774_690589.png)图片说明](https://img-ask.csdn.net/upload/201711/14/1510597753_474601.png)图片说明](https://img-ask.csdn.net/upload/201711/14/1510597739_166151.png)图片说明](https://img-ask.csdn.net/upload/201711/14/1510597728_880358.png)

Android studio运行的时候提示这样的问题!

Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/google/gson/JsonSerializer; 运行的时候就出现这样的问题了,去网上查说是依赖包重复的问题,但是还是没有找到怎么解决问题 ![图片说明](https://img-ask.csdn.net/upload/201711/25/1511598499_111255.jpg) ![图片说明](https://img-ask.csdn.net/upload/201711/25/1511598479_469351.jpg)

android程序运行的时候出现unfortunately,imageView has stopped.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context="com.android.imageview.MainActivity" tools:ignore="MergeRootFrame" > <ImageView android:id="@+id/imageView" android:layout_width="250dp" android:layout_height="300dp" android:src="@drawable/image" android:contentDescription="@string/description" android:scaleType="fitCenter"></ImageView> <TextView android:id="@+id/textView1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:text="@string/text_one"/> <SeekBar android:id="@+id/seekBar1" android:layout_width="300dp" android:layout_height="wrap_content" android:max="300" android:progress="100" android:layout_marginTop="10dp"/> <TextView android:id="@+id/textView2" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/text_two" android:layout_marginTop="10dp"></TextView> <SeekBar android:id="@+id/seekBar2" android:layout_width="300dp" android:layout_height="wrap_content" android:max="360" android:layout_marginTop="10dp"/> </LinearLayout> package com.android.imageview; import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBar; import android.support.v4.app.Fragment; import android.graphics.Bitmap; import android.graphics.Matrix; import android.graphics.drawable.BitmapDrawable; import android.os.Bundle; import android.util.DisplayMetrics; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.SeekBar; import android.widget.SeekBar.OnSeekBarChangeListener; import android.widget.TextView; import android.os.Build; public class MainActivity extends ActionBarActivity implements OnSeekBarChangeListener{ private int minWidth = 40; private TextView textView1,TextView2; private ImageView imageView; private Matrix matrix; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); imageView = (ImageView)this.findViewById(R.id.imageView); SeekBar seekBar1 = (SeekBar)this.findViewById(R.id.seekBar1); SeekBar seekBar2 = (SeekBar)this.findViewById(R.id.seekBar2); seekBar1.setOnSeekBarChangeListener(this); seekBar2.setOnSeekBarChangeListener(this); DisplayMetrics dm = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(dm); seekBar1.setMax(dm.widthPixels-minWidth); if (savedInstanceState == null) { getSupportFragmentManager().beginTransaction() .add(R.id.container, new PlaceholderFragment()).commit(); } } @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { // TODO Auto-generated method stub if (seekBar.getId()==R.id.seekBar1){ int newWidth = progress + minWidth; int newHeight = (int)(newWidth*6/5); imageView.setLayoutParams(new LinearLayout.LayoutParams(newWidth, newHeight)); textView1.setText("图像宽度:"+newWidth+" 图像高度:"+newHeight); }else if(seekBar.getId()==R.id.seekBar2){ Bitmap bitmap = ((BitmapDrawable)getResources().getDrawable(R.drawable.image)).getBitmap(); matrix.setRotate(progress); bitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true); imageView.setImageBitmap(bitmap); TextView2.setText(progress+"度"); } } ​

Android Studio程序编译正常,但是模拟机运行却提示“stop running”。

![![![![图片说明](https://img-ask.csdn.net/upload/201810/12/1539334467_714631.png)图片说明](https://img-ask.csdn.net/upload/201810/12/1539334458_751292.png)图片说明](https://img-ask.csdn.net/upload/201810/12/1539334432_466583.png)图片说明](https://img-ask.csdn.net/upload/201810/12/1539334405_320286.png) Android Studio小白,课程作业里写了一段JAVA代码。代码是教师给的,应该没问题,但是写出来程序认了之后模拟机却一直停止运行。试着排查把JAVA代码部分(int那行到edt那行一共四行的内容)注释掉了以后可以运行了。请问这是为什么呢?版本是2.2。求解答,谢谢!

VS2017下的Xamarin运行出现unfortunately has stopped

VS2017下的Xamarin运行出现unfortunately has stopped,各位大神求帮忙看下。

安卓编程运行时出错,提示unfortunately,my test has stopped

package com.example.mytest; import android.view.View; import android.widget.Button; import android.widget.TextView; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; public class exam extends AppCompatActivity { private Button[] btnnum = new Button[11]; private Button[] btnop = new Button[13]; private TextView text = null; private Button btnclear = null; private static String op; private boolean clear; private double result; public exam() { result = 0; clear = false; op = "="; } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_exam); //获取数字 btnnum[0] = (Button) findViewById(R.id.s0); btnnum[1] = (Button) findViewById(R.id.s1); btnnum[2] = (Button) findViewById(R.id.s2); btnnum[3] = (Button) findViewById(R.id.s3); btnnum[4] = (Button) findViewById(R.id.s4); btnnum[5] = (Button) findViewById(R.id.s5); btnnum[6] = (Button) findViewById(R.id.s6); btnnum[7] = (Button) findViewById(R.id.s7); btnnum[8] = (Button) findViewById(R.id.s8); btnnum[9] = (Button) findViewById(R.id.s9); //获取操作符 btnop[0] = (Button) findViewById(R.id.Percentage); btnop[1] = (Button) findViewById(R.id.CE); btnop[2] = (Button) findViewById(R.id.C); btnop[3] = (Button) findViewById(R.id.DEL); btnop[4] = (Button) findViewById(R.id.x1); btnop[5] = (Button) findViewById(R.id.x2); btnop[7] = (Button) findViewById(R.id.x3); btnop[8] = (Button) findViewById(R.id.divide); btnop[9] = (Button) findViewById(R.id.multiply); btnop[10] = (Button) findViewById(R.id.subtract); btnop[11] = (Button) findViewById(R.id.plus); btnop[12] = (Button) findViewById(R.id.complex); btnop[13] = (Button) findViewById(R.id.outcomn); //初始化显示界面 text = (TextView) findViewById(R.id.show); text.setText("0.0"); //实例化监听对象 NumberAction na = new NumberAction(); opAction oa = new opAction(); for (Button bc : btnop) { bc.setOnClickListener((View.OnClickListener) oa); } for (Button bc : btnnum) { bc.setOnClickListener((View.OnClickListener) na); } //cleard的动作 btnclear = (Button) findViewById(R.id.CE); btnclear.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { text.setText("0.0"); result = 0; clear = false; op = "="; } }); } //数字的监听动作 private class NumberAction implements View.OnClickListener{ @Override public void onClick(View v){ Button btn = (Button) v; String input = btn.getText().toString(); if (clear){ text.setText(""); clear=false; } text.setText(text.getText().toString() + input); } } //操作符的监听动作 public class opAction implements View.OnClickListener { @Override public void onClick(View v) { Button btn = (Button) v; String inputop = (String) btn.getText(); if (!clear) {//调用计算方法 calculate(Double.parseDouble(text.getText().toString())); } //保存操作符 op = inputop; clear = true; } } public void calculate(double x) { if (op.equals("+")) { result += x; } else if (op.equals("-")) { result -= x; } else if (op.equals("*")) { result *= x; } else if (op.equals("/")) { result /= x; } else if (op.equals("%")) { result = x / 100; } else if (op.equals("1/x")) { result = 1 / x; } else if (op.equals("x2")) { result = x * x; } else if (op.equals("²√x")) { double k = 1; while (Math.abs(k * k - x) > 1e-5) { k = (k + x / k) / 2; result = k; } text.setText("" + result); } } } ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".exam" android:orientation="vertical" > <LinearLayout android:layout_width="350dp" android:layout_height="wrap_content" > <TextView android:id="@+id/show" android:layout_width="match_parent" android:layout_height="150dp" android:text="0.0" android:gravity="right" /> </LinearLayout> <LinearLayout android:layout_width="350dp" android:layout_height="wrap_content" > <Button android:id="@+id/Percentage" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="%" > </Button> <Button android:id="@+id/CE" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="CE" > </Button> <Button android:id="@+id/C" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="C" > </Button> <Button android:id="@+id/DEL" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="DEL" > </Button> </LinearLayout> <LinearLayout android:layout_width="350dp" android:layout_height="wrap_content" > <Button android:id="@+id/x1" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="1/x" > </Button> <Button android:id="@+id/x2" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="x2" > </Button> <Button android:id="@+id/x3" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="²√x" > </Button> <Button android:id="@+id/divide" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="/" > </Button> </LinearLayout> <LinearLayout android:layout_width="350dp" android:layout_height="wrap_content" > <Button android:id="@+id/s7" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="7" > </Button> <Button android:id="@+id/s8" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="8" > </Button> <Button android:id="@+id/s9" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="9" > </Button> <Button android:id="@+id/multiply" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="*" > </Button> </LinearLayout> <LinearLayout android:layout_width="350dp" android:layout_height="wrap_content" > <Button android:id="@+id/s4" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="4" > </Button> <Button android:id="@+id/s5" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="5" > </Button> <Button android:id="@+id/s6" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="6" > </Button> <Button android:id="@+id/subtract" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="-" > </Button> </LinearLayout> <LinearLayout android:layout_width="350dp" android:layout_height="wrap_content" > <Button android:id="@+id/s1" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="1" > </Button> <Button android:id="@+id/s2" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="2" > </Button> <Button android:id="@+id/s3" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="3" > </Button> <Button android:id="@+id/add" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="+" > </Button> </LinearLayout> <LinearLayout android:layout_width="350dp" android:layout_height="wrap_content" > <Button android:id="@+id/complex" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="+/-" > </Button> <Button android:id="@+id/s0" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="0" > </Button> <Button android:id="@+id/xiaoshudian" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="." > </Button> <Button android:id="@+id/outcomn" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="=" > </Button> </LinearLayout> </LinearLayout> ```可以帮忙找一下错误嘛,路径没问题,应该是代码哪里有错了。

在模拟器运行的时候出错,提示Unfortunately,XXX has stopped

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.textqrcode" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="18" /> <uses-permission android:name="android.permission.CAMERA"/> <uses-permission android:name="android.permission.VIBRATE"/> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name=".MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:configChanges="orientation|keyboardHidden" android:name="com.zxing.activity.CaptureActivity" android:screenOrientation="portrait" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:windowSoftInputMode="stateAlwaysHidden" > </activity> </application> </manifest> ``` ``` 01-31 07:52:24.090: E/AndroidRuntime(695): FATAL EXCEPTION: main 01-31 07:52:24.090: E/AndroidRuntime(695): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.textqrcode/com.example.textqrcode.CaptureActivity}; have you declared this activity in your AndroidManifest.xml? 01-31 07:52:24.090: E/AndroidRuntime(695): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1508) 01-31 07:52:24.090: E/AndroidRuntime(695): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1384) 01-31 07:52:24.090: E/AndroidRuntime(695): at android.app.Activity.startActivityForResult(Activity.java:3190) 01-31 07:52:24.090: E/AndroidRuntime(695): at android.app.Activity.startActivity(Activity.java:3297) 01-31 07:52:24.090: E/AndroidRuntime(695): at com.example.textqrcode.MainActivity$1.onClick(MainActivity.java:26) 01-31 07:52:24.090: E/AndroidRuntime(695): at android.view.View.performClick(View.java:3480) 01-31 07:52:24.090: E/AndroidRuntime(695): at android.view.View$PerformClick.run(View.java:13983) 01-31 07:52:24.090: E/AndroidRuntime(695): at android.os.Handler.handleCallback(Handler.java:605) 01-31 07:52:24.090: E/AndroidRuntime(695): at android.os.Handler.dispatchMessage(Handler.java:92) 01-31 07:52:24.090: E/AndroidRuntime(695): at android.os.Looper.loop(Looper.java:137) 01-31 07:52:24.090: E/AndroidRuntime(695): at android.app.ActivityThread.main(ActivityThread.java:4340) 01-31 07:52:24.090: E/AndroidRuntime(695): at java.lang.reflect.Method.invokeNative(Native Method) 01-31 07:52:24.090: E/AndroidRuntime(695): at java.lang.reflect.Method.invoke(Method.java:511) 01-31 07:52:24.090: E/AndroidRuntime(695): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 01-31 07:52:24.090: E/AndroidRuntime(695): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 01-31 07:52:24.090: E/AndroidRuntime(695): at dalvik.system.NativeStart.main(Native Method)

安卓模拟器运行出现unfortunately,xxx has stoped是什么原因啊,小白刚学

activity_main.xml代码: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <TextView android:id="@+id/text_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="This is TextView" /> <Button android:id="@+id/button" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button"/> <EditText android:id="@+id/edit_text" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_below="@+id/button" android:layout_marginTop="14dp" android:ems="10" android:hint="Type something here" > <requestFocus /> </EditText> </RelativeLayout> MainActivity.java代码: package com.example.class3; import android.app.Activity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; public class MainActivity extends Activity { private Button button; private EditText editText; @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } @Override protected void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Button button = (Button) findViewById(R.id.button); editText=(EditText) findViewById(R.id.edit_text); button.setOnClickListener((OnClickListener) this); } public void onClick(View v){ switch(v.getId()){ case R.id.button: String inputText=editText.getText().toString(); Toast.makeText(MainActivity.this,inputText, Toast.LENGTH_SHORT).show(); break; default: break; } } }

Andriod Studio 在项目中使用自定义图片出现Unfortunately XXXhas stopped

在项目中只要加入自己在网上找的图片就会出现Unfortunately XXXhas stopped的情况,同样的图片放在其他项目里就可以使用,并且比如图片放在第二个页面,在软件跳转到第二个页面前都可以正常运行,跳转到有自定义图片的页面就会出现Unfortunately XXXhas stopped(使用软件里自带的图片没有问题),马上要交作业了求大神解答解决方法 catlog在图片里 ![图片说明](https://img-ask.csdn.net/upload/201810/22/1540199030_924022.png)

android studio 无法debug

![图片说明](https://img-ask.csdn.net/upload/201708/27/1503800986_389543.jpg)

安卓虚拟机总是出现Unfortunately,xxxxxxxx has stopped

是按照《第一行代码》写的,改成跟书上一模一样还出现这个,求指导 ``` 03-15 05:31:41.660: D/gralloc_goldfish(1692): Emulator without GPU emulation detected. 03-15 05:31:45.230: D/AndroidRuntime(1692): Shutting down VM 03-15 05:31:45.230: W/dalvikvm(1692): threadid=1: thread exiting with uncaught exception (group=0xb4abfba8) 03-15 05:31:45.280: E/AndroidRuntime(1692): FATAL EXCEPTION: main 03-15 05:31:45.280: E/AndroidRuntime(1692): Process: com.example.uiwidgettest, PID: 1692 03-15 05:31:45.280: E/AndroidRuntime(1692): java.lang.NullPointerException 03-15 05:31:45.280: E/AndroidRuntime(1692): at com.example.uiwidgettest.MainActivity.onClick(MainActivity.java:48) 03-15 05:31:45.280: E/AndroidRuntime(1692): at android.view.View.performClick(View.java:4438) 03-15 05:31:45.280: E/AndroidRuntime(1692): at android.view.View$PerformClick.run(View.java:18422) 03-15 05:31:45.280: E/AndroidRuntime(1692): at android.os.Handler.handleCallback(Handler.java:733) 03-15 05:31:45.280: E/AndroidRuntime(1692): at android.os.Handler.dispatchMessage(Handler.java:95) 03-15 05:31:45.280: E/AndroidRuntime(1692): at android.os.Looper.loop(Looper.java:136) 03-15 05:31:45.280: E/AndroidRuntime(1692): at android.app.ActivityThread.main(ActivityThread.java:5001) 03-15 05:31:45.280: E/AndroidRuntime(1692): at java.lang.reflect.Method.invokeNative(Native Method) 03-15 05:31:45.280: E/AndroidRuntime(1692): at java.lang.reflect.Method.invoke(Method.java:515) 03-15 05:31:45.280: E/AndroidRuntime(1692): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) 03-15 05:31:45.280: E/AndroidRuntime(1692): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) 03-15 05:31:45.280: E/AndroidRuntime(1692): at dalvik.system.NativeStart.main(Native Method) ```

关于移动开发跳转页面停止运行

界面1、2、3 界面1跳转到2没有问题 单身从界面2跳转到界面3就出现My Activity停止运行的错误 ![图片说明](https://img-ask.csdn.net/upload/202005/03/1588516719_89574.png) ![图片说明](https://img-ask.csdn.net/upload/202005/04/1588584906_855956.png)![图片说明](https://img-ask.csdn.net/upload/202005/04/1588584915_475012.png)

Android Studio JNI封装问题

大家好,在下有一问题请教: 别人给了一个C语言编译的动态库和头文件(libxxx.so,xxx.h),我想在Android Studio中NDK开发时用JNI封装这个库,然后再生成一个libyyy.so给Android Java调用.我已经在linux下用yyy.c和Makefile实现了我的想法(即通过libxxx.so经过JNI封装生成libyyy.so给Android Java调用),我想为了方便,能否直接在Android Studio上对别人给的C库进行JNI封装,具体如何操作, 望予以指点.谢谢

Windows server2012R2系统中Android编译总是提示“aapt2.exe has stopped working”

将同一份代码在我自己的win10机器上运行没问题,放在WindowsServer2008上运行也没问题,唯独放到WindowsServer2012R2系统上会一直弹出“aapt2.exe has stopped working”,不知道有没有小伙伴了解,求解答为什么? 个机器上如下版本都是一样的: AndroidStudio:3.5.1 targetSDKVersion:28 SDK-tools:28.0.3 gradle:5.4.1 java:1.8 ![图片说明](https://img-ask.csdn.net/upload/201910/17/1571298398_971828.jpg) ![图片说明](https://img-ask.csdn.net/upload/201910/17/1571298550_325194.png)

Android studio debug的时候 C++调试器意外停止

调试安卓程序的时候报错, NativeClientCrashException: Android Studio's C++ debugger stopped unexpectedly

程序员的兼职技能课

程序员的兼职技能课

为linux系统设计一个简单的二级文件系统

实验目的: 通过一个简单多用户文件系统的设计,加深理解文件系统的内部功能及内部实现。 实验要求: 为linux系统设计一个简单的二级文件系统。要求做到以下几点: (1)可以实现下列几条命令(至少4条)

CCNA+HCNA+wireshark抓包综合网工技能提升套餐

本套餐包含思科路由交换CCNA,部分CCNP核心,华为HCNA以及wireshark抓包等类容,旨在培养具有综合能力的网络工程师。

董付国老师Python全栈学习优惠套餐

购买套餐的朋友可以关注微信公众号“Python小屋”,上传付款截图,然后领取董老师任意图书1本。

成年人用得到的6款资源网站!各个都是宝藏,绝对让你大饱眼福!

不管是学习还是工作,我们都需要一些资源帮助我们有效地解决实际问题。 很多人找资源只知道上百度,但是你们知道吗,有的资源是百度也搜索不出来的,那么今天小编就给大家介绍几款好用的资源网站,大家赶紧收入囊中吧! 1.网盘007 https://wangpan007.com/ 一款全能的资源搜索网站!只需要输入关键字,就能获得你想要的视频、音乐、压缩包等各种资源,网上...

矿车轴载荷计算方法的比较及选用

针对矿车轴的弯曲损坏,分析了固定式矿车车轴的受力,并对力叠加法以及当量负荷法2种计算方法进行了分析和比较,认为应采用当量负荷法进行车轴的设计计算。

Python数据清洗实战入门

Python数据清洗实战入门

C/C++跨平台研发从基础到高阶实战系列套餐

一 专题从基础的C语言核心到c++ 和stl完成基础强化; 二 再到数据结构,设计模式完成专业计算机技能强化; 三 通过跨平台网络编程,linux编程,qt界面编程,mfc编程,windows编程,c++与lua联合编程来完成应用强化 四 最后通过基于ffmpeg的音视频播放器,直播推流,屏幕录像,

Polar编码matlab程序

matlab实现的Polar codes源程序

2019全国大学生数学建模竞赛C题原版优秀论文

2019全国大学生数学建模竞赛C题原版优秀论文,PDF原版论文,不是图片合成的,是可编辑的文字版。共三篇。 C044.pdf C137.pdf C308.pdf

Linux常用命令大全(非常全!!!)

Linux常用命令大全(非常全!!!) 最近都在和Linux打交道,感觉还不错。我觉得Linux相比windows比较麻烦的就是很多东西都要用命令来控制,当然,这也是很多人喜欢linux的原因,比较短小但却功能强大。我将我了解到的命令列举一下,仅供大家参考: 系统信息 arch 显示机器的处理器架构 uname -m 显示机器的处理器架构 uname -r 显示正在使用的内核版本 d...

Linux下聊天室实现(基于C)

在linux下的基于TCP/IP,采用socket通信的聊天室,实现进入聊天室,进行多人群聊,指定人进行私聊,群主管理员功能,颗进行禁言,提出群聊等操作。个人账号可修改昵称或者修改密码,还可进行找回密

一个较完整的Qt用户登录界面设计

一个较完整的Qt用户登录界面,稍微移植可用,用sqlite数据库存储用户名和密码,具有增加和删除用户的功能,开发环境为ubuntu16.04+Qt5.6.1,win7下程序也编译可用。贡献出来,共同学

机器学习初学者必会的案例精讲

机器学习初学者必会的案例精讲

【C语言】贪吃蛇游戏代码(Visual C++6.0实现)

本游戏代码参考《C语言项目开发全程实录(第二版)》第六章。代码已在Visual C++6.0环境下编译测试通过,可在VC++6.0编译器中导入工程编译运行查看效果,或者也可以直接运行Release或D

Android小项目——新闻APP(源码)

Android小项目——新闻APP(源码),一个很简单的可以练手的Android Demo Ps:下载之前可以先看一下这篇文章——https://blog.csdn.net/qq_34149526/a

网络工程师小白入门--【思科CCNA、华为HCNA等网络工程师认证】

网络工程师小白入门--【思科CCNA、华为HCNA等网络工程师认证】

Android音视频开发全套

Android平台音视频开发全套,涉及:FFmpeg软解码解码、Mediacodec硬解码编码、Openssl音频播放、OpenGL ES视频渲染、RTMP推流等核心重要知识点。

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

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

2019 Python开发者日-培训

2019 Python开发者日-培训

2019 AI开发者大会

2019 AI开发者大会

Windows版YOLOv4目标检测实战:训练自己的数据集

Windows版YOLOv4目标检测实战:训练自己的数据集

4小时玩转微信小程序——基础入门与微信支付实战

4小时玩转微信小程序——基础入门与微信支付实战

因为看了这些书,我大二就拿了华为Offer

四年了,四年,你知道大学这四年我怎么过的么?

Python可以这样学(第四季:数据分析与科学计算可视化)

Python可以这样学(第四季:数据分析与科学计算可视化)

我说我不会算法,阿里把我挂了。

不说了,字节跳动也反手把我挂了。

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

YOLOv3目标检测实战系列课程

《YOLOv3目标检测实战系列课程》旨在帮助大家掌握YOLOv3目标检测的训练、原理、源码与网络模型改进方法。 本课程的YOLOv3使用原作darknet(c语言编写),在Ubuntu系统上做项目演示。 本系列课程包括三门课: (1)《YOLOv3目标检测实战:训练自己的数据集》 包括:安装darknet、给自己的数据集打标签、整理自己的数据集、修改配置文件、训练自己的数据集、测试训练出的网络模型、性能统计(mAP计算和画出PR曲线)和先验框聚类。 (2)《YOLOv3目标检测:原理与源码解析》讲解YOLOv1、YOLOv2、YOLOv3的原理、程序流程并解析各层的源码。 (3)《YOLOv3目标检测:网络模型改进方法》讲解YOLOv3的改进方法,包括改进1:不显示指定类别目标的方法 (增加功能) ;改进2:合并BN层到卷积层 (加快推理速度) ; 改进3:使用GIoU指标和损失函数 (提高检测精度) ;改进4:tiny YOLOv3 (简化网络模型)并介绍 AlexeyAB/darknet项目。

DirectX修复工具V4.0增强版

DirectX修复工具(DirectX Repair)是一款系统级工具软件,简便易用。本程序为绿色版,无需安装,可直接运行。 本程序的主要功能是检测当前系统的DirectX状态,如果发现异常则进行修复

C++语言基础视频教程

C++语言基础视频教程

相关热词 c# 局部 截图 页面 c#实现简单的文件管理器 c# where c# 取文件夹路径 c# 对比 当天 c# fir 滤波器 c# 和站 队列 c# txt 去空格 c#移除其他类事件 c# 自动截屏
立即提问