Unresolved inclusion/objects when building native-audio example? - audio

I just installed the latest android SDK and NDK. I want to get familiar with OpenSL so I started with the native-audio example project in ndk/samples and I'm having trouble with native-audio-jni.c file. Eclipse cannot resolve any of the include files and doesn't recognize any of the OpenSL definitions. Doesn't even know what NULL means. I can build the project but once I open the .c file (once the file runs through the parser) the project won't build any more.
Other people have had the same problems and many solutions exist but none of them works for the latest SDK.
How can I fix all these errors?

Related

Android Studio ArticFox compiling fine but showing red errors everywhere

I have a multi module Android Compose project. One module is an android app, others are android libraries or kotlin libraries. I'm running AS Artic Fox 2020.3.1 Beta 5 on MacOS 11.4 Big Sur.
After a library upgrade (probably AGP to use compose, I don't remember when exactly) Android Studio started to show syntax errors everywhere, both in .kts and .kt files.
Compilation and execution are working fine, only those weird JDK errors are displayed.
Here are some examples :
in a .kt file from a kotlin library module, in a .kts file from the buildSrc module
It seems that there is an error with the JDK somewhere, but I don't understand how to fix it.
I Googled/StackOverflowed before posting here and I already tried :
to check the JDK used Project Structure > SDK Location > Gradle. It is using the Embedded JDK 11.0.10
to reinstall AS using Jetbrains Toolbox
to invalidate cache and restart
to clone my project again
to delete ~/.gradle
But none of those actions helped...
Thanks in advance !
Update 22/07
I tried to create a new empty Compose project with .kts support, but no luck, everything is in red
Because of a bug preventing to update, I updated manually to RC_1. Here is my current setup.
I tried to change from Embedded JDK to a separately installed OpenJDK 11 and reimport but not luck (#alexey-belkov suggestion)
I checked the logs but found nothing obvious (#andy suggestion)
ℹ️ Finally I tried to create a new empty Android project with only .gradle support, and no errors ! Could it be a kotlin script plugin problem ?

Is it possible to port Flashdevelop project from Openfl to Android?

I made a neko project for Windows using FlashDevelop. I want to see if I can port it for android without remaking code or too much of it. In the past I was able to port to hmtl5 without having to remake code. Of course making an APK is different and requires getting some packages installed, I know that. The question is can I build android or I have to start a new project (like AS3) and go on in its own way?
I setup the
Path to Android SDK [C:\Programs\Android Development\platform-tools]: (contains adb, other files and the build-tools folder)
Path to Android NDK [C:\Programs\Android Development\android-ndk-r20]:
Path to Java JDK [C:\Programs\Android Development\jdk1.8.0_221]:
A simple project that displays an image. Errors I get when building 'android'
‘arm-linux-androideabi-g++’ is not recognized as an internal or external command,
operable program or batch file.
Error: Could not create PCH
Build halted with errors.
Or
in NativeCFFI.hx error: function body required
#:cffi private static function lime_jni_create_method(className:String, method:String, signature:String, isStatic:Bool, quiet:Bool):Dynamic;
‘arm-linux-androideabi-g++’ is not recognized as an internal or external command, operable program or batch file. Error: Could not create PCH Build halted with errors.
That error comes from an Android NDK that is too recent. Current HXCPP releases only support versions up to r15c, so I suggest you downgrade to that version.
Alternatively, you could try installing HXCPP from GitHub, as support for newer NDKs was recently merged.

Grabble project sync failed

I have installed Android Studio. When I launch the program, there is the following error.
"Failed to find: com.android.support:appcompat-v7:10.+"
I have checked the SDK manager, Android Support Library and Android are installed.
Maybe my question appears to be stupid but I didn't find any answer.
[EDIT] I changed the
com.android.support:appcompat-v7:10.+
to:
compile 'com.android.support:appcompat-v7:21.0.2'
Now I have more than 400 lines of not found files:
http://pastebin.com/Sa4scRH1
In you build.gradle you have in the dependency section a line containing this string:
compile 'com.android.support:appcompat-v7:10.+'
replace it with this one:
compile 'com.android.support:appcompat-v7:21.0.2'
You are using there a quite old version of the compat library just use the newest one v21.0.2. If this still fails install the support repository from the SDK Manager.

Android NDK UnsatisfiedLinkError: findLibrary returned null

Since two days, I get this error :
java.lang.UnsatisfiedLinkError: Couldn't load MyCPPProject from loader dalvik.system.PathClassLoader[dexPath=/system/framework/com.google.android.maps.jar:/data/app/com.mypackage.myApp-3.apk,libraryPath=/data/app-lib/com.mypackage.myApp-3]: findLibrary returned null
I'd like to compile a project c ++ natively in android application.
The project compiles fine on another PC but not on mine.
I tried to create a new workspace, install another eclipse and plenty others solutions but it still does not compile.
How can I fix it ?
The android project generate myApp.apk but not myApp-3.apk.
[dexPath=/system/framework/com.google.android.maps.jar:/data/app/com.mypackage.myApp-3.apk,libraryPath=/data/app-lib/com.mypackage.myApp-3]
Why compiler try to load myApp-3.apk ?
I fixed this issue by creating armeabi inside libs folder. And copied the .so files into armeabi folder.

Cocos2d-x MSVS template install script not found

I've downloaded the stable version of cocos2d-x 2.1.4 to use on Microsoft Visual Studio 2012 Professional.
However, as I run install-templates-msvc.bat, running the script causes the following errors:
Couldn't find script file "<cocos2d-x directory>\cocos2d-x-2.1.4\template\msvc\InstallWizardForVS2012.js"
Couldn't find script file "<cocos2d-x directory>\cocos2d-x-2.1.4\template\msvc\InstallWizardForVS2012Express.js"
Same errors for VS2010 and VS2010Express also appears.
As I search in the template folder in cocos2d-x directory, there is no folder named msvc.
So I have 2 questions:
I'm wondering why this is happening, because I did not modify a single file from the zipped version of the download (I've also tried downloading it again).
Building the solution cocos2d-win32.vc2012 terminates with 2 errors, one for Watermelon something and another for CocosdragonJS. My temporary attempt was to remove them from the solution, but I'm wondering if there are any fancier solution. Perhaps I missed something at installation?
Try Cocos2dx rc0 2.1.3 It worked for me or copy .txt file in .sln project then remove it. MSVS Ultimate edition automatically fixes the errors.
https://github.com/cocos2d/cocos2d-x/commit/0885d64a20d6862d4e99c381d97acf026654a8a3
[Win32] Deleting vs template, please use 'tools/project-creator' to create multi-platform project instead.

Resources