I am trying to add an existing project as a module. However, it wont compile as it says this library is missing:
android-support-v4.jar => com.android.support:support-v4:20.+
I have opened the sdk manager and installed the latest version of Android Support Library but the error remains. How can I fix this please?
Make sure that you have the "Android Support Repository" installed under "Extras" in the SDK manager.
The support libraries are managed in a local Maven repository, and that repository is the "Android Support Repository" component.
You can manually search the android support library jar in the android sdk directory and then copy it to a directory included in your projects library path. I believe the jar should be somewhere in the \extras\android\support directory.
Note: I must do that when developing android apps with netbeans + android plugin. Not sure if android studio is supposed to pick the support library automatically from the sdk folder.
Related
With Android Studio 3.3 I use native (C++) library, which I built with CMake. The Android plugin (v. 3.2.1) will choose the 'builtin' or 'external' cmake, depending on the configuration of externalNativeBuild, as documented at developer.android.com.
I want to add an extra custom task (install) that should use the same cmake version as the Android Plugin. But even with the 'builtin' cmake, it's not clear what the path is. I can find android.sdkDirectory, but even there I have today sdk\cmake\3.6.4111459 and sdk\cmake\3.10.2.4988404, and for some strange reason, some of my projects choose 3.6, while others use 3.10. This contradicts the official the release notes for Android Studio that "Gradle still uses version 3.6.0 by default", but well…
How can I decide which to use, without reimplementing the Android Plugin's obscure logic?
One workaround that may help, parse the first line of the generated file .externalNativeBuild/cmake/debug/armeabi-v7a/cmake_build_command.txt:
Executable : C:\local\Android\sdk\cmake\3.10.2.4988404\bin\cmake.exe
This still needs some adjustments, because the later versions of build tools will use .cxx instead of .externalNativeBuild; the build variant names may be different too.
Android Studio will pick up the latest CMake version under sdk\cmake, but you can configure your particular version from
externalNativeBuild {
cmake {
...
version "cmake-version"
}
}
And specify our custom CMake director as below inside local.properties
cmake.dir="path-to-cmake"
Or, you can choose NOT to upgrade your CMake from SDK Manager (just to delete the sdk\cmake\<version to delete> folder will be fine) so that you can stick to the CMake version your project is comfortable with.
I have updated xamarin ios from classic api to unified api.
When i trying to add Mvvmcross nuget package it shows following error
Could not install package 'MvvmCross.PortableSupport 3.2.2'. You are trying to install
this package into a project that targets 'Xamarin.iOS,Version=v1.0', but the package does
not contain any assembly references or content files that are compatible with that
framework. For more information, contact the package author.
Please help.
The MvvmCross.PortableSupport 3.2.2 NuGet package contains an empty Portable Class Library folder and can be installed into a Xamarin.iOS project if you have the Portable Class Libraries installed for Xamarin and if you have the latest version of NuGet installed.
So you may not have the PCLs installed for Xamarin or, if you are using Visual Studio, then your NuGet version may be too old and need to be updated.
To get the Portable Class Libraries:
If you are on the Mac you should install the Mono Development Kit (MDK).
If you are on Windows then things are can be more complicated. The simplest way is to install Visual Studio 2013 (full or Express) Update 2 or higher. The more complicated way is to install the Portable Library Tools and the Portable Library Reference Assemblies 4.6. The Portable Library Reference assemblies installs a PortableReferenceAssemblies.zip file which contains three directories (4.0, 4.5 and 4.6). These three directories need to be extracted and copied into the PCLs directory:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable
Finally on Windows you would then need to reinstall Xamarin. The easiest way to do this is to find Xamarin in the Control panel's Programs and Features and select the option to Repair it.
All the source code is included when downloading the support libraries via SDK manager in Android Studio. Now I need to fix a bug in the support v4 code and add it as a *.jar in my application. But I don't understand how I open and build the source code in Android Studio. Do I import it as a new project? Do I open it as an existing project? What directory is the directory to be imported/opened? Can I just rebuild support-v4 code into a jar?
Thanks!
I'm using Android Annotations in my project and I followed the instructions in this blog post http://www.jayway.com/2014/02/21/androidannotations-setup-in-android-studio/
Everything worked fine.
Today I updated Android Studio to latest version (build of 5th june). This requires an update of gradle build tools from 19.0.3 to 19.1.0. And i configured this in my build.gradle.
Annotaion processing still works. The generated files are located in build/source/apt. But this folder isn't visible any more in project explorer. And starting the build complains about the configuration.
But the project seems to run correctly.
This behavior is very annoying. Do I have to change anything in Android Studio? Has anyone a solution or is this just a bug in Android Studio?
The author of android-apt has already updated his plugin to support Gradle's new version, just change this line in your build.gradle
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.2+'
To
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.3'
The Android Studio Team changed the behavior of the IDE "for better IDE integration". Therefore the output directory of the apt-plugin v 1.2 will not be recognized as generated sources folder any more.
the plugin author knows about it and will provide a fix
https://bitbucket.org/hvisser/android-apt/issue/13/compatibility-with-011-android-plugin
I am unable to remove NDK support from my Android project. I have gone through all the workspace and project settings, including CDT builder, C/C++ build paths, etc. I have cleaned my workspace and relaunched Eclipse. However, my project will not build as Eclipse complains about this error:
Program "/home/eazyigz/adt-bundle-linux-x86/android-ndk-r8c/ndk-build" not found in PATH
I really don't know what to do, as I don't even have ndk-r8c downloaded, and it's an outdated version of ndk anyway! I am on Ubuntu Linux.
Anybody knows?
Well, I reinstalled Eclipse. Then I deleted my project and re-imported it into the workspace. Now I don't get that error anymore. Problem solved.
If you have a C/C++ aspect to your code which references the Android NDK plugin for Eclipse, you need to have the NDK location set in the NDK plugin preferences: