Tag Archives: Android

Failed to resolve: com.se renegiant:common 1.5.20

Then we found another more simple and effective way

1. From http://download.csdn.net/download/qq_ 38355313/12156696 download the common package you need

2. Directly put the required module into the LIBS folder

3. Add the original

implementation fileTree(include: ['*.jar'], dir: 'libs')

Change to

implementation fileTree(include: ['*.jar','*.aar'], dir: 'libs') 

This problem can be solved, and the pro test is effective.

Error in compiling Android AOSP by Ubantu [How to Solve]

Error:

You asked for an OpenJDK 7 build but your version is

java version “1.7.0_75” Java(TM) SE Runtime Environment (build 1.7.0_75-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode).

Reason:

AOSP (Android Open Source Project)
) Compilation requires openjdk, not oracle’s JDK version

This environment version.

Versions that can be compiled.

android Caused by: java.util.ConcurrentModificationException

First look at the logcat log:

2021-06-25 10:47:47.262 29869-29869/com.***.*** E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.***.***, PID: 29869
    java.lang.RuntimeException: Error receiving broadcast Intent { act=com.***.servicecallback.content flg=0x10 (has extras) } in com.***.***.MainActivity$SocketMessageReceiver@b855039
        at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$-android_app_LoadedApk$ReceiverDispatcher$Args_52497(LoadedApk.java:1323)
        at android.app.-$Lambda$aS31cHIhRx41653CMnd4gZqshIQ.$m$7(Unknown Source:4)
        at android.app.-$Lambda$aS31cHIhRx41653CMnd4gZqshIQ.run(Unknown Source:39)
        at android.os.Handler.handleCallback(Handler.java:790)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6494)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
     Caused by: java.util.ConcurrentModificationException
        at java.util.ArrayList$Itr.next(ArrayList.java:860)
        at com.***.***.MainActivity$SocketMessageReceiver.onReceive(MainActivity.java:733)
        at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$-android_app_LoadedApk$ReceiverDispatcher$Args_52497(LoadedApk.java:1313)
        at android.app.-$Lambda$aS31cHIhRx41653CMnd4gZqshIQ.$m$7(Unknown Source:4) 
        at android.app.-$Lambda$aS31cHIhRx41653CMnd4gZqshIQ.run(Unknown Source:39) 
        at android.os.Handler.handleCallback(Handler.java:790) 
        at android.os.Handler.dispatchMessage(Handler.java:99) 
        at android.os.Looper.loop(Looper.java:164) 
        at android.app.ActivityThread.main(ActivityThread.java:6494) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) 

At first, I thought it was the problem of broadcast onreceiver

java.lang.RuntimeException: Error receiving broadcast Intent { act=com.***.servicecallback.content flg=0x10 (has extras) } in com.***.***.MainActivity$SocketMessageReceiver@b855039

Later, I found out that it was caused by the following sentence:

 Caused by: java.util.ConcurrentModificationException

Look at the reason again: if you modify vector and ArrayList at the same time during iteration, you will throw a Java. Util. Concurrent modificationexception.

The reason is that I use the list when I process data in onreceiver. When I traverse and iterate the query, I insert the data, which leads to the collapse of the list.

How to Solve Cordova integrates Gaode Map key error

Plug in: com.kit.cordova.amaplocation

https://www.jianshu.com/p/85aceaee3b35

When referring to the above link articles or other articles, we still can’t solve the key error of Gaode
running the following two commands may solve the long-standing problem

cordova platform remove "platformName" // Remove the project platform
cordova platform add "platformName" // add device platform

Example:

cordova platform remove android // Remove Android project platform
cordova platform add android // add android device platform

not found libc++.so

Problem: the installation of install depends on the APK with so library, so it can’t load so normally. Error: not found libc + +. So
for example: system. Loadlibrary (“inittest”);

analysis:

    on Android/prebuilds/tools/GCC SDK, run the following command:
    readelf – DW libinittest. So
    to view the dynamic dependency Library of libinittest. So. Since relying on libc + +. So Android n, Google has contracted the dependent permissions of so library. Only the application under system/APP system/priv app can be relied on. Some so libraries cannot be loaded by the installation application under data/APP
    the following/system/etc/public.libraries.txt is the white list of dynamically dependent libraries. Libc + +. So is not among them

    libandroid.so
    libaaudio.so
    libamidi.so
    libbinder_ndk.so
    libc.so
    libcamera2ndk.so
    libdl.so
    libEGL.so
    libGLESv1_CM.so
    libGLESv2.so
    libGLESv3.so
    libicui18n.so
    libicuuc.so
    libjnigraphics.so
    liblog.so
    libmediandk.so
    libm.so
    libnativewindow.so
    libneuralnetworks.so
    libOpenMAXAL.so
    libOpenSLES.so
    libRS.so
    libstdc++.so
    libsync.so
    libvulkan.so
    libwebviewchromium_plat_support.so
    libz.so
    

    Scheme 1:
    add libc + +. So to the white list

    Scheme 2:
    add the following configuration in the source code android.mk of libinittest.so:

    LOCAL_NDK_STL_VARIANT := c++_static
    LOCAL_SDK_VERSION := 8
    

    Scheme 3:
    copy libc + +. So to the same level directory of libinittest.so in your app to generate APK.

Resolution AAPT: error: resource drawable/ (aka xxx) not found

When an error occurs, do not suspect that the as is wrong! It’s just that there is an error in the newly compiled XML, not necessarily the file with the error prompt.

1. Execute file – & gt; Invalid cache/restart, recompile.

2. Check the latest XML file in the drawable folder for errors. Common errors are as follows:

I repeat

<?xml version=”1.0″ encoding=”utf-8″?& gt;
<?xml version=”1.0″ encoding=”utf-8″?& gt;

Unhandled project rejection type error: webassembly instance

Today, I created a new small program project in wechat developer tool
but when I opened it, such a bug appeared
which made me feel very confused

Unhandled promise rejection TypeError: WebAssembly Instantiation: Argument 0 must be a buffer source or a WebAssembly.Module object

It was very uncomfortable
I went to the wechat developer community and asked
it turned out that the default version of the basic debugging library was too high, which led to an error

A simple solution

Click the details button in the upper right corner
and select local settings
to adjust the basic debugging library back to 2.14.4

Re installing Android studio always fails to install SDK when installing software (solution)

**

Android studio cannot install the SDK when the software is installed

**
I don’t know what’s going on. Android’s AVD can’t be started. It’s stuck in the loading place all the time, indicating that it can’t respond. No matter it’s forced to shut down AVD or recreate one, it can’t be solved, so I decided to reload Android studio. However, when I uninstall Android and delete all the files and then install Android studio again, it always shows that the SDK has been installed and the project cannot be started because there is no SDK. As shown in the figure

finally, with the help of the teacher, I can use the new Android studio again!! Tearful eyes
specific operation:

    uninstall the current Android studio and delete the SDK, gradle, AVD and other folders in the installation directory. Find the. Android studioxxxx and. Gradle folder in the computer user directory, and then delete them. Go to the hidden appdata folder, go to the roaming folder, and then go to the Google folder to delete Android studio XXX. Everyone’s catalog may be different. The last and most important step: restart the computer( I just didn’t restart, so every time I reload, I will display SDK installed Installing Android studio is the same as installing it for the first time. Ha ha

After Android studio creates a new bottomnavigationactivity, there is a blank solution in the upper area of fragment

Problem description

For example, the screenshot is as follows, which is often empty above and incomplete below (recyclerview list) (blocked by the navigation bar at the bottom)

Problem solving ideas

After switching to another fragment, it is found that it is also lower than the whole, so it should be the whole setting problem, so the problem is located to activity_ Main.xml or mobile_ In navigation. XML, which is used to specify the newly created fragment, it turns out to be an activity_ Main.xml specifies mobile_ There’s a problem with navigation’s fragment.

Problem solving

At activity_ In main.xml

    deleting the paddingtop attribute of the outermost constraintlayout will @ + ID/NAV_ host_ Layout of fragment_ Height is set to 0dp

    result