My project consists of a main project and two library projects. I am using the manifest merging. One of library projects has a service running in a separate process with intention that it gets used by other similar apps which include my framework.
I am experiencing a very strange behavior where even though I update code in the service part, my app is still using the previous old version of it. Reinstalling the app does not help either.
Does anyone know what is a cause of this problem and how to resolve it?
UPDATE: The problem occurs only if I use startService(new Intent ("service action"))
Related
I know this is a rare question. Even if there are people using MyEclipse for Android development is doubted :(
The annoying thing is that after I modified my Android project (like an Activity class of a xml file), the project remained the same as it was when I imported it.
I thought there is an important feature that demonstrates this error: When I run my Android project and the console reported that "Activity not started, its current task has been brought to the front". This line occurs because the project didnt changed while as a matter of fact I did change the project and saved it.
Is there anyone has the same problem like me?
-------------add in Oct. 28-------------------
This was what I did: first, I modified one of my activities by commenting out the Toast functions; and then, I ran it however the Toast line still showed on my Genymotion emulator
During my development under Android I saw that if I don't clean before building and running the application, it will keep some old files giving me no-sense errors since they were fixed one or two runs before.
Have you ever experienced this problem? Any idea of how to prevent it / how to clean always before running the application on Eclipse?
This is not happen always. Most of the time if you not clear the project before build won't harm the application. I clear it form time to time, mostly when I change something in xml files, but for regular app checking I don't think you have to do it and I doubt that there is any method to clear before each build.
I've been working on an app for some time now and recently it keeps crashing on startup.
The error that causes it to crash is java.lang.ClassNotFoundException on my launcher activity. I've launched and debugged my app tons of times with no problems so I think I must've accidently changed something in a configuration file somewhere but I can't work out where.
I've checked the manifest file and there's nothing wrong, the path for the activity is correct and I've looked through the class file itself and again the package prefix is correct. I've also gone through the file directory and there's nothing wrong there either.
I tried changing the launcher activity to another one inside the same application and it runs with no problem, I've also tried creating a new launcher activity and that runs with no problem.
However, when I create a new activity and paste in all the code from the one that crashes the whole app crashes again. Even when the new activity has a different class name.
Also just before the app crashes I get two warnings:
Unable to resolve superclass of Lcom/bend/... and Link of class 'Lcom/bend/... failed
Now everything in my app is com.bend... NOT Lcom.bend... but I can't find anywhere where it's written Lcom. But I don't know if that's the cause of the problem or just a change the system does.
I know it's a real obscure problem but I just cannot figure it out. Any help would be awesome.
EDIT: I've just tried running another app I've done that's has a similar design and it's doing exactly the same thing.
I've just recently updated the SDK. Could that be the problem?
I've just solved it by creating an entirely new Android project and copying the java files and resources etc. into the new project.
I think it might have been the v4 support library that was causing the problem. I'm using a lot of Fragments so was relying heavily on it. Though I tried replacing the .jar file from an app that worked and it didn't seem to help...
In any case it was nothing to do with any of the classes or the manifest file.
I have an application that uses a native library (.so).
In the new version of the application I made changes in the lib. The problem is that after upgrading the application it looks like the new library is not loaded.
If I force stop the application and then I restarted it everything works fine.
In some cases just waiting for a while (for example 20 mins) fixes the problem.
Did anyone experience this issue?
Is there a way to fix it?
EDIT
I have also tried to call
System.loadLibrary("mylib.so");
in the onReceive of the OnUpgradeReceiver that is the broadcast receiver that is registered to be called when the application is upgraded
It did not help
EDIT2
I think this issue has to do with the fact that the lib uses the audio engine. The reason iwhy I think so is that I tried to change the name of the lib and it did not help either
Ok never mind I think the issue is just in my lib. I need to find where but I checked that the application is properly closed after the upgrading.
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.