ViewPagerExtension example Android github - android

I am trying to use viewpager Extension from android github https://github.com/astuetz/ViewPagerExtensions
I imported the example in eclipse and started getting many errors one if which is below.
for the activity_fixed_icon_tabs.xml layout.
The following classes could not be found:
- com.astuetz.viewpager.extensions.FixedTabsView
Can someone please guide me to use this ViewPagerExtension in eclipse?

ViewPagerExtensions is a library and need for run example project
right click on example project > prpoerties > android
then click add button and then select ViewPagerExtensions as library
clean and build your project

Related

How to fix compile time error while implementing sliding menu using jeremyfeinstein library in android

I have downloaded the sliding menu project from this link.
I have imported the project in eclipse.
I am getting the following compile time error:
**com.jeremyfeinstein.slidingmenu.lib.SlidingMenu
com.actionbarsherlock.app.SherlockPreferenceActivity**
I am getting above class is not available. Can anybody tell me if there is any jar file I need to add? Could you provide a link to it if possible?
Thanks
I'll strictly recommended you to use android support library v7.
Find more :
http://blog.xamarin.com/android-support-library-v7-hello-actionbarcompat/http://blog.xamarin.com/android-support-library-v7-hello-actionbarcompat/
if you don't want it
1 . right click your project ->properties->android
in that make sure you have all lib added as reference.
clean your project : project->clean.
make sure your sliding menu lib also have reference to ActionBarSherlock Project Lib.

Weird Eclipse error on demo project

I just imported a demo project and it contains one error. The error is underlining the "p" of package on the header of one class. See image below. I have run project clean, etc. Nothing gets rid of this weird erroneous error:
This project demo was download from here.
Right click on your project > Properties > Android > Select an Android version.
OR
If above solution is not eligible, you have most probably not added Google Map Api to your demo project, It can found here

Adding source files to android

Ok, i've wasted an hour trying to figure it out, even though it's something really simple.
I've downloaded some code from github. I'd like to use this in my android application. How do I go about adding it? It's not a jar file, and i tried drag dropping it and linking the files, and it didn't work. Importing and refreshing / cleaning the project didn't work.
I'm not sure where I'm going wrong. Any help is greatly appreciated!
If this is a project you want to import in eclipse, right click on eclipse left pane (the project list), import, android project from files, select the repository folder.
If this is a library you want to use in you app, there is another step : go to the properties of your project, android tab and in the library section click on add, then select the library project.
By design, android code that contains layout resources (for example ActionBar Sherlock) can not be embedded in a jar. So you have to use it as a library project. It is very convenient though, since it allows you to look at or modify the library code very quickly.
You may also need to let Eclipse know that your library project is a library and not an app. To do so, in the same Properties/Android screen you just have to check the "is a library" checkbox.
Reference on that topic : official documentation
In Eclipse:
File->New->Other->"Android Project from exiting Code"

Can not include source library in project in Intellij IDEA

I've created library project in IDEA with common helpers, which I use in my android applications.
Then I've created android application and included in it my library project like this tutorial said.
Everything seemed okay, code autocomplete worked fine, IDEA recognize that library and all classes and methods in it.
But then I compiled application and saw error "'org.my.helperlibrary' does not exist". However as I said IDEA acts like everything okay before making/launching project.
Here is similar question, but answer is trivial, of course my library has checked "Is Library Project" option but I still can not launch my application which use my library.
Updated:
I've just saw an error: "UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException: already added: Lorg/my/helperlibrary/Helper;" when I removed all usages of library in my android application. So it's just included in my app and not used.
It turned out that I should not add dependency manually in that window
I rather should add new module in my Project window at the left
Then I should choose iml file in the root folder of android library project I want to use
Then I pressed finish and from that point I had two modules in my project
After that when using classes I can press Alt+Enter on any class from SampleLibrary and tell IDEA to add module dependency
Then I could see that IDEA made all I need without me. I can now use SampleLibrary from SampleApplication!
Try to select library project, then click Build -> Compile <your library project name>.
Then back to you project which use this library and click Build -> Rebuild Project.
After that try to run project again.
Hope it helps.

Android Sliding Menu by Jeremy Feinstein

I cloned repo with Android Sliding Menu example from https://github.com/jfeinstein10/SlidingMenu. I successfully built library. But while building example project I got four same error:
No resource identifier found for attribute 'viewBehind' in package 'com.slidingmenu.example'
Can anybody explain what this error means and what should I do to get this bug fixed?
Go to the project prefrences. Under android you can see the library the project uses. Delete the one with an "x" and add the right library to the example.

Categories

Resources