Tag Archives: Game Engine

[Solved] Unity packaged and exported apk error: Failed to load libmain.so’

Today I packaged the APK on my mobile phone and found that I couldn’t enter the main page, and it kept prompting
As shown in the figure below, the part of the package name is lost

insert image description here

Failure to initialize! Your hardware does not support this
application. Failed to load libmain.so’ java.lang.
UnsatisfiedLinkError: dalvik.system.PathClassLoaderl DexPathList|(zip
file “/data/app/ package name-v9hxALnNbA
vIVbwOmlIHfw==/base.apk”I,nat iveLibraryDirectories=|/data/app/
package name-v9hxALnNb AvIVbwOmlIHfw==/lib/arm64,/data/
app/package name-v9hxALn NbAvIVbwOmlIHfw==/base.apk!/
lib/arm64 -v8a, /system/lib64, /system/product/lib64ll couldn’t find
“libmain.so” Press OK to quit.

I checked several methods but couldn’t use it. Finally, I changed the compilation settings to solve the problem.
Changed to ARMv7 as shown in the figure and it will be normal. If ARM64 is needed, it can be solved elsewhere.
Now this is the case. The package is delivered normally, record it
insert picture description here

[Solved] Unity Error: Assertion failed on expression: ‘m_ErrorCode == MDB_MAP_RESIZED

Unity报错Assertion failed on expression: ‘m_ErrorCode == MDB_MAP_RESIZED

Assertion failed on expression: ‘m_ ErrorCode == MDB_ MAP_ RESIZED || ! HasAbortingErrors()’

Asset database transaction committed twice!

Assertion failed on expression: ‘errors == MDB_ SUCCESS || errors == MDB_ NOTFOUND’

The three errors are reported all the time without code prompt; The reason is that the Unity license has expired;

Solution: Restart Unity, open Unity Hub and reactivate the license; Re-open the project

[Solved] unity EditorGUILayer dynamic drawing scrolling list error

The specific error message: ArgumentException: Getting control 0’s position in a group with only 0 controls when doing Repaint A

OnGUI will be called two times each time it draws, the first time to calculate the position of all controls, all EdtorGUILayout control method returns the Rect is 0; the second time to draw all the content based on the position, the control method returns the Rect is the actual coordinates.

BeginScrollView to generate a scrolling list, because I need to display a lot of content, so I made an optimization: pre-calculate the position of each line, when the line is in viewport display content, otherwise display blank.

Generic logging found that the height of each row generated by the system is not the same, generally floating randomly between 19-21, so it is impossible to calculate the position of each row, so instead, when the second call to OnGUI, use the Rect returned by the control method to calculate in real time.

 

[Solved] Unity Error: Deterministic compilation failed. You can disable Deterministic builds in Player Settings

preface

 

Unity error: deterministic compilation failed You can disable deterministic builds in player settings
this error was encountered when opening the old version of the project with the new version of unity

 

Solution:

1. Click Edit –> Project Settings

2. Click play –> Pull down to find Use Deterministic Compilation, then uncheck and restart unity

3. Done!

[Solved] New MAC Unity Develop Error: error installing cocoapods

The new MAC system is 11.4, and the installed Xcode version is 13.2.1
after opening a unity project and switching to IOS platform, cocoapods is installed in the background, but an error is reported indicating that the installation fails:

ERROR: Error installing cocoapods:
       ERROR: Failed to build gem native extension.
   current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/ext/ffi_c/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Framewoks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20220311-4106-wxounc.rb extconf.rb
   mkmf.rb can't find header files for ruby at /System/Library/Framewoks/Ruby.framework/Versions/2.6/usr/lib/ruby/include/ruby.h

You might have to install separate package for the ruby development environment,ruby-dev or ruby-devel for example.

According to the error prompt and query from the network, it should be that a new Ruby Version needs to be installed, and the ruby provided by the system cannot be used
installing Ruby requires RVM, and installing RVM requires homebrew

Install homebrew

Use the command /usr/bin/Ruby - e" $(curl - fssl) is not used here https://raw.githubusercontent.com/Homebrew/install/master/install )"

After installation, execute brew update update.

Then execute brew -vto see the installed version

Install RVM

Install RVM curl -L https://get.rvm.io | bash -s stable

reload RVM environment source ~/.rvm/scripts/rvm

View RVM version RVM -v

Install Ruby

Check the known version of ruby RVM list known

check the installed version of ruby RVM list

Install a ruby version. I chose 2.6.5 RVM install 2.6.5

After installation, check the Ruby Version Ruby -v. If it is not the version just downloaded, I need to use the command to cut the version

Install cocoapods

After the above installation, execute sudo gem install cocoapods -n/usr/local/bin to install cocoapods
after the installation, execute pod --version to view the version of cocoapods

Here, for unit packaging, cocoapods are not completely installed. You need to continue to follow the following steps.

Command + Shift + G, open to the folderpop-up window, and enter ~/.cocoapods, after opening the cocoapods folder, delete all the contents under it, create a new repos folder, open the command line tool, and execute the following three commands in turn

1) cd ~/.cocoapods/repos
2) git clone --depth 1 https://github.com/CocoaPods/Specs.git master
3) pod repo update

In this way, the Xcode project exported by unity will have Xcworkspace file (in case of problems in cocoapods environment, the exported Xcode project only has .xcodeproj file, and there are many exceptions when using this file for packaging press conference), and then open the file with Xcode for subsequent publishing

Unity Error:InvalidCastException: Cannot cast from source type to destination type.

Error:
when I use system.data.dll to parse excel table; Encountered this error:

wrong positioning:
this is an excel problem; The error is reported in: excel reader. Asdataset() is due to the problem of Excel format;

Solution:
you can solve this problem by setting the cell format as text in Excel table;

Reference website:
Yusong Momo cross platform analysis Excel

error CS0234: The type or namespace name ‘UI‘ does not exist in the namespace ‘UnityEngine‘

1. After opening the project, an error is reported: error cs0234: the type or namespace name ‘UI’ doors not exist in the namespace ‘unityengine’

2. Solution: close untiy, delete the Library folder, and then reopen the project

[1] Close the project and delete the folder library. The location is as follows:

[2] . reopen the project and unity will automatically rebuild the relevant DLL

How to Solve cocos2dx msb3073 Error

Solve cocos2dx 3.17 error msb3073:: vcend “has exited, the code is 9009 and an error is reported

For example, if the dill function appears, and the msb3073 code is 9009 or 4, the error
and the libcurl file cannot be connected appear at the same time, or the error
msb3073 code is 9009, the command xcopy/Y/Q and if not exist will be prompted (your project path)
the solution is as follows (try one by one) :
1. Change the Cocos environment path from Chinese to English or the project path from Chinese to all citations
2. Confirm that your environment variables are set correctly and that pyhton and cocos environment variables are
3. If none of the above methods can be solved, your problem should be the same as me. If you reinstall the system or newly install the system, in the path of the environment variable Adding C:\windows\system32 should be able to solve the problem, because you may have deleted the environment variable path by mistake, resulting in file replication failure. Add the following files in sequence:% systemroot%\system32;% systemroot%;% systemroot%\system32\WBEM;% systemroot%\system32\windowspowershell\v1.0;
as shown in the figure

Unity reports an error cs0619: ‘guitexture’ is obsolete

Unit reports an error when loading an old version of the project: unit reports an error assets \ standard assets \ utility \ forcedreset. CS (6,27): error cs0619: ‘guitexture’ is obsolete:

The solution is as follows:

1、 Forcedreset.cs

1. Add the namespace
using unityengine.ui;

2. The guitexture in [requirecomponent (typeof (guitexture))] is changed to image, and the result is: [requirecomponent (typeof (image))]

2、 Simpleactivatormenu.cs

1. Add the namespace
using unityengine.ui;

2. Change guitext in public guitext camswitchbutton to text, and the result is:
public text camswitchbutton;

Unreal4 C++ error guidelines

 

I believe that students are now starting to use C++ development method to complete some functions or try to understand the internal application process of UnrealEngine4, the process is naturally indispensable
Epic
Self packaged C++ dealing.

The
Of course, C++ with UnrealEngine4 must be complied with
UE4 engineering
Rules such as the entire project configuration are basically done using the [NMaker] configuration. You need to compile the [UnrealHeaderTool] tool before compiling the code
UnrealHeaderTool to compile our own projects. Of course, the entire build process was compiled as for UnrealEngine3 using the command line (to address both platform expansion and IDE decoupling). The various \UnrealEngine\Engine\Build\ files \ folders under the BatchFiles start calling each other during the entire compilation of Windows… (Well, usually we don’t care.)

since the UnrealEngine4 has its own rules, the more problems we run into in the process of updating the UnrealEngine4. The following is a collection of problems I encountered to share with you, I hope you can quickly solve the problem, less detours.

1. compile when the following 2 errors occur, please do not question whether the UnrealEngine4 engine compilation tool has a problem or the automatically generated project configuration has a problem, there is only one problem is their own code has a problem. As follows:

 
The
EXEC: error: Failed to generate code for XXXX (XXXX is the name of our project)
The
The and

 
The
EXEC: error: UnrealHeaderTool failed for target ‘PandaEditor’ (platform: Win64, module info: C: \ Users \ User \ Documents \ UnrealProjects/Panda/Intermediate/Build \ Win64 \ PandaEditor \ Development
\UnrealHeaderTool.manifest).

 
The
this error resolution: check the.h file for cross-references to header files. If you do need to refer to each other, try [+class] before your class name and then refer to header files in.cpP.

 
The
The

 
The
of course this error is
[UnrealHeaderTool],
[UnrealHeaderTool] error detection is not strong enough to accurately prompt for compilation errors, and many problems can cause this. If you find [EXEC: error: Failed to generate code for XX], please check the code carefully