Target 'Android 1.5' does not support building project with libraries - android

I'm trying to build a project in Android 1.5 that references another Android (library) project compiled against Android 1.5 and I keep seeing this error in the Console in Eclipse:
Target 'Android 1.5' does not support building project with libraries.
I'm running Eclipse 3.5, and version 0.9.7 of the ADT.
I followed the instructions here:
http://developer.android.com/guide/developing/eclipse-adt.html
What gives?

The problem was that I was using the wrong revision of Android 1.5. Table 1 on this page:
http://developer.android.com/guide/developing/eclipse-adt.html
states that you must be using revision 4 or later of Android 1.5 to use Library projects.

Related

QtCreator building Android apk is failing with wrong SDK version

I followed the steps shown here.
Installed JDK, Android SDK and NDK. Installed gradle, ant and OpenGl libraries.
When trying to build any android example I get the following error:
Error: Target id 'android--1' is not valid.
I tried this solution but I couldn't select any API. The paths are all correctly set. Using NDK 10 since 14 has known issues.
I verified that it is not a timeout issue as described here
Anyone encountering the same issue?
The reason for not building is this:
SDK Tools, Revision 25.3.0 (March 2017)
Obsolete/deprecated tools have been removed:
android
QtCreator is using the tools to get information about the Android SDK. Workaround is to get the previous version (e.g. 25.2.5).

Visual Studio 2015 - Adding Android Support Library v4 and v7 to use DrawerLayout and ActionBarDrawerToggle

I am trying to add these 2 support libraries to my project through Nuget Manager in Visual Studio in order to be able to use DrawerLayout and ActionBarDrawerToggle. However, both libraries are failing to install with the same error:
*****Could not install package 'Xamarin.Android.Support.Compat 24.2.1'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', 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.***** (the screenshot of the error is also provided at the bottom)
Below are screenshots for these 2 libraries as shown in VS2015 Nuget Package Manager:
Xamarin.Android.Support.v4
Xamarin.Android.Support.v7.AppCompat v 24.2.1
I have installed SDK Platforms in my Android SDK Manager from API19 to API25 and in Extras, I have both Android Support Repository and Android Support Library as can be seen below:
And I have installed Android SDK Tools, Platform-tools and Build-tools from 19 to 25.2.2:
Once I select to install these 2 libraries to my project and hit OK on Review Changes dialog and Licence Acceptance dialog, the installation fails with error like below:
The Xamarin.Android.Support.Compat 24.2.1 NuGet package contains assemblies for MonoAndroid v7.0. So you will need to change the target framework of your Android project to be 7.0. You should be able to change that in the Visual Studio project options.
You may need to update your Android SDKs if v7.0 is not available.
See also this forums post.
It appears that all I needed to do is to restart my Visual Studio.

Opencv on android studio failing update

I'm trying to install opencv on android studio but i get this error,when i try to update build.gradle:
Cause:failed to find target with hash string 'android-14'
But in the sdk manager there is no api level 14 to download
I assumed you imported the Android Program from the examples provided by OpenCV here.
(Note* Eclipse is deprecated but as long as you import the Eclipse project into Android Studio it will still be there.)
I assumed you are using OpenCV 3.0.
After you import, you will see "openCVLibrary310" folder. Change the "compileSDKVersion 14" to "compileSDKVersion [your version]" and rebuild the gradle!
Good luck!

Migrating to Android Studio including libpd

With the release of Android Studio 1.0 (AS) i want to migrate from Eclipse. Generally I need no other library then libpd (PureData) for Audio synthesis. The Problem is, that libpd for android is geared to the needs of Eclipse. So in Eclipse everything is working as expected.
The only information I could found was that: Using libpd in Android Studio So I know libpd and Android Studio could work together but here are maybe some other problems.
I started to generate a new simple project (MinSDK 10 - CompileSDK 21 - BuildTools 21.1.2) just with a blank activity. I can deploy this simple app to my Nexus and everything is fine.
Then I import :PDCore and :AndroidMidi as Module into my AS project and I get the Gradle build-error: Error:The SDK Build Tools revision (17.0.0) is too low for project ':PdCore'. Minimum required is 19.1.0
I installed API 19 and Build Tools version 19.1 via the SDK Manager but that's not solving my problem.
I changed the buildToolsVersion of the apps build.gradle file to "19.1.0" but that's not solving my problem.
Any advices to get Gradle working probably?
Maybe anyone got a sample Android Studio project with libpd to share?
Thanks in advance!
FYI: I wrote some posts regarding migrating to Android Studio using libpd. Take a look here:
http://www.journal.deviantdev.com/using-libpd-with-android-studio/
http://www.journal.deviantdev.com/update-using-libpd-with-android-studio/
http://www.journal.deviantdev.com/sample-libpd-android-studio/
You have to change the build.gradle of the :PDCore and :AndroidMidi modules. At the moment they are using 17, update the BuildTools to the newest version (21.1.2). This should solve your problem.
I created a fork of the libpd-for-android and migrated it to Android Studio. You can clone it and open it in Android Studio as a 'Non Android Studio Project'. This worked very nicely for me and you can also now created an .aar file and use it in your Android App ( instead of copying the whole code or using git submodules):
https://github.com/tkirshboim/pd-for-android

How to determine the revision for a specific android.jar file

How can the revision of an android.jar file be determined.
E.g., given android-sdk/platforms/android-8/android.jar,I would like to retrieve the source code for its contents by deriving its revision and provide it as -b option argument to the repo init command (acc. to http://source.android.com/source/downloading.html)
Actually, this question could be rephrased:
"How can I retrieve the source code for a specific android.jar?"
Is there any alternative to using repo? I'm only interested in the the Java source-files.
There is no need for you to use repo and gather sources of android.jar, since someone else already did it. There are plenty of sites on the web with packaged source for android.jar files. Personally I prefer source packages from adt-addons project:
Android Sources
This plugin helps you to add source to android libraries in Eclipse.
In ADT >=8.0.0 you can add Android sources to Android container for
all your project with installing the Android source feature using
http://adt-addons.googlecode.com/svn/trunk/source/com.android.ide.eclipse.source.update/
update site After installing the Android source feature all your
existing projects as well as new created projects which is targeted
for Android 2.3.4, 2.3, 2.2, 2.1, 2.0.1, 1.6 and 1.5 will have
attached the source jar.
The plugin includes sources for the following API levels:
10 - Android 2.3.4
9 - Android 2.3
8 - Android 2.2
7 - Android 2.1
6 - Android 2.0.1
4 - Android 1.6
3 - Android 1.5
The plugin is about 170 MB size.

Categories

Resources