That usually comes form errors in the build path
if your using eclipse there is a view you can add that list all the errors called "Problems"
otherwise you can try to clean the project that usually solve a few problems
finally if you add or altered resources from outside your IDE you'll want to reload the resources and clean
EDIT (Comment by anonymous user)
This can also be caused by an out of date "Debug Certificate" fixed as follows:
Delete your debug certificate under
~/.android/debug.keystore
(on Linux and Mac OS X); the directory is something like %USERPROFILE%/.android
on Windows.
The Eclipse plugin should then generate a new certificate when you next try to build a debug package. You may need to clean and then build to generate the certificate.
This is also another fix for the "setContentView(R.layout.main);" error that says it cannot find R.layout.main when it is actually generated. (R cannot be resolved to a variable).
This is also another fix for the error "Your project has errors..." and you cannot find any. Clean and rebuild are still necessary after generating a new debug certificate.
It's a pain to have to delete all your development .apk files, because the new certificate doesn't match so you can't upgrade them in all your AVDs. You have to get another development MAP-API key as well. There's another solution.
You can create your own debug certificate in debug.keystore with whatever expiration you want. Do this in the .android folder under your HOME directory:
keytool -genkey -v -keystore debug.keystore -alias androiddebugkey -storepass android -keypass android -keyalg RSA -validity 14000
ADT sets the first and last name on the certificate as "Android Debug", the organizational unit as "Android" and the two-letter country code as "US". You can leave the organization, city, and state values as "Unknown". This example uses a validity of 14000 days. You can use whatever value you like.
No comments:
Post a Comment