I was trying to run a sample code While launching the application in the android 1.5 emulator , I got these errors.... Any one have some hint..?
ERROR from LogCat:<
I have tried all above solution but nothing work for me. after I have just add extend
activity instead of AppCompatActivity
and working fine.
used
public class MainActivity extends Activity
instead of
public class MainActivity extends AppCompatActivity
i dont know what real issue was that.
This happens to me fairly frequently when using the NDK. I found that it is necessary for me to do a "Clean" in Eclipse after every time I do a ndk-build
. Hope it helps anyone :)
I got rid of this problem by deleting the Bin
and Gen
folder from project(which automatically come back when the project will build) and then cleaning the project from ->Menu -> Project -> clean.
Thanks.
Got this problem, and fixed it by setting the "launch mode" property of the activity.
This might not be relevant to the actual question, but in my instance, I tried to implement Kotlin and left out apply plugin: 'kotlin-android'
. The error happened because it could not recognize the MainActivity in as a .kt file.
Hope it helps someone.
I encountered this problem too, but in a slightly different way. Here was my scenario:
App detail:
<uses-library android:name="com.google.android.maps" />
in the manifests of both the library project and my primary project (this may not be necessary in the library?)However, I still encountered the error described in the original post and could not get it to go away. The problem though, was slightly different in one regard:
How I fixed it:
This step alone did not fix the problem
Once the jar was added to the build path, I had change the order on the Java Build Path > Order and Export tab - I set the JAR to the first item in the list (it was the last after the /src and /gen items).
I then rebuilt and redeployed the app to my device - it worked as expected on a fresh install. Just to be certain, I uninstalled it again 2-3 times and reinstalled - still worked as expected.
This may be a total rookie mistake, but I spent quite a while digging through posts and my code to figure it out, so hopefully it can be helpful to someone else. May not fix all situations, but in this particular case, that ended up being the solution to my problem.