aspose file tools*
The moose likes Android and the fly likes NewsReader Program not run. Why? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "NewsReader Program not run. Why?" Watch "NewsReader Program not run. Why?" New topic
Author

NewsReader Program not run. Why?

fahimeh hashemian
Ranch Hand

Joined: Aug 07, 2012
Posts: 84
I am new to android. I want learn multiScreen in android and i read http://developer.android.com/training/multiscreen/index.html . I download NewsReader program and import to Eclipse but when i run this program, the program has errors and not run. I dont know why? The link written, i should add library to my application. I install android support library of android SDK manager and i copy android-support-v13.jar to libs folder. Where is my problem? How can i solve this problem?

some of errors:

Call requires API level 11 (current min is 7): android.app.ActionBar#addTab

Call requires API level 11 (current min is 7): android.app.ActionBar#newTab

and etc

Thanks for help.
Cheers.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41574
    
  54
Apparently the manifest file specifies that this app should run on an Android version (7) that does not have the method you're trying to call (11). Given that the support library classes all have package names like "android.support.v4...." I would expect you need to use one of those classes instead of android.app.ActionBar.

Apparently there's also sample code called "Action Bar Compatibility" that comes with the SDK (assuming you have installed the support library).


Ping & DNS - my free Android networking tools app
fahimeh hashemian
Ranch Hand

Joined: Aug 07, 2012
Posts: 84
Ulf Dittmer wrote:Apparently the manifest file specifies that this app should run on an Android version (7) that does not have the method you're trying to call (11). Given that the support library classes all have package names like "android.support.v4...." I would expect you need to use one of those classes instead of android.app.ActionBar.

Apparently there's also sample code called "Action Bar Compatibility" that comes with the SDK (assuming you have installed the support library).


you mean i should not copy android-support-ver13.jar to libs folder? I right click in program name in Eclipse and select properties and select Android 2.1(API=7) and try run again but the program has errors like before change android version.

Sorry but i don't understand what you mean of --> Given that the support library classes all have package names like "android.support.v4...." I would expect you need to use one of those classes instead of android.app.ActionBar. this sentence?

Thanks for help.
Cheers
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41574
    
  54
Looking at the documentation of the android.support.v13.app library I don't see anything in there that would help with bringing ActionBar support to earlier versions; it's all about Fragment support. Why do you think it would help?

As to your second question, android.app.ActionBar does not exist in API level 7, and if you check out what's contained in the v4 support library, you won't find it in there, either. You can use the "jar" tool that comes with the JDK to find out what's contained in a jar file. Using the support libraries involves some workarounds, chiefly by using class names that are different from the standard Android classs names. That's what the android.support.* packages are all about.

Have you checked out the API sample code I mentioned? It sounds as if that is precisely what you need to work through now in order to understand how the support libraries work.
fahimeh hashemian
Ranch Hand

Joined: Aug 07, 2012
Posts: 84
Ulf Dittmer wrote:Looking at the documentation of the android.support.v13.app library I don't see anything in there that would help with bringing ActionBar support to earlier versions; it's all about Fragment support. Why do you think it would help?

As to your second question, android.app.ActionBar does not exist in API level 7, and if you check out what's contained in the v4 support library, you won't find it in there, either. You can use the "jar" tool that comes with the JDK to find out what's contained in a jar file. Using the support libraries involves some workarounds, chiefly by using class names that are different from the standard Android classs names. That's what the android.support.* packages are all about.

Have you checked out the API sample code I mentioned? It sounds as if that is precisely what you need to work through now in order to understand how the support libraries work.


Thanks for answer. Have you any document or link that explain about how the support libraries work?

I download this program of developer android site and and i don't write this. I mean, i don't used external and not standard library in this program.
How can i find what's contained in a jar file with JDK? If you can, please tell me.

What sample code you mentioned?!

How can i use android.app.ActionBar? When you run the program(NewsReader program in developer android site),do any problem with this?

Thanks a lot ;)
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

fahimeh hashemian wrote:
What sample code you mentioned?


This is where you can download the Action Bar Compatibility sample for a demonstration of how to use ActionBar on Android 3.0+ and also support action bar functionality on older versions.

Just follow steps are mentioned.

Hope it helps.


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
fahimeh hashemian
Ranch Hand

Joined: Aug 07, 2012
Posts: 84
Thanks for answer my friends .
My problem was solved but i don't know how solved this!! I delete full of errors in Problems tab and run the program again and the program run! Anybody how solve this problem?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NewsReader Program not run. Why?