johannilsson / android-actionbar

DEPRECATED Android Action Bar Implementation
1.31k stars 564 forks source link

Importing Library in eclipse...!!! #50

Closed adiktz closed 12 years ago

adiktz commented 12 years ago

I'm really new to Git and maven...!!! I downloaded the mimic-native-api branch because it had the latest commit...!!! Looking at the folder I got to know that it is a maven project as it had a "pom.xml"...!!! Now I need to import it in eclipse because I am used to eclipse and have never used manen, so I installed maven on my ubuntu and ran command "mvn eclipse:eclipse" which made it a eclipse importable project...!!! The problem starts here, I don't want to add maven repo to my eclipse class path because I don't want any dependency on maven in using the library...??? Also I can't import the example because neither it has a pom.xml nor it is an eclipse project...!!! I tried copy pasting the code but I get lots of error...!!!

Can someone tell me how to make the library and example work in eclipse...??? I tried Googling for help and wasted my 2 days trying to figure it out on my own...!!! Please Help...!!!

JakeWharton commented 12 years ago

You do not need to use Maven in order to utilize this project. Simple create a new Android project, check the existing sources box, and browse to the actionbar/ folder in your download.

You can then do the same three steps for the example app as well.

adiktz commented 12 years ago

Tried that just now...!!! New project is created automatically with the name "com_markupartist_android_widget_actionbar" but the src and all other folders are empty, not even AndroidManifest.xml file is present...!!! Now what to do...???

JakeWharton commented 12 years ago

Are your developer tools and eclipse plugins up-to-date? Make sure you're using r16 / v16.0.1.

johannilsson commented 12 years ago

What the project is named in Eclipse is up to you. The library does not force any IDE on one which why the project files is left out. I believe that in Eclipse you need to do what @JakeWharton suggests, also make sure that the new project you create is an Android project.

adiktz commented 12 years ago

Yes my art is r16 and eclipse is also upto date...!!!

And the new project I'm creating is an Android project...!!!

I named the project ActionBar...!!! Now what i did is I copies sec and Res folder from the download folder to this newly created project folder "ActionBar"...!!! Also copied the Manifest file...!!! Now after a refresh in eclipse everything comes...!!! Now only problem I am having is wherever R.something is mentioned, it shows error...!!! On analysis i found that "R" file was not generated...!!! Now what can i do to let it generate R.Java automatically...??? I tried cleaning project...!!!

rfgamaral commented 12 years ago

Try to restart Eclipse (or even your computer, just in case) and see if the R file now generated, if not, do a Project » Clean (after the system/Eclipse) reboot of course.

Eclipse is a mess and when I have problems with the R file not being generated correctly, I just restart Eclipse and the problem, normally, goes away... Your issue might be a different one though.

adiktz commented 12 years ago

I just deleted the "gen" folder from the project folder and also deleted value-v14 folder because that was showing error...!!! After a "Project >> Clean" and a refresh, finally R.java file is generated (sigh, such a relief)...!!!

When I followed the steps stated by @JakeWharton in his first comment for the example, it was straight forward and all the files were easily copied into the new project folder (Strange)...!!! Again, I had to delete value-v14 folder (don't know why it shows error...)...!!!

One more thing :

I had to "import com.markupartist.android.widget.actionbar.R;" to the ActionBar.java and ListNavigationDropdown.java files of the library...!!! I suppose it is strange ( Or isn't it...??? )...!!! From the issues I learnt that I would have to set the theme in projects using the widget, Is it also required in example project...???

JakeWharton commented 12 years ago

You have to compile with Android 4.0 or 4.0.3 in order for that folder to be valid. On Jan 9, 2012 12:13 PM, "adiktz" < reply@reply.github.com> wrote:

I just deleted the "gen" folder from the project folder and also deleted value-v14 folder because that was showing error...!!! After a "Project >> Clean" and a refresh, finally R.java file is generated (sigh, such a relief)...!!!

When I followed the steps stated by @JakeWharton in his first comment for the example, it was straight forward and all the files were easily copied into the new project folder (Strange)...!!! Again, I had to delete value-v14 folder (don't know why it shows error...)...!!!

One more thing :

I had to "import com.markupartist.android.widget.actionbar.R;" to the ActionBar.java and ListNavigationDropdown.java files of the library...!!! I suppose it is strange ( Or isn't it...??? )...!!! From the issues I learnt that I would have to set the theme in projects using the widget, Is it also required in example project...???


Reply to this email directly or view it on GitHub:

https://github.com/johannilsson/android-actionbar/issues/50#issuecomment-3416414

adiktz commented 12 years ago

Okay...!!! Actually I was compiling it against 2.3.3 and targeting 4.0...!!! My requirement is to compile it against 2.3.3...!!! Anyways I got it working and successfully run Example project...!!!

Thanks for such a beautiful library and thanks all of you for your support...!!!

johannilsson commented 12 years ago

Sweet, great to hear that it's working now. Thanks!

adiktz commented 12 years ago

Thank you guys...!!! You guys helped me solve my problem within 2 hours, that's great...!!! Thanks again for such a beautiful library and such a great support...!!!