I have an iOS Objective C code for iPhone that I am trying to convert into android using Apportable. The issue is that I am getting this error:
1 error generated.
scons: *** [Build/android-armeabi-debug/com.iapptechnologies.time/Users/Home/PhotoTastic/PhotoTastic/AppClasses/ViewController.m.o] Error 1
In file included from /Users/Home/PhotoTastic/PhotoTastic/OtherClasses/QBImagePickerController/QBAssetCollectionViewController.m:11:
/Users/Home/PhotoTastic/PhotoTastic/OtherClasses/QBImagePickerController/QBAssetCollectionViewController.h:12:9: fatal error:
'AssetsLibrary/AssetsLibrary.h' file not found
#import <AssetsLibrary/AssetsLibrary.h>
^
Any help would be much appreciated. Thanks!
It's strange that AssetsLibrary is not added automatically from parsing the xcode build.
A workaround is to add AssetsLibrary to the "deps" section of "add_params" in configuration.json
Note that AssetsLibrary is not available in the Starter version of the SDK. At least the Indie version is needed.
I think this will do,In xcode 5 it looks different but the path is the same
Related
I've built the iOS version of my app about a month or so ago. Then added a few extra messages to the UI, tested with the Android version and now when I rebuild the iOS version it seems to fail. The error log is at: https://s3.amazonaws.com/codenameone-build-response/621a8710-2900-45a3-afdb-e3a30bdb1265-1504680431641-error.txt
At the bottom of this, the only actual failure I see is:
** ARCHIVE FAILED **
The following build commands failed:
CompileC build/Build/Intermediates/ArchiveIntermediates/MyApplication/IntermediateBuildFilesPath/MyApplication.build/Release-iphoneos/MyApplication.build/Objects-normal/arm64/com_codename1_io_websocket_WebSocketNativeImplImpl.o MyApplication-src/com_codename1_io_websocket_WebSocketNativeImplImpl.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Failed xcodebuild step
I have updated the CN1Libs a few days ago. Not really sure what about this is actually failing to build.
Notice that the file com_codename1_io_websocket_WebSocketNativeImplImpl.m is mentioned in the final lines which means that's the file that failed. If you search the file for mentions of com_codename1_io_websocket_WebSocketNativeImplImpl.m you will find:
src/com_codename1_io_websocket_WebSocketNativeImplImpl.m -o /var/folders/zh/kb_4hqhn4kg1h0r5dp_6htcm0000gn/T/build7085253492970683151xxx/dist/build/Build/Intermediates/ArchiveIntermediates/MyApplication/IntermediateBuildFilesPath/MyApplication.build/Release-iphoneos/MyApplication.build/Objects-normal/arm64/com_codename1_io_websocket_WebSocketNativeImplImpl.o
/var/folders/zh/kb_4hqhn4kg1h0r5dp_6htcm0000gn/T/build7085253492970683151xxx/dist/MyApplication-src/com_codename1_io_websocket_WebSocketNativeImplImpl.m:23:9: fatal error: 'com_codename1_io_websocket_WebSocket.h' file not found
#import "com_codename1_io_websocket_WebSocket.h"
^
1 error generated.
This might be a bit confusing but it generally means you added the cn1lib for websockets and didn't use it. That's a problem as our VM strips out unused code but the websockets cn1lib needs to include the callback interface which is now stripped away.
I'm currently trying to run an application in my android device but i keep receiving this error :
C:\Users\Computer\Documents\android-ndk-r11c\sources\cxx-stl\gnu-libstdc++\4.9\include\bits\stl_relops.h:67: error: expected '{' before '_GLIBCXX_VISIBILITY'
namespace std _GLIBCXX_VISIBILITY(default)
C:\Users\Computer\Documents\android-ndk-r11c\sources\cxx-stl\gnu-libstdc++\4.9\include\bits\stl_relops.h:67: error: expected constructor, destructor, or type conversion before '(' token
namespace std _GLIBCXX_VISIBILITY(default)
^
I saw this post : Qt 5.2.1 for Android on Windows not building
But I dont understand this point and I think is the solution : "Did you compile Qt yourself? If not, you must ensure that you're using the same compiler for your application as was used to compile Qt."
Or maybe is due to another problem
Thank you for your help
I fixed it, the problem was due to the version of the Android NDK, it work with the Android NDK 12 Beta
i developed my application in QT, i am trying to port for android. my application working fine in android with few issues. the main issue is, i am not able to play the audio file when i am trying to put the audio file play Code i am getting error
QSound::play(FilePath);
Error: : -1: error: error: cannot find -lQtMultimediaKit
D:\Projects\test\demo.cpp:996: error: undefined reference to 'QSound::play(QString const&)'
my config: QT 4.8,QT Creator 2.5.83 and necessitas and windows XP
i am able to include the QSound Header file and using intellisense to type the QSound::Play no issue while typing when i am getting error on compilation. so i tried to look into the source folder and i found QSound.h header also.
How to play the Audio file in Android using QT?
in may case it works properly with no errors
my code:
player->setMedia(QUrl("qrc:/new/prefix1/1.mp3"));
// ok it works on windows
//also works on android
Stumblend in this one while searching info, this looks useful: http://qt-project.org/doc/qt-5/qml-qtmultimedia-mediaplayer.html
While the support of Audio for Android in QT is there, it's a journey through hell with the current release. If you want it stable in the end you'll end-up searching for external libraries anyway Take a look here
this works for me
file .pro
QTPLUGIN += qtaudio_coreaudio
QT += androidextras
QT += widgets
QT += quickcontrols2
file in Resources:
player2->setMedia(QUrl("qrc:/new/prefix1/folder_x/file.mp3"));
player2->play();
Description Resource Path Location Type
The declared package "org.cocos2dx.lib" does not match the expected package "src.org.cocos2dx.lib" Cocos2dxMusic.java /java/src/org/cocos2dx/lib line 24 Java Problem
Someone said that cocos2d-x 2.0.3 has a bug that will not create cocos2dx.lib.
Anybody know how to solve this?
Need your guidance, I am writing one app in android with the help of native code which will communicate with CAN (Controller Area Network) port ; for that in my C code i used linux/can.h header file. and i am following "http://mobilepearls.com/labs/ndk-builder-in-eclipse/" this link to build my app. but one i set all thing i got bellow msg in eclipse console box
Compile thumb : can_port <= cansend.c
jni/cansend.c:14:23: fatal error: linux/can.h: No such file or directory
compilation terminated.
make: *** [obj/local/armeabi/objs/can_port/cansend.o] Error 1
One more thing, i am working on windows environment. But i don't think this may be cause.
It is correct that it is not a Windows/Linux problem. The simple problem is that compiler is unable to find the file can.h. Now, for your info, when the compiler starts compiling, it searches for its header files in the folder
C:\(path to NDK folder)\platforms\(android-version)\(arch)\usr\include\linux
Now, if there isn't a can.h there, the compiler will flag an error. So the best way is
Either copy can.h to the above path (not tested)
Modify your Makefile to path to the correct directory where this header file is kept
Hope this helps!