Adding Native support to gstreamer tutorial won't finish - eclipse

I'm following this:
http://docs.gstreamer.com/display/GstSDK/Installing+for+Android+development
I'm using the Windows x86 ADT bundle, the Windows x86 r9d NDK, and the Gstreamer SDK linked to in the guide.
I was able to get the first tutorial to add native support, build, and run. Then I tried the 3rd tutorial, and Eclipse becomes unresponsive. Same thing happened with the 2nd tutorial. I left it to do it over the weekend in case it just took a long time. When I change anything for another attempt I delete the tutorial folder completely and use a fresh copy from the zip file. I have also remove the ADT bundle completely and started over from scratch.
If I cancel, I have the expected build errors of missing import com.gstreamer.GStreamer;
The GSTREAMER_SDK_ROOT_ANDROID value is set to C:/gstreamer
The NDK Location is C:\android-ndk-r8d
I switched to using r8d as recommended in: Adding Gstreamer support to an android NDK project
One comment also suggests adding to the gstreamer.mk file:
ifndef SYSROOT
SYSROOT := $(NDK_PLATFORMS_ROOT)/$(TARGET_PLATFORM)/arch-$(TARGET_ARCH)
endif
I attempted this but there is a gstreamer_prebuilt.mk file it may be using instead.
My only clue is that Tutorial 1 does not use gstreamer plugins and the tutorials that do not work use plugins.
Thank you for any help you can give.
Edit: I tried using android-ndk-r7c also.
Then I deleted the ADT bundle and tried going the "Use an existing IDE" route, same result.
I'm going to try a different machine, and also see if I can compile it without eclipse, but I would love to hear any guess on what's going on.
Edit2: I watched a youtube video of someone setting this up (as far as I can tell he adds the NDK manually adding a build program and pointing to the ndk-build.cmd file):
https://www.youtube.com/watch?v=nKfAELFdf9A
This seemed to work but I was still missing import com.gstreamer.GStreamer; so I closed the tutorial 2 project, built and ran tutorial 1, opened tutorial 2 again, cleaned, built, and it ran.
Problem solved.

I watched a youtube video of someone setting this up (as far as I can tell he adds the NDK manually adding a build program and pointing to the ndk-build.cmd file):
https://www.youtube.com/watch?v=nKfAELFdf9A
This seemed to work but I was still missing import com.gstreamer.GStreamer; so I closed the tutorial 2 project, built and ran tutorial 1, opened tutorial 2 again, cleaned, built, and it ran.
Problem solved.

Related

I'm struggling with eclipse, error in appcompat

I'm new to android, the last few days I've been struggling with eclipse, sdk. My friend sent me a code and I want to run it in my mac computer. Please can you tell me what software I have to use and how. I'm struggling with app compat error. Please can you tell me the step by step process to run the code in eclipse, like which versions I have to use. Please help me.
First of all go to the properties-android - and remove redcrossed appcompact library and just download appcompact library and import it in your worspace ;
then add it in your project. then refresh the project clean it and it will work

DllNotFoundException: libgfxunity3d

I'm new to unity and I am trying to use a plugin named Scaleform and I'm following the steps indicated in readme file, I've created a new project, imported the plugin, selected Main Camera object and attached the specified script to it, but when I want to play, I get this error:
DllNotFoundException: libgfxunity3d
SFCamera.OnDestroy () (at Assets/Plugins/SF/SFCamera.cs:163)
I googled and all I got was this: http://forums.autodesk.com/t5/Scaleform-Unity-Development/dll-not-found-exception/td-p/4242779
I've downloaded and installed DirectX too, but still no change! :(
Does anyone know what should I do?
Thanks!
We also ran into this problem on Windows. Ultimately, reinstalling the DirectX runtime did fix it for us (the person who had the problem was missing the d3dx9_43.dll that the Scaleform dll depends on).
You might also check and make sure you have put the right key into the appropriate location in your inherited camera script. (In the example, I believe it is called MyCamera.cs.)
Finally, you should check that your build target matches the version of the Scaleform trial you have installed. If your Unity build setting is Android, for example, you need to have the Android runtime for Windows, not the Windows runtime proper.
I downloaded the Depends application from http://www.dependencywalker.com/ and loaded libgfxunity3d.dll. I was missing msvcr100.dll, IEShims.dll and wer.dll. I threw those dlls into the System32 directory and my program ran great. Hope this helps!

Xcode upgrade: PBXContainerItemProxy missing containerPortal key

I just upgraded my Xcode, now when I try to open my project, I get this error:
Project /Users/xxx/xxxx/xxxxx/xxxxxx/xxxxxxxx.xcodeproj cannot be opened: PBXContainerItemProxy (xxxxxxxxxxxxxxxxx) is missing a containerPortal key
I have searched the web and stackoverflow, but cannot get anything relevent to come up at all regarding this.
I do have Three20 as part of my project, I don't know if that matters. I just upgraded to xcode 4.4.1
Thanks for any insight.
-D
the project icon which we see i.e projectname.xcodeproj, is actually a directory, you do this
1. in terminal do cd yourproject.xcodeproj
2.ls
3.vi project.pbxproj
4. scroll down till /* Begin PBXContainerItemProxy section */
5.there you will see all sections check for the section which is missing a portal key edit it and save it :wq it will work
in image if you see the first section is missing container portal key.just pic it from other section and replace it..
it will work :D see this link
Now I should start with that I do not know the actual error, never seen it before, but I did find a reference to a "PBXContainerProxy"-error in this post (As soon as I add a project to XCode 4.0.2 it crashes) and thought you might try the solutions from there?
"Apparently this is due to the new version of XCodeProjects. I found a
work around by pre-compiling the library that was causing the issue
and then using the linker to link to the .a file. I also had to copy
the .a library into the DerivedData path.
The real solution was to remove the project and replace it with an
updated project for the new version of XCode."
Hope that helps somewhat :)
Never saw that error either, but if you're upgrading directly from XCode 3.X I'd suggest you to go to https://developer.apple.com/downloads/index.action?name=Xcode
and download/install a previous version of Xcode somewhere else. (You can have several different copies installed on your machine, just google it if you don't know how but just remember to use xcode-select to pick the one you want to use). Repeat with all the versions back to 4.0.1 until (hopefully) it works. I know it's tedious but it might help.
If it does, validate the project settings and try to open it with 4.4.1. That should work.
Good luck

Reference errors building OpenCV Android CVCamera_MSER sample app

I'm relatively new to Android development, as well as OpenCV. I've tried out some OpenCV samples found with the sdk (using OpenCV2.4.2), as well as some here offered by Stanford University. The first two samples by Stanford worked fine (histogram equalization and color histogram). However I've spent almost a week now trying to get the remaining three to run.
I've already installed Android ndk and tried a hello world android app using ndk once and the three sample projects in question seem to all need native code (thus ndk).
On selecting the project in eclipse the console reads:
<terminated> Native Builder CVCamera_MSER [Program] C:\cygwin\bin\bash.exe
/usr/bin/bash: 1ine 0: cd: /home/Davidchen/opencv/android/apps/cvCamera_MSER: No such file or directory
I tried building the native project using the commands in the command line (as I understood from here):
cd {project path}
{ndk path}/ndk-build
However scores of errors appeared, all reference-related, since there are inumerable references to home/DavidChen. There is no folder on my computer named DavidChen. My guess is that there is a reference somewhere to the project path within the cygwin home folder of the project's author. I still cannot find where this faulty reference is specified however so that I could alter it to an existing one instead; I've looked into the paths and symbols under the C/C++ General Project Properties in eclipse as well as the source files, both native code and java code.
When I've tried it on cgywin's console, it still didn't work.
The errors are upon trying to run the project CVCamera_MSER, under the project video titled Local Feature Points found in the link provided above (also [here][14] for convenience). I've also tried running the projects Edges, Lines, and Circles and Feature Tracking with no success.
I'm using Eclipse Indigo Service Release 2 running on Windows7 x64bit.
Thank you for your time.

Upgrade to iPhone SDK 3.0 Causing UIKit Problems

I have an existing project that I was working on, and I recently decided to update my iPhone SDK and updated to the latest 3.0 SDK.
I update my SDK and go to open my existing project. Sure enough, there are some problems including some certificate problems and so on. Anyway, google and I were able to solve most of them, but I haven't had any luck on what I hope to be the last of my problems.
When running my program in the simulator, I now get
dyld: Library not loaded:
/System/Library/Frameworks/UIKit.framework/UIKit
Referenced from:
/Developer/iGameLib/iGameLib/build/Debug-iphonesimulator/iGameLib.app/iGameLib Reason: image not found
Now, I discovered the UIKit has moved to
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0sdk/
System/Library/FrameWorks/UIKit
and I have updated my target and project settings to point to that new framework location, but still when I build it, no luck.
I have also tried clearing out the simulator's applications and settings, still no luck.
The referencing .app is cleared when I run the "clean" menuitem, I have confirmed this, so clearly something in my project settings are still pointing to use the old UIKit location.
Where should I be looking?
I've gone as far as I can to help myself but I'm afraid I'm at a loss here. I don't see it under the target settings, or the project settings, or the plist, or any of the other files within my project.
I was getting the same error
dyld: Library not loaded: /System/Library/Frameworks/UIKit.framework/UIKit
The solution on my case was simply quit Xcode and try again.
OK, SO I HAVE THE ANSWER!!!
Quite simply, Xcode is not changing all of the variables correctly in the actual .xcodeproj file. So, here are the steps I took.
Get out of Xcode, you've got to do this job at the terminal. Bring up a terminal and go to where your project is. Find your .xcodeproj and go into it as if it were a directory. It looks like an actual file in finder, but it is one of those package directories.
Now, I couldn't get textedit to allow me to edit it, but you can go into nano, so like I did
sudo nano project.pbxproj which is under my .xcodeproj file/folder/package/whatever.
In this file, you need to find where the SDKROOT is set. Chances are there are a few places it is referenced, but you're looking for SDKROOT = iphoneos2.2.1 or something similar. Change ALL OF THESE (there are a few) to SDKROOT = iphoneos3.0
Now, you're half way there. do ctrl x and save the file. Next you're going to do ls and find out what the .pbxuser file is. Mine is myname.pbxuser. run the same command of
sudo nano myname.pbxuser
In this file, there are a HUGE number of references to the 2.1 iphone sdk directory. Do a search/replace of iPhoneSimulatorOLDVERSION.sdk, in my case it was iPhoneSimulator2.1.sdk
and change the 2.1 to 3.0. Be very careful with this though, I wouldn't want to know what happens when you mess this file up.
Save it and open xcode. CLEAN the project and build and run. Presto!
Check your target settings
Make sure you're actually linking to all of those frameworks in the Target (check under "link binary with libraries")
Make sure you've chosen the 3.0 sdk as your base SDK
Create a blank project and add your frameworks as before; if you still have issues, probably a borked SDK install
BTW, you shouldn't have to re-add sdk frameworks, as the paths are relative to the current SDK
Just trying to be helpful… not sure I can debug from here :)
I have had some similar problems with Xcode that seem to have no apparent cause. The fact of the matter is that Xcode does still have bugs here and there and sometimes you WILL run into a wall.
My Experience: Similar to your situation somewhat, on one particular occasion, an Xcode project I was working just stopped building for whatever mysterious reason, and no amount of cleaning, googling or SO-ing provided me any answers. So I simply created a FRESH, NEW project and filled the source-code from my corrupt project into that of the new project. The new project used the SAME source, libraries, resources, settings, mind you -- and yet it built with no problems. It took about 20-25 minutes to make the transfer but considering that I had spent several HOURS trying to address a bug that would not reveal itself in the corrupt project, the time was well worth it.
So, I'd suggest doing what I did: Maybe try creating a fresh project and transfer your old source and resources over.
Good Luck
I just deleted the UIKit.framework from the 'Frameworks' folder, right-clicked and added it back again.
Clean build, and no problem..
I had the same problem using Xcode 3.2.1 but it was solved in an easier manner. I realized I had recently disabled my target's environment variables, specifically ones to do with memory debugging (NSDebugEnabled, NSZombieEnabled, NSAutoreleaseFreedObjectCheckEnabled, MallocStackLogging, MallocStackLoggingNoCompact). The app ran once in the simulator after removing the environment variables but never again after that.
Quitting Xcode, the Simulator, restarting Xcode and doing a complete clean of the target (including it's dependencies off course) brought me back to a good state.
Same problem when launching my application without debugging.
In my experience the produced binary does not seem to be the culprit.
I created an app from the xcode wizard which does launch OK in the simulator (let's call it testApp, my application being called myApp), I tried to figure out where is the difference with my app.
otool -L myApp
gives correct (relative paths) to the frameworks, same as testApp
ps -E
DYLD_ROOT_PATH, DYLD_FALLBACK_FRAMEWORK_PATH, DYLD_FRAMEWORK_PATH, DYLD_LIBRARY_PATH environment variables needed by ld to locate the framework
are OK for myApp compared to the values of these variables when testApp is launched
I suspect that the problem lies somewhere in the communicartion between XCode and the simulator once the app is launched ... altough I can't find what's wrong ...
The solution that worked (at least for me) have certainly some big side effects but here it is :
quit xcode
browse the content of the package myApp.xcodeproj
unlock .model1v3 and .pbxuser for modification (the lock in the information panel (cmd-I on the file))
delete these two files
start xcode and retry to launch your application from there