I received a message about OpenSSL security. I did the following http://blog.cocos2d-x.org/2016/04/openssl-update/ and now there is an error i don't understand in my project.
15:56:54 **** Incremental Build of configuration Release for project app ****
python /Applications/cocos2d-x-3.10/projects/app/proj.android_v2/build_native.py -b release all
Android NDK: WARNING: APP_PLATFORM android-19 is larger than android:minSdkVersion 14 in ./AndroidManifest.xml
"mk start!!!!!!!!!"
LOCAL_C_INCLUDES is jni/../../Classes
CPP_FILES is jni/../../Classes/AppDelegate.cpp jni/../../Classes/BaseLayer.cpp jni/../../Classes/Character.cpp jni/../../Classes/DamageInfo.cpp jni/../../Classes/DotchiLayer.cpp jni/../../Classes/DotchiScrollView.cpp jni/../../Classes/DotchiSprite.cpp jni/../../Classes/DotchiStatus.cpp jni/../../Classes/Facility.cpp jni/../../Classes/FacilityLayer.cpp jni/../../Classes/GameLayer.cpp jni/../../Classes/GameStatus.cpp jni/../../Classes/HowToLayer.cpp jni/../../Classes/NumberSprite.cpp jni/../../Classes/OpeningLayer.cpp jni/../../Classes/SaveUtil.cpp jni/../../Classes/StatusLayer.cpp jni/../../Classes/TapInfo.cpp jni/../../Classes/TroubleLayer.cpp
Android NDK: jni/../../cocos2d/external/freetype2/prebuilt/android/Android.mk: Cannot find module with tag 'chipmunk' in import path
jni/../../cocos2d/cocos/./Android.mk:236: *** Android NDK: Aborting. . Stop.
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Traceback (most recent call last):
Android NDK: The following directories were searched:
Android NDK:
File "/Applications/cocos2d-x-3.10/projects/app/proj.android_v2/build_native.py", line 159, in
make: Entering directory /Applications/cocos2d-x-3.10/projects/app/proj.android_v2'
make: Leaving directory/Applications/cocos2d-x-3.10/projects/app/proj.android_v2'
The Selected NDK toolchain version was 4.8 !
build(opts.ndk_build_param,opts.android_platform,opts.build_mode)
File "/Applications/cocos2d-x-3.10/projects/app/proj.android_v2/build_native.py", line 146, in build
do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode)
File "/Applications/cocos2d-x-3.10/projects/app/proj.android_v2/build_native.py", line 82, in do_build
raise Exception("Build dynamic library for project [ " + app_android_root + " ] fails!")
Exception: Build dynamic library for project [ /Applications/cocos2d-x-3.10/projects/app/proj.android_v2 ] fails!
15:57:04 Build Finished (took 9s.912ms)
in the android.mk file in the ui folder.
LOCAL_ARM_MODE := arm
include $(BUILD_STATIC_LIBRARY)
$(call import-module,freetype2/prebuilt/android)
$(call import-module,chipmunk)
$(call import-module,platform/android)
I have cocos2dx 3.10 and ndk r9d when using r11c I get couldnt find gcc toolchain error
so the problem happens only when you use the NDK 11? I've had a similar problem, in which I couldn't build my project with the NDK 11 and I solved it by downgrading my NDK to the 10 version. I think Cocos2d-X may not be compatible with the NDK 11, since the RELEASE.txt file is missing from it.
Check this thread: Cocos2dx Android build error: "arm-linux-androideabi-g++: No such file or directory"
Add RELEASE.txt to your ndk path and add following
r11c (64 bit)
I have resolved this issue in Cocos2dxv3.0pre-alpha version.
Follow the below Link:-
http://www.bengigi.com/cocos2d-x-fix-for-openssl-problem/
You just need to download this curl library from here and replace the stuffs there in your existing cocos2dx folder.
For me it works with build the project option but it may create issue with clean build,may be works also for clean-build.Firstly suggest to build it only with updating curl lib.
Related
I've got an android project going on and it all goes smoothly until i try to implement ads. As soon as i turn on the unity ads and install the ads package, my game doesn't build anymore and gives me this Gradle build failed error. I've really tried anything so everything helps. Thank you.
Console errors:
Configure project :launcher warning: C:\Users\fili7\OneDrive\Desktop\Unity Proj\Lio\Library\Bee\Android\Prj\Mono2x\Gradle\unityLibrary\libs\classes.jar(com/samsung/android/gamesdk/GameSDKManager.class): major version 53 is newer than 52, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. CommandInvokationFailure: Gradle build failed. C:\Program Files\Unity\Hub\Editor\2021.3.11f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2021.3.11f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-6.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease" Build completed with a result of 'Failed' in 46 seconds (46351 ms) UnityEngine.GUIUtility: ProcessEvent (int,intptr,bool&) UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in :0 at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in :0 UnityEngine.GUIUtility: ProcessEvent (int,intptr,bool&)
Pretty much everything. Tried on multiple unity versions, even tried to use custom skd and ndk and gradles, nothing worked.
I need help in how to set the target and compile Sdk versions separately for bazel.
I want to run tensorflow on the phone following this tutorial. After editing WORKSPACE for bazel as follows:
android_sdk_repository(
name = "androidsdk",
api_level = 24,
build_tools_version = "24.0.1",
path = "/home/Android/Sdk",
)
android_ndk_repository(
name="androidndk",
path="/home/Android/Sdk/ndk-bundle",
api_level=21)
I get PARSE ERROR on the phone upon apk installing:
adb install -r bazel-bin/tensorflow/examples/android/tensorflow_demo.apk
I have usb debugging and 3rd party apk installation enabled. The phone uses Android 4.4.4 so I changed WORKSPACE configuration to match it (tools and API installed by SDK manager properly) as:
android_sdk_repository(
name = "androidsdk",
api_level = 19,
build_tools_version = "19.1.0",
path = "/home/Android/Sdk",
)
android_ndk_repository(
name="androidndk",
path="/home/Android/Sdk/ndk-bundle",
api_level=21)
Upon building as:
bazel build //tensorflow/examples/android:tensorflow_demo
I end up with few errors of that type:
Error at 5 : /tmp/android_resources_tmp7060220119759636814/merged_resources/values-v21/values.xml:5: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light'.
Following this answer, I should build for compile API version > 21 but at the same time target API version 19. It can be easily set for gradle. However I have not found any clue how to do that for bazel. Any suggestions are appreciated!
If you want to target a lower Android API level, the file you want to edit is actually tensorflow/examples/android/AndroidManifest.xml. Leave the WORKSPACE file settings at the highest API level you have installed via your sdk (APIs can be installed with $ANDROID_HOME/tools/android).
You can lower the min API level to 19 in AndroidManifest.xml, but be aware you will encounter runtime errors on your phone running the demo unless you replace the demo code that interfaces with the camera2 api (which was added with API level 21) with analogous android.hardware.camera code.
I'm building a Xamarin binding for a Java SDK. I managed to build it and deploy it on a device. However, I had to add more dependencies to the library and reached the max 64k methods authorized by the Dalvik Executable. I decided to enable Multi-Dex via the Android Options property of my application to bypass that limit.
I now get an error when building the app and I can't find any reference of it on the web.
Here is a sample of the Build Output:
3> C:\Program Files\Java\jdk1.8.0_181\bin\java.exe -Xmx1G -jar C:\Users\witol.nuget\packages\xamarin-android-d8-build\0.2.1\build\d8.jar --debug --multi-dex --main-dex-list=obj\Debug\MonoAndroid80\multidex.keep --output obj\Debug\MonoAndroid80\android\bin C:\Users\witol\source\repos\VoxeetBinding4\VoxeetBinding4Sample2\obj\Debug\MonoAndroid80\android\bin\classes.zip "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v8.0\mono.android.jar" "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\android-support-multidex.jar" obj\Debug\MonoAndroid80\lp\0\jl\eventbus-3.0.0.jar obj\Debug\MonoAndroid80\lp\10\jl\bin\classes.jar obj\Debug\MonoAndroid80\lp\11\jl\bin\classes.jar obj\Debug\MonoAndroid80\lp\12\jl\bin\classes.jar obj\Debug\MonoAndroid80\lp\13\jl\bin\classes.jar obj\Debug\MonoAndroid80\lp\14\jl\bin\classes.jar obj\Debug\MonoAndroid80\lp\15\jl\bin\classes.jar obj\Debug\MonoAndroid80\lp\16\jl\bin\classes.jar obj\Debug\MonoAndroid80\lp\17\jl\bin\classes.jar obj\Debug\MonoAndroid80\lp\18\jl\bin\classes.jar obj\Debug\MonoAndroid80\lp\19\jl\bin\classes.jar obj\Debug\MonoAndroid80\lp\20\jl\public-sdk-1.1.7.1.jar obj\Debug\MonoAndroid80\lp\20\jl__reference__adapter-rxjava-2.1.0.jar obj\Debug\MonoAndroid80\lp\20\jl__reference__guava-19.0.jar obj\Debug\MonoAndroid80\lp\20\jl__reference__jackson-annotations-2.7.0.jar obj\Debug\MonoAndroid80\lp\20\jl__reference__jackson-core-2.7.2.jar obj\Debug\MonoAndroid80\lp\20\jl__reference__jackson-databind-2.7.2.jar obj\Debug\MonoAndroid80\lp\20\jl__reference__logging-interceptor-3.4.0-RC1.jar obj\Debug\MonoAndroid80\lp\20\jl__reference__rxandroid-1.2.1.jar obj\Debug\MonoAndroid80\lp\20\jl\bin\classes.jar obj\Debug\MonoAndroid80\lp\21\jl\bin\classes.jar obj\Debug\MonoAndroid80\lp\22\jl\classes.jar obj\Debug\MonoAndroid80\lp\23\jl\classes.jar obj\Debug\MonoAndroid80\lp\24\jl\retrofit-2.1.0.jar obj\Debug\MonoAndroid80\lp\25\jl\okhttp3.jar obj\Debug\MonoAndroid80\lp\26\jl\rxjava-1.1.8.jar obj\Debug\MonoAndroid80\lp\27\jl\nv-websocket-client-2.3.jar obj\Debug\MonoAndroid80\lp\27\jl__reference__hamcrest-core-1.3.jar obj\Debug\MonoAndroid80\lp\27\jl__reference__junit-4.12.jar obj\Debug\MonoAndroid80\lp\28\jl\classes.jar obj\Debug\MonoAndroid80\lp\29\jl\classes.jar obj\Debug\MonoAndroid80\lp\3\jl\arch-core-common.jar obj\Debug\MonoAndroid80\lp\30\jl\okio.jar obj\Debug\MonoAndroid80\lp\31\jl\classes.jar obj\Debug\MonoAndroid80\lp\4\jl\arch-lifecycle-common.jar obj\Debug\MonoAndroid80\lp\5\jl\bin\classes.jar obj\Debug\MonoAndroid80\lp\6\jl\bin\classes.jar obj\Debug\MonoAndroid80\lp\8\jl\bin\classes.jar obj\Debug\MonoAndroid80\lp\9\jl\bin\classes.jar (TaskId:283)
3> Compilation failed: Unknown option: --multi-dex (TaskId:283)
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2521,3): error MSB6006: "java.exe" exited with code 1.
Apparently the java executable doesn't recognize the "--multid-dex" option.
What I've tried:
Update my Android BuildTools
Dowload the newest ProGuard version from SourceForge
Try different MinSdkVersion (19, 21)
Create a new Android App Project
Targeting API Level 26 - Android 8.0 (Oreo)
MinSDkVersion is now at Api Level 22 - Android 5.1 (Lolipop)
UPDATE:
If I create another blank Android App project and enable the Multi-Dex option it builds correctly.
For reference:
I installed a NuGet package "xamarin-android-d8-build" which adds d8 compiler support for Xamarin.Android. That's why it wasn't recognizing the "--multi-dex" option.
I'm trying to build CSipSimple
I get such error:
# External sources fetched out from external repos/zip
/Users/Nikita.Leshchev/Library/Android/sdk/ndk-bundle/build/core/build-local.mk:151: *** Android NDK: Aborting . Stop.
/Users/Nikita.Leshchev/Library/Android/sdk/ndk-bundle/build/core/build-local.mk:151: *** Android NDK: Aborting . Stop.
Isources/modules/audio_processing/aecm/include -Isources/modules/audio_processing/aecm/../utility -Isources/modules/audio_processing/aecm/../../.. -Isources/modules/audio_processing/aecm/../../../common_audio/signal_processing/include -Isources/modules/audio_processing/aecm/../../../system_wrappers/interface -mfpu=neon -mfloat-abi=softfp -flax-vector-conversions -S -o sources/modules/audio_processing/aecm/aecm_core_neon_offsets.S sources/modules/audio_processing/aecm/aecm_core_neon_offsets.c
make[1]: Isources/modules/audio_processing/aecm/include: No such file or directory
make[1]: [sources/modules/audio_processing/aecm/aecm_core_neon_offsets.S] Error 1 (ignored)
Traceback (most recent call last):
File "sources/build/generate_asm_header.py", line 46, in <module>
main(sys.argv[1:])
File "sources/build/generate_asm_header.py", line 30, in main
infile = open(argv[0])
IOError: [Errno 2] No such file or directory: 'sources/modules/audio_processing/aecm/aecm_core_neon_offsets.S'
make[1]: *** [sources/modules/audio_processing/aecm/aecm_core_neon_offsets.h] Error 1
make: *** [webrtc-preprocess] Error 2
Here suggests to check variables and installed soft. But my variables is ok
echo $PATH output:
/opt/local/bin:/opt/local/sbin:/usr/local/php5/bin:/Users/Nikita.Leshchev/Downloads/pcre-8.39/bin:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/Nikita.Leshchev/Library/Android/sdk/tools:/Users/Nikita.Leshchev/Library/Android/sdk/platform-tools:/Users/Nikita.Leshchev/Library/Android/sdk/ndk-bundle/
Variables ANDROID_NDK and ANDROID_SDK defined. All required soft installed
which ndk-build output:
/Users/Nikita.Leshchev/Library/Android/sdk/ndk-bundle//ndk-build
I did everything like in documentation, but i have this error. Can anybody help?
NDK Version 13.11.3345770
SDK Version 25.2.2
OSX 10.11.6
UPD I coudn't build it, but i found this repository I could download and build it without any problems
I solved my problem, not on 100% for a while, but this error i have resolved.
This and some other files i found in this repository
I successfully performed ./configure-android and make dep && make install commands using pjsip and I successfully install SWIG too.
But I am getting the following error while running the sample pjsua.
/Users/Downloads/swig-2.0.11 -c++ -o jni/pjsua_wrap.cpp -package org.pjsip.pjsua -outdir src/org/pjsip/pjsua -java jni/pjsua.i
make: execvp: /Users/Downloads/swig-2.0.11: Permission denied
make: *** [jni/pjsua_wrap.cpp] Error 127
Seems that MY_SWIG variable in pjsip-apps/src/pjsua/android/Android.mk is pointing to /Users/Downloads/swig-2.0.11 instead to swig binary file.
If you downloaded swig source to /Users/Downloads/swig-2.0.11 and you build it, binary file should be at: /Users/Downloads/swig-2.0.11/swig
Another problem you maybe find is that object files for project pjsua-app does not exists, this is because this is not done by default on the general build (more specifically, corresponding target is not included on all target at pjsip-apps/build/Makefile). To fix this just go to pjsip-apps/build and run:
make pjsua
This would create proper object files at: pjsip-apps/build/output/pjsua-arm-unknown-linux-androideabi/ (needed when building android sample)