Tag Archives: AndroidStudio

Android studio can’t find the emulator and can’t connect to the mobile phone. Prompt adb.exe start server ‘failed — run manually if necessary

Programmer algorithm practice must read, common Java API skills to share>>>

Sometimes when we connect our mobile phone to Android studio, the mobile phone cannot be recognized and nothing to show is displayed in the connection window. However, my mobile phone was connected well before. What’s the matter?Let’s take a look at the error message at the bottom, which is generally as follows:
‘c/users/zhxg/appdata/local/Android/SDK/platform tools/adb.exe start server ‘failed – run manually if necessary (moments ago), and restart can’t solve the problem. The reason for this situation is that the port of ADB 5037 is occupied. Just follow my operation as follows:
1 Find out which process is using port 5037

Then it is found that it is occupied by the 2080 process
2. Check what the 2080 process is

3. See what the ppadbserver.exe process is

Open the taskbar manager and end ppadbserver.exe in the process

=============Talk is cheap, show me the code===============

[Solved] Android Studio Warning: Failed to load AppCompat ActionBar with unknown error

Android Studio 3.1.4

Problem: when a new project is created, render problem – failed to load appcompat actionbar with unknown error appears in the XML project under layout

Solution:

1. Find the app/values/styles.xml file in the project directory and double-click to open it

2. Add the code segment under the file as follows:

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">

Change to:

<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">

3. Reopen the XML layout interface, and the problem has been solved

Problems encountered in integrating.so with Android Studio: about java.lang.unsatisfiedlinkerror: native method not found

Open source software supply chain lighting plan, waiting for you>>>

What I debug is a serial port program. I need to inherit the. So file in the program. The way to integrate the. So file in Android studio is to copy the folder where. So is stored (usually the folder name is: armeabi) to the LIBS folder of the app, and then add the following code to the build. Gradle folder under the app: (this code is included in the Android {})

 sourceSets {
        main {
            jniLibs.srcDirs = ['libs']
        }
    }

But in the process, I met the following problems., Screenshot:

My solution is to rename the armeabi in the LIBS folder to armeabi-v7a and rebuild the project

The differences between armeabi and armeabi-v7a are as follows: armeabi and armeabi-v7a represent the type of CPU. We know that most mobile phones or tablets use ARM CPU (MIPs is tragically ignored). The characteristics of different CPUs are different. Armeabi is for ordinary or old ARM CPU, and armeabi-v7a is for ARM CPU with floating-point operation or advanced extension function

I hope the memo can help you