Android Eclipse public class error - android

I know this question has already been asked here link1 and here link2 but neither have a proper solution so I'm hoping that someone may now know a solution as it's driving me insane.
I'm new to android app design using Eclipse and I created a simple "Hello World" app and wanted to test it but I can't because I'm getting the error:This class should be public (android.support.v7.internal.widget.ActionBarView.HomeView).
I never had this problem come up yesterday and today I haven't altered my code at all but the error pops up when I run Lint Warnings; stopping me from running the test emulator.
Does anyone have a solution to this problem at all or why it's suddenly appeared out of nowhere?

This has been logged as a bug: https://code.google.com/p/android/issues/detail?id=73265
If you've only created a hello world app, I'm a little unsure why you would need to pull in anything from the support libraries. The top answer on the second link should work (making sure lint flags it as a warning and not an error), but you could also make sure you set the target API level higher. I would suggest API 14 based on *current market share

Related

Getting an App APK

Hey guys and girls for a the past week I've grown a lot of interest in android studio (even without knowing quite much about it) I decided to create an app that I deemed quite useful. However the app required maps to be integrated in it and I really did not know what I was doing and at one point I started messing with the settings and then all hell broke loose and I kept getting AAPT2 errors and I even tried to fix this issue with the gradle properties line that you add (I forgot the line of code to add). Anyways it still didnt work. However I rembered that I always kept the good version (before I broke everything) of the app on my phone. So when I go in my phone the app is there and it works just fine. Ive tried so many things to get the source code from the app on my phone without any succes. My question is, how can I get the source code back from the working app onto my laptop to continue coding in android studio? If it helps I am using Linux 18.04 LTS and running the newest version of android studio. Thank you for any help from you guys. This means a lot to me.
You can’t get back the ‘source code’ from an already compiled app.
You should consider using some version control platforms like git from the next time

Xamarin Forms Android Error Message Regarding Support Package and other packages

I am a complete newbie who has just about started android app. development using Xamarin Forms and VS2012. Only about 20-21 days of exposure I have got. I am trying to learn along the way through writing an imaginary practice app. But there are some errors I am getting. You can see them in the picture.
http://imagebin.ca/v/29PeHoLhwW1i
Can someone direct me what exactly it is saying and what I need to do in order to rectify them?Is there something wrong with the installation/environment or like some update? Or is it something else? What's with the "unzipping failed" message?
Some one kindly help me out here please. Facing great deal of difficulty in tackling this.
Many Thanks in advance.
As the error message says (see the third error message ), you need to install the "Android Support Repository" from the Android SDK manager.
The errors are telling you that Xamarin is looking for the support library, but that it cannot find the support library and thus the build failed.
#Tanis.7x and #Jason.
Just an update I want to post:
I went about reproducing this scenario: creating a new project, do some primary simple code, add 1,2 layouts et all. When I build the new project, these 9 errors don't appear. This is strange to me. Because: this is exactly what had happened to my main work also. These errors were not there. Something, somewhere happened along the line, due to which they started appearing suddenly; out of the blue. I remember, I had updated Xamarin version, also just added some packages like JSON.Net and it is only after that this error list appeared. Not before that, if I remember correctly. Which is weird to me. If you try to recreate by creating a brand new project these 9 errors won't appear. I tried recreating this twice; no errors.
Yes, I'm manually downloading the zip file. Hopefully this makes the compiler happy. I'll keep posted about the updates.
Thanks All!

Got error message in Intellij with android.support.v4.app.FragmentActivity clashes onStop

I 've got a strange behaviour in my Android project. I use Google Maps and fragments. For older versions I use the support.v4 lib. Everythng works fine. I can build and run my app.
But my Intellij IDEA 13 shows me a strange error you can see on the picture.
Every Activity that use fragments is marked as broken.
Can someone help me, that its look normal. 2h ago everything was normal.
I dont know what I have done to create this behaviour.

Many many issues, eclipse, android MediaPlayer, etc

I've recently started android programming, and I'm extremely frustrated to say the least with a lot of things that to me seem simple but are totally holding me back from making any progress. The first of which is the "my first app" hello world that I started a tutorial from http://developer.android.com/training/basics/firstapp/creating-project.html
This tutorial worked fine when I was originally looking into android a while ago. Then when I came back after learning a bunch of java this program will no longer work unless I change the target-sdk to version 10 (I found that solution after extensive searching on this site).
Then I moved on to starting tutorials by thenewboston
All of these work fine as long as I didn't use any new targetsdkversion, so I'm wondering what happened that everywhere I go looking for tutorials I can't find anything that will actually work on the current ADT(4.4W and L are what my eclipse automatically set up) and eclipse (indigo). I'll also get issues saying lint isn't working, or trouble with android SDK content loader when I'm not even doing anything.
I've also found snippets of code example on the developer website that I linked earlier that don't work when implemented either
So, am I missing something, is that just old documentation, or is something up with eclipse and ADT? I'm just so frustrated that everything wants to bug out on me when I'm just trying to follow simple introductory tutorials and I don't even know where to turn for tutorials that I can trust to work..
edit:removed code because it wasn't needed.
To not get blocked What you can do is continue to set "targetVersion as '19'" instead of setting it to 20 or so. Ensure that you've downloaded API19 through SDK Manager and create the AVDs with that targetSDK version for checking you apps.
That way you can proceed ahead with your coding and later when things get resolved by google for API20...you can always comeback to that new version. This way you can follow 'TheNewBoston' and start coding in Android.
I also recommend 'Slidenerd' tutorials over youtube as well for the beginner.
BTW, I've also selected 'Blank Activity / Empty Activity" during the project creation with API19 and been able to move ahead with my coding.
The Google Bug thread about this latest version issue can be tracked here : The google bug
As a beginning developer, I suggest you use API 19. It has been out for a while and is more stable than L or Google Wear.

How can I get AdMob working for Android 2.3.3

I followed the instructions for adding AdMob in my app and I compiled my code againest the suggested API Level and it compiles fine and when I try to test the application on either an emulator or my device it does not work, the application crashes as soon as I navigate to the activity that has the AdMob.
I searched and tried all the threads in stack overflow and non of them seems to work for me, I was surprised when other people who posted the same problem that they say it's working for them after someone has answered them but their solution doesn't seem to work for crashing the app which no one complained about.
I tried many versions of AdMob from 4 until the latest one 6 and non seem to work. Any help or suggestion where I am doing something wrong?
By the way, I even started a new app which is 4.0.3 and still the app crashes.
Thanks
Make sure your place the library in the libs directory of your project, or in the Java Build Path, explicitly export it so that it gets bundled into your .apk file when your app compiles.

Categories

Resources