Installed Android on Mac, cannot find SDK - eclipse

Using Mac OS X 10.6.2, Eclipse SDK 3.5.2.
I installed the Android plugin, following the instructions at:
http://developer.android.com/sdk/eclipse-adt.html
In the next section (step #3) it says:
For the SDK Location in the main panel, click Browse... and locate your downloaded SDK directory.
I cannot find such a directory. When I try some other directory, it says the directory has no 'tools' folder, so I've searched for a 'tools' folder, but none of those found (of 15 or 20) appear to be Android.
Where is this directory?

You have to also down load the Android SDK, and you can put it anywhere you wish..
The android SDK can be found at the following link http://developer.android.com/sdk/index.html

I seem to have missed the line that says to first download the SDK separately!
Sorry for the "noise" on this list.

Usually you can find sdk like this : /users/user/Library/Android/sdk
If you can't find Library directory, then it might be in hidden state. To make it visible, use below command in terminal.
chflags nohidden ~/Library/

Usually you can find sdk like this : /users/<username>/Library/Android/sdk
/users/<username>/Library may be hidden.
Open view options by :
View -> Show View Options or command + J
Tick on Show Library Folder.

Related

Where does `pub get` download pubspec dependencies to?

In javascript, we have NPM and the node_modules folder in every project. I was not able to find a similar concept for Dart/ Flutter, except the build folder in my app, which contains a folder of a few dependencies I have in pubspec.yaml. It doesn't have any of the source code though, and I think it's actually built from something else. I've also looked in /usr/local/flutter/packages which is where my flutter is installed, but it only shows flutter_driver, flutter_goldens, and more seemingly unrelated folders.
I guess if wanted to read the source code, I really need to find the repo and read from that, or is there a location for dependencies I haven't looked?
I even found projectDir/.dart_tool/pub, which didn't have any of my packages.
From the documentation:
Dependencies downloaded over the internet, such as those from Git and
the pub.dev site, are stored in a system-wide cache. This means that
if multiple packages use the same version of the same dependency, it
only needs to be downloaded and stored locally once.
By default, the system package cache is located in the .pub-cache
subdirectory of your home directory (on Mac and Linux), or in
%APPDATA%\Pub\Cache (on Windows; the location might vary depending on
the Windows version). You can configure the location of the cache by
setting the PUB_CACHE environment variable before running pub.
So for Mac and Linux for example, this would be ~/.pub-cache/hosted/pub.dartlang.org by default.
In Android Studio
I could directly view the source code of the package under `
[External Libraries/Dart Packages/Your Packages]
`
You can get pubspec downloaded from your flutter sdk location .
/flutter/.pub-cache/hosted/pub.dartlang.org/
You can also clone package git .
If you are running Windows as your OS, you can find the packages under the folder that you installed your Flutter SDK to when setting up Android Studio.
In my case - using Windows 10 - the path is as follows, where C:\ is my primary harddrive and flutter\ the folder containing the Flutter SDK...
C:\flutter\.pub-cache\hosted\pub.dartlang.org\english_words-4.0.0
The above path for instance points to the "english words package", containing the most ~5000 used English words and some utility functions, which are mentioned and used in the Flutter tutorial on their official page for writing and running your first Flutter app.
https://pub.dev/packages/english_words
If you have installed flutter using snap then the location might be
/home/user/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org
I had forgotten that I've been command + clicking into these libraries all the time in VSCode.
However, it looks like packages are not stored in the app folder. Packages that we use in our projects are downloaded to $FLUTTER_PATH/.pub-cache, so if I'm looking for camera picker plugin, its in
/usr/local/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.5+2/lib/image_picker.dart
If you are using VScode you can find these dependencies under the dependencies window:

How to open flutter plugins at Xcode?

I want make some changes in plugin. For android part everything is clear. But how can I open iOs part of plugin? There are no Xcode project just several .h and .m files.
How to open iOs plugin at Xcode?
https://github.com/flutter/plugins/tree/master/packages/video_player/video_player/ios
First, be sure to run the example app at least once.
$ cd example
$ flutter run
Then open the project in Xcode. The Xcode project is in example/ios. The swift (or obj-c) code that implements the iOS end of the method channel is found in (replace the italic strings with the actual plugin name):
Pods/Development
Pods/plugin_name/../../example/ios/.symlinks/plugins/plugin_name/ios/Classes
which you can find by opening the tree in the left pane.
go to root of package then.
cd example
flutter build ios --no-codesign
Launch Xcode.
Select File > Open, and select the hello/example/ios/Runner.xcworkspace file.
The iOS platform code for your plugin is located in Pods/Development Pods/hello/../../example/ios/.symlinks/plugins/hello/ios/Classes in the Project Navigator.
The quickest way to open Xcode is xed ios when you are in the root project directory.
The plugins are put in $project_dir/ios/Pods
The plugins are actually installed by running pod install. flutter run will call pod install for you while also building the app. If you want to save time, just run cd ios; pod install and don't build your app.

Error on publishing Android project

It shows unable to open file for read: no such file or directory
(the directory shown in the error message should be linking to the Android SDK folder, the directory shown in the error message is wrong and i tried to rename the folders to make the directory correct but it doesn't work as the directory shown in error message change every time...)
Is there any way to fix it? i have reinstalled it but still doesn't work. Thanks guys
You shouldn't change the name of the SDK Folders.
I suggest you to install a fresh Android SDK from
http://services.smartface.io/File/Download/installer_r23.0.2-windows.exe
After that, set the path again from File -> Project Details -> Android SDK tab.

Framework not found GoogleMaps sdk in iOS

I want to use google map to existing(not a new one) iPhone project.Now i am using Google map ios sdk and i successfully added google map framework to my project.But i got error like this
ld: framework not found GoogleMaps
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How to solve this issue.I am using xcode4.5 and google map iOS sdk version is 1.5. When i am creating new project with google map iOS sdk then no error getting for me.Error only for existing iOS Project.Please help me.
I solved my issue
You need to do this
Click on your project (targets)
Click on Build Settings
Under Framework search paths (set your framework path)
Following information for getting framework search paths
Right click on your framework folder (for ex: GoogleMaps.framework)
select Get info
copy the path from General->where and paste this path in your framework search path (path should contain in single line)
Good luck
I encountered a scenario in which I had to import a project that was using Google Maps and noticed the same problem - module: "Google Maps" not found.
To solve this problem it was necessary to delete Podfile.lock and Podfile folder and re-install the pods again. Good luck !
You can also :
- remove GoogleMaps from Podfile
- pod install
- add GoogleMaps to your Podfile again
- pod install
This solution works for me, you can also check the search paths a well.
Clean your project. The shortcut is command + shift + k. This will clear information that xcode has stored that might imply that the sdk isn't included.
Also press the project icon at the top of the hierarchy of files, press the target that is your project, press build phases, open link with binary libraries, and make sure that the google maps sdk is in there. If it is not, press + and add it in.
Follow the steps :
Download GoogleMaps-iOS-1.1.0.zip from their site
Unzip the file. You now have a GoogleMaps-iOS-1.1.0 folder
In that folder you have a GoogleMaps.framework folder.
Copy or move the GoogleMaps.framework folder to inside your project folder (in Finder).
Drag the GoogleMaps.framework folder onto your Frameworks group in Xcode.
In the options sheet, uncheck "Copy items into destination group's folder". Make sure your target is checked in "Add to targets". Click OK.
(Note that you can also do this the other way, by not copying it into your project folder and checking "Copy items into destination group's folder". Xcode will copy the folder itself.)
Import using #import "GoogleMaps/GoogleMaps.h". The angle bracket usually work too, but in this case it should use quotes.
From : <GoogleMaps/GoogleMaps.h> file not found Google Maps SDK for iOS
my problem was fixed by adding in:
build settings
Framework Search Paths
clickable and add the following lines:
"${PODS_ROOT}/GoogleMaps/Base/Frameworks"
"${PODS_ROOT}/GoogleMaps/Maps/Frameworks"
If you use Pods
Left menu > Pods > Pods > choose Framework > right menu > copy path from "ios/....."
My: ios/Pods/GoogleMaps/Maps/Frameworks/GoogleMaps.framework
Then Project > Build Setting > Framework Search Path > Click on
$(PROJECT_DIR)/ios/Pods/GoogleMaps/Maps/Frameworks/GoogleMapsCore.framework
Sometimes it happens when you are migrating the code from one system to another so your Framework search paths look empty at this moment, so one simple solution I try is to reinstall the podfile and it works for me.
I've been struggling with this issue for hours; I'm using CocoaPods, Swift and Xcode 6.1.1. I followed all the steps for including GoogleMaps in my project carefully, tried many different things like removing symbolic links in the downloaded package or manually linking the binaries in build phases or trying #include "GoogleMaps.h", #include "GoogleMaps/GoogleMaps.h" and "#include <GoogleMaps/GoogleMaps.h> in my bridge file, none of that worked... Finally used CocoaPods instead of including the framework myself and it worked! Hope it helps someone out there:
In the Podfile:
pod 'Google-Maps-iOS-SDK', '~> 1.9.2'
And in your Bridge file:
#import "GoogleMaps.h"
Delete derived data and delete Podfile.lock file and then run pod install.
Maybe it'll be useful for anybody, next steps helped me:
1. Delete "Headers" and "GoogleMaps" folders manually (from the Finder).
2. Run 'pod install'
3. Re-build the project in Xcode.
In my case, I forgot that I need to open the workspace file with pods, not the project.

Facebook iOS SDK sample code doesn't compile

I downloaded the code from https://github.com/facebook/facebook-ios-sdk
But none of the sample projects compile in Xcode. I have read the readme.txt and it doesn't help.
The error is: 'FacebookSDK/FacebookSDK.h' file not found
There is no folder called FacebookSDK, it's actually called src. When I change the code to say src the new error is: ld: framework not found FacebookSDK
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Can anyone download the code and get the samples to work?
I wrestled with this same problem for a while before discovering that there is a not-so-obvious file that is supposed to be downloaded and installed (versus just getting the ZIP file and its contents). The file is called FacebookSDK-3.0.pkg and I found it at:
http://www.google.com/url?sa=t&rct=j&q=facebooksdk-3.0.pkg&source=web&cd=1&ved=0CEgQFjAA&url=https%3A%2F%2Fgithub.com%2Fdownloads%2Ffacebook%2Ffacebook-ios-sdk%2FFacebookSDK-3.0.pkg&ei=Mg8kULzOLofgiALg14DwDQ&usg=AFQjCNF0i0Vkq_cPsOvfrs5nb_IOUR6XhA&sig2=kERJcdvR7UgAB6mr-RUi6w
(first link provided when searching for the filename)
I installed it and the samples work fine now.
Facebook SDK 3.0 for iOS with samples
For more details https://developers.facebook.com/ios/
If you install the package to another location besides ~/Documents, you need to change the Framework Search Path for the sample projects.
When you open the project up in XCode, click the project info (e.g. blue "HelloFacebookSample" in the file browser.
Go to the Build Settings tab.
Under the "Search Paths" section, find "Framework Search Paths".
Doubleclick the value and you'll see an entry that is like:
$(SRCROOT/../../../../Documents/FacebookSDK
Double click that value and change it to point to the destination folder where you placed the SDK.
In my case, I installed the SDK to /Dropbox/SDKs/FacebookSDK so I changed the value to
$(SRCROOT/../../../../SDKs/FacebookSDK
(the 4 ../ are because it's relative to the HelloFacebookSample project)