I tried to build Eclipse project that references android.support.design library (CoordinatorLayout and FAB inside it). I copied into my workspace android.support.v7.recyclerview library project and sucesfuly built it. Then did the same with appcompat-v7. That enabled me to build design library (previously also copied into workspace) which goes OK. Finally I built project, that references design library. Everything went well, designer presented good preview (API23), but running on device (API 17) didn't succeed- LogCat express disability to inflate CoordinatorLayout. TargetSDK was 17 and compilerSDk was 23. My support library is 23.1 version.
When making the same project in Android Studio (everything was wizard generated), I faced no problems. I noticed the same dependencies in gradle file, and SDKs are same as in Eclipse. Why those diferencies and where did I go wrong ?
You mean you have problems on Eclipse but none in Android Studio? Try lowering the compilerSDk or raising the TargetSDK to the latest release.
Related
In my Android project I used some Support Library such as RecyclerView, Leanback, Cardview. etc.. My buildToolsVersion is 23.0.1, targetSdkVersion is 23
I try to compile RecyclerView, Leanback, Cardview in Eclipse, but Eclipse support for some new Android Support Library has been very unfriendly. I try it in Eclipse Juno but compile failed because Eclipse Juno use jdk1.7 and don't support Android-23, so I update to Eclipse Mars and use jdk1.8 and try it again. I expectantly Eclipse Mars can support Android-23 but I found no devices when I change to DDMS tab. I suspect the reason is the version of adb, but I check the adb is the latest version, my Android SDK version is the lastst too. Finally I try to use the latest version of ADT but still failed.
Now my project's trouble is I have to compile my project in the Android 4.X source code environment. In order to compile project successfully I make a Android.mk and add LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES to ensure some jars can be found. But When I use Android Studio how can I found out where is the jars which I add some comple 'xxx' statement in build.gradle.
Summarize:
Above that so much, I encountered two troubles:
1) I hope to be able to use the latest version of Android Support Library 23.0.1(RecyclerView, Leanback, Cardview) in Eclipse. So I can copy and paste the jars to compile my project in the Android 4.X source code environment at any time any where.
2) I hope to find out all of jar library which I add in build.gradle.
End) Android 4.X source code environment use jdk1.6, and I want use Android Support Library 23.0.1 in the environment. I need your help, thanks.
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
First of all, i know this question has been asked a lot, but nothing seem to be working for me.I have installed Eclipse ADT On MAC 10.9.5 from android.developer.com and have installed latest Android SDK tools, and all other platform and tools required for Android 5.0, android 4.4W and Android 4.4.2. I have also installed Android support library. But when i try to run the project with the default properties,
http://postimg.org/image/4lf8ayl99/
Minimum Required : SDK-API8:Android 2.2(Froyo)
Target SDk-Android; 4.x(L Preview)
Compile With ; API 21: Android 4.x( L Preview)
It always give me error,
The container 'Android Dependencies' references non existing library '/Users/xxx/Documents/workspace/appcompat_v7/bin/appcompat_v7.jar'
I went through all the solutions listed on web and on this website too, but nothing worked for me.
appcompat_v7 library gets generated, and then i click on add to build path for android-support-v7-appcompat.jar and android-support-v4.jar, and then from build path add the two libraries and untick android dependencies and add the library to my project from android library. From other posts i get to know that after clean and build appcompat_v7 library project , appcompat_v7.jar would be generated in bin directory, but it doesn't happen in my case.
Please help. I have spent too much time looking for the solution, but didn't find any.
I finally found the solution, I had to update the jdk to 1.8, The jdk installed by default by eclipse ADT form android.developer.com doesn't seem to be updated and Since API 21 requires jdk 1.7 or above thus i had to install it from JDK official website http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html. Finally i got the support library appcompat_v7 working.
I had the same problem and I tried and after that message I got another from the res folder. Anyways what I did was switch work space and it worked fine . it should create those files for you as long as you downloaded the extras from android manager downloader.
Hi i have problem in creating a new project in eclipse. I have errors in both android support library and in my project. I tried removing the library project and added again as said by many websites. But Still end up with errors. Please guide me in this
SDK Screenshot
The issue is that the support library has updated definitions for Android 5.0 (Lollypop). Since resource folders such as values-v21 and layout-v21 have been defined in the support library, both your application and appcompat projects do not know API 21 since your build target is set for an older version of Android.
To resolve this, you need to make sure that both your application and the appcompat projects have the build target set to Android 5.0 since the support library has updated values for the new Material theme that has been backported. It is a good idea to always target the latest versions so that you don't run into these issues with future updates to the support library.
You can do this in Eclipse by:
Right-click the project folder and select Properties
Select Android on the side menu
Select Android 5.0 as the Project Build Target
You may need to download the Android 5.0 (API 21) SDK Platform in the SDK manager if you cannot find the Android 5.0 target.
Right click on appcompat project and change the build version to android-5.0.
You have appcompat library which is having values-v21.
So, change the build version of android from 4.4.2 to 5.0
Try these steps.
Delete the android-support-v7-appcompat project (from the workspace, leave it on the disk)
Delete the android-support-v7-appcompat project (from the workspace, leave it on the disk)
Go to your project and select Properties -> Android, and remove android-support-v7-appcompat from your references.
Perform clean
Re-import android-support-v7-appcompat.
Re-add appcompat as a reference for your project again.
Perform another clean of the project
Try to add the library via Right click project -> Android Tools -> Add Support Library
I imported the actionbarsherlock folder into the workspace using "Import -> Existing Android Code Into Workspace". Then I ensured the following:
In the manifest:
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16"/>
Properties -> Android: Build target is API 16 (Android 4.1.2) and IsLibrary is checked.
Properties -> Java Compiler: Compiler compliance level is set to 1.6.
And yet I'm getting a lot of BuildConfig cannot be resolved to a variable errors.
I tried to clean all projects many times, and even restarted Eclipse several times. I even tried to add a BuildConfig class manually, but then there were still a lot of R cannot be resolved to a variable errors that I could not resolve.
I've read dozens of answers (such as this one: R cannot be resolved error when using ActionBarSherlock ), but nothing helps. Any help will be much appreciated.
Strangely enough, the problem was that I skipped MIPS System Image the last time I updated components in the Android SDK Manager. Now I updated MIPS System Image from revision 2 to 4, and everything builds fine.
I don't even use MIPS, but maybe there was some strange compatibility issue.
I had the same problem. When I went back to the Android SDK Manager it showed me that I could update Android SDK Platform-tools and Android SDK Build-tools to version 17. That fixed the problem for me.
Strangely enough, this issue gets fixed when I add old flavors of Android SDK build tools: 18.x and 17.x
(For some reason, I uninstalled some of those)