Is there any simple tutorial on linking gtk+3 libraries with eclipse indigo cdt on ubuntu platform? As I googled, I have been trying to use the pkg-config commands but still getting same result; the SDK cannot resolve gtk methods.
I downloaded libgtk3-dev and gtk3 from synaptic properly.
I included all the headers properly from C++ settings - gcc compiler - includes. But what to do about gcc linker - libraries? Any tutorial on this will be appreciated. Thanks...
As I had this problem recently, I'll post here all needed to get a working gtk+ v3 project on Debian 8 with Gnome 3 and Eclipse Indigo.
First of all, ensure you have downloaded all needed packages:
root# apt-get install libgtk-3-dev gdb eclipse-cdt build-essential cmake git pkg-config
As all this software is installed, open Eclipse. We will install the Marketplace, a new eclipse feature not present in Eclipse Indigo.
Open the Help menu (in the upper File bar) and select "Install new Software". A window like this will be opened:
Click on Add... button and enter this repository: Name="Marketplace" and Location="http://download.eclipse.org/mpc/indigo/".
Once you have added the repository, you'll be able to select the Marketplace client, as shown in this image:
Select the "Marketplace client" and install it. Restart the eclipse IDE when needed.
Now you have Marketplace available, so lets use it. We need a tool called Pkg-config to configure all the GTK+ v3 libraries in our project.
Open again the Help menu and select the new "Eclipse Marketplace..." option. In the search bar, type the text "pkg-config" and you should get a screen like this:
This is the pkg-config tool for Eclipse. Press the button "Install" and restart the IDE when needed.
Now proceed creating a simple C++ project in eclipse. Once you have created it, select its main folder and go to Project > Preferences (or just right click on it and select the preferences option). You will get a preferences window, so go to C/C++ Build > Settings and select the Pkg-config tab. Now select the gtk+ 3 option from the list like this:
And all the needed configuration is ended. Close that window and build your beautiful GTK+ v3 application ;)
Related
I want to install android studio preview alongside the stable version.
Download the .zip into ~/Download
/home/zelongg/Downloads/android-studio-ide-171.4444016-linux-3.1-canary-4.zip
sudo unzip android-studio-ide-171.4444016-linux-3.1-canary-4.zip -d
/usr/local/lib/android-studio-preview
sudo mv -v /usr/local/lib/android-studio-preview/android-studio/*
/usr/local/lib/android-studio-preview/
sudo rm -rf /usr/local/lib/android-studio-preview/android-studio/
zelongg#zelongg:/usr/local/lib/android-studio-preview/bin$ ./studio.sh
create a new folder in ~/Android/sdk in case that the newly downloaded
sdk will affect the sdk in mini project.
we can successfully run android studio preview 3.1 canary 4
But we cannot create the second desktop entry somehow.
https://developer.android.com/studio/preview/install-preview.html
The 2 desktop entry means:
What I want is that it should show 2 icons for both Android Studio and Android Studio Preview seperately. But now they share one icon in the left bar.
I followed the instructions below, but it doesn't work.
To make the preview version available in your list of applications, select Tools
Create Desktop Entry from the Android Studio menu bar.
I used Create Desktop Entry from Android Studio Preview, which replaced the ~/.local/share/applications/jetbrains-studio.desktop of my stable version.
Then I copied that file to ~/.local/share/applications/jetbrains-studio-preview.desktop.
The icon was still green, so I downloaded a yellow one and used it in the .desktop file:
I also edited the .desktop file to suffix the name property with Preview
Then I ran the stable version to Create Desktop Entry to restore it.
Unity launcher didn't refresh the preview version icon and name straight away (it's ok after a reboot) and I couldn't figure out which one was which after typing Android Studio in the launcher. So I ran the jetbrains-studio-preview.desktop from its directory (first setting it to be executable), and then I locked it to the launcher. The result:
I tried the accepted answer but had little difficulty since I am not so good with the terminal. so I installed *nautilus Admin. using the command sudo apt-get install nautilus-admin
open Computer-> usr -> share right click applications select Open as Administrator. (for this option u need to install nautilus admin as stated above). right click existing android studio desktop entry select edit as Administrator.
In that file change the StartupWMClass property to jetbrains-studio-preview. that is done. now open your newly installed android studio and create desktop entry. and .... that's it.
just install stable and canary versions from ubuntu software store and their shortcuts are separate by default
From the post "Add C and C++ Code to Your Project",
You can install these components using the SDK Manager:
From an open project, select Tools > Android > SDK Manager
from the menu bar. Click the SDK Tools tab. Check the boxes next to LLDB,
CMake, and NDK, as shown in figure 1.
there is a image shows
But my Android Studio is not like that.
I upload a image to show my Android Studio sdk manager settings:
I googled for a while, but I didn't find anything useful. My PC is win10 64bit, I run Android Stdio 64bit, version is 2.2, I use the Android Studio bunndle version(I assume the AS and the sdk are one thing).
I also run Android Studio 2.3 on another PC, I check the sdk manager on version 2.3, it looks like behaving the same. I also try to run AS in the administrator role. it looks like behaving the same too.
The different on the AS2.2 and AS2.3 is that I can run the sdkmanager command in a win shell to install the CMake/LLDB on the PC that has AS 2.3, but I can't find the sdkmanager command in the SDK folder which is associated with the AS 2.2, so I go to download a standlone command line tools from the developer.android.com, I unzip the downloaded file and get a fold named "tool", what should I do? shold I merge the downloaded tool folder into the android_sdk/tools?
The below image is the sdk settings on another PC that has installed the AS 2.3. I installed the CMake the LLDB from the command line: "sdkmanager.bat cmake;3.6.4111459"
Why my Android Studio doesn't show the candidate not
installed packages?
Shold I merge the downloaded command line tool folder into the android_sdk/tools?
I tried to update my Android Studio and got this error. How can I fix this?
I don't have much experience with Android studio and Android app development.
I am using Android Studio 2.3 and Linux.
This worked for me as this post try: Update 2
https://stackoverflow.com/a/42735118/5133603
Update 2:
Solution to emulator package issue!
After digging in the repo's XML for a while I've spotted the issue.
It turns out that the "emulator" package is only in channel 3 (canary) while the "tools" package is in channel 0 (stable) but depends on "emulator". The solution is to force the manager to download the "emulator" package from channel 3:
./sdkmanager --channel=3 emulator
Problem solved!
This is what worked for me:
Download the command line tools, place them in the SDK folder (e.g., on mac: /Users/user/Library/Android/sdk), and then add the bin folder to the PATH.
Install the latest platform: in a terminal, execute sdkmanager "platforms;android-25"
Open Android Studio, and go to the SDK Manager (Appearance and Behavior > System Settings > Android SDK)
Click on "Edit", and then select the sdk folder. Then "Next" > "Next" > "Finish".
I hope this works for you too.
Temporarily change update channel to Canary Channel (Settings > Appearance & Behavior > System Settings > Updates). It works for me (Windows, Android Studio 2.3) I hope, this bug will be fixed in the next version of Android Studio.
My solution using Void Linux (it should fix for other distributions too):
Create a new folder named Sdk in this exact path. Bash example: $ mkdir $HOME/Android/Sdk
cd to this folder, and download the latest SDK command line version. Bash example: $ curl https://dl.google.com/dl/android/studio/ide-zips/2.3.0.8/android-studio-ide-162.3764568-linux.zip
Extract the android-studio-ide-162.3764568-linux.zip. It must be this way: $HOME/Android/Sdk/tools
Launch Android Studio, and then proceed with normal installation.
PS: If you don't have a Android folder on your $HOME, you should create it, and then make the steps 1, 2, and 3, select the $HOME/Android/Sdk Folder in Android Studio → Configure → *SDK Manager → Edit, and proceed to step 4.
Start "Android SDK Manager" from this path:
%Android_home%\SDK Manager.exe
Install all updates from this manager.
P.S. This worked for me.
This is what worked:
Download the command line tools and place them in the SDK folder (on mac:~/Library/Android/sdk).
Install Android studio 2.3 (on mac: /Application/Android Studio.app)
Add path to java in Android Studio (export PATH=/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin:$PATH)
Set JAVA_HOME (export JAVA_HOME=/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home)
cd to ~/Library/Android/sdk/tools/bin and execute ./sdkmanager "platforms;android-25"
Accept the license - this will install the android-25 platform
Launch Android Studio, and goto the SDK Manager. The SDK Manager will now recognize the SDK path (~/Library/Android/sdk).
Now install the rest of the tools.
This fixed it for me (on a fully-patched Ubuntu 16.04 (Xenial Xerus)).
Disclaimer: I cleaned up everything beforehand:
rm -Rf ~/android-studio/ ~/.AndroidStudio2.2/ ~/.android/ ~/Android/
Then:
wget https://dl.google.com/dl/android/studio/ide-zips/2.3.0.8/android-studio-ide-162.3764568-linux.zip
wget https://dl.google.com/android/repository/tools_r25.2.3-linux.zip
unzip android-studio-ide-162.3764568-linux.zip -d ~/
mkdir -p ~/Android/sdk
unzip tools_r25.2.3-linux.zip -d ~/Android/sdk
~/Android/sdk/tools/bin/sdkmanager "platforms;android-25"
~/Android/sdk/tools/bin/sdkmanager --channel=3 emulator
~/android-studio/bin/studio.sh
Click "Configure" in the launch window
Select "SDK Manager" in the menu
The list on the right shows "partially installed" for API level 25
Click "Edit" on the right of "Android SDK Location"
You get the warning "an existing Android SDK was detected wizard will only download missing or outdated SDK components"
Click "Next"
Click "Next"
[wait while it installs]
Click "Finish"
I got this problem since hours on my Apple M1 processor.
After a clean delete of Android SDK, this workaround worked for me: https://stackoverflow.com/a/69868954/6809733
Just download the IDE - Intellij IDEA and create a new project, select
Android Project and there download Android SDK, now you can install
android studio again and the sdk is installed. Worked for me!
Just delete the directory C:/Users/%user%/AppData/Local/Android/sdk and rename the other directory in that location from sdk1 to sdk.
Restart Android Studio (close projects) and an assistant will pop-up asking you to update the sdk which will be detected during that process, so a re-download won't be necessary.
Today I'm trying to update the SDK in Android Studio on my Ubuntu, and looking for the menu that make the download process running in the background. So I want to download the SDK and continue to work in Android Studio.
As far as I can remember Eclipse has menu that can download in the background task so I can continue work while downloading.
I've tried to find the option in settings but I could not find it, and on the downloading GUI has no option to download it in the background, here is my screenshot:
Is anyone having the same issue here? How can I resolve this?
You can go to tools -> android -> sdk manager and click on Launch stand alone sdk manager hyperlink. This will open sdk manager outside android studio, select the packages and download. You can continue to work on android studio this way.
The "Launch standalone SDK Manager" option seems to be gone in Android Studio 2.3.3 for Windows. However, there is sdkmanager.bat in \tools\bin
It is possible to do it all by code using the sdkmanager tool.
The sdkmanager is a command line tool that allows you to view,
install, update, and uninstall packages for the Android SDK.
This is an example using the sdkmanager with the command line:
First at all, the sdkmanager is located in android_sdk/tools/bin/.
Go where the sdkmanager is located
List installed and available packages using this command:
sdkmanager --list
The result willl be something similar to this
In my case I want to Download a System Image with Release Name "P" with ABI x86 ( I saw this information from Android Studio)
The next step is to search that system image in your list
Finally install this package in this way:
./sdkmanager "system-images;android-P;google_apis;x86"
This will begin the process of downloading the package
After finish you can check that the image is available to use
For more info: https://developer.android.com/studio/command-line/sdkmanager.html#usage
Upgrade to latest version of Android Studio (Currently in 2.3.1).
It now support download (both SDK and plugins) in background.
My setup is:
Visual Studio 2012
Qt 5.2.0 from
http://download.qt-project.org/official_releases/qt/5.2/5.2.0/qt-windows-opensource-5.2.0-msvc2012-x86_64-offline.exe
Unzip Qwt from http://sourceforge.net/projects/qwt/files/qwt/6.1.0/qwt-6.1.0.zip/download to C:\qwt-6.1.0
Opened Qt 5.2.0 64-bit for Desktop (MSVC 2012) and ran "qmake qwt.pro"
Opened VS2012 x64 Native Tools Command Prompt and ran "nmake" and "nmake install"
Set QWT_ROOT = C:\qwt-6.1.0
Added C:\qwt-6.1.0\lib to PATH
Copied C:\qwt-6.1.0\plugins\designer\qwt_designer_plugin.dll to C:\Qt\Qt5.2.0\Tools\QtCreator\bin\plugins\designer
When I open Qt Creator and edit the UI then go to Tools->Form Editor->About Qt Designer Plugins I see "Cannot load library qwt_designer_plugin.dll:" but no error or reason.
I used Dependency Walker to check the Dll, and QtCreator.exe and all its dependencies are 32-bit whereas my build of qwt_designer_plugin.dll is 64-bit. I wondered if this was causing the problem so I:
Downloaded Qt5.2.0 from http://download.qt-project.org/official_releases/qt/5.2/5.2.0/qt-windows-opensource-5.2.0-msvc2012-x86-offline.exe and install into C:\Qt\Qt5.2.0-32
Unzipped Qwt into C:\qwt-6.1.0-32bit to create a fresh copy.
Opened Qt 5.2.0 32-bit for Desktop (MSVC 2012), cd into C:\qwt-6.1.0-32bit and "qmake qwt.pro"
Opened VS2012 x86 Native Tools Command Prompt and ran "nmake" and "nmake install"
Copied C:\qwt-6.1.0-32bit\designer\plugins\designer\qwt_designer_plugin.dll to C:\Qt\Qt5.2.0\Tools\QtCreator\bin\plugins\designer
This works fine and I can now see the plugin loaded correctly and add Qwt widgets in the UI designer.
This worked for me:
Step 1
I check what MSVC version the QtCreator in my Qt framework version was built with. E.g. QtCreator that comes with Qt_5.6.2 MSVC2015 (qt-opensource-windows-x86-msvc2015-5.6.2.exe) was built with MSVC 2013 (qt-opensource-windows-x86-msvc2013-5.6.2.exe).
Step 2
I install qt-opensource-windows-x86-msvc2013-5.6.2.exe and build Qwt(plugin) with that Qt version.
For comparison here is what happens when Qwt is built with Qt_5.6.2 MSVC2013 and Qt_5.6.2 MSVC2015:
Also here:
https://stackoverflow.com/a/20156419/3096593