简体   繁体   中英

Working android project stopped working after updating android tools from r19 to r20

I came to a new project which have been developed for a quite long time.

My co-workers have the exact same codebase but I had to install Eclipse and the ADT plugin. My co-workers have r19 of android tools and android platform-tools r11. I've android tools r20 and platform tools r12.

Now I get this error message after running the software.

java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{
com.project.package/com.project.package.MyActivity}: 
java.lang.ClassNotFoundException: 
com.project.package.MyActivity in loader dalvik.system.PathClass Loader

So our manifest looks something like this:

<application
    android:icon="@drawable/app_icon"
    android:label="@string/app_name"
    android:theme="@style/Theme.MyStyle" >
    <activity
        android:name=".MyActivity"
        android:label="@string/app_name"
        android:windowSoftInputMode="adjustResize"
        android:screenOrientation="portrait"
        android:configChanges="locale" >

etc.

I'm using Eclipse Classic Indigo (v. 3.8).

Any idea what has happened?

I had exactly the same problem after I updated to SDK Tools r20. Then I realised I had not updated ADT to r20 and, once I did so, then the problem went away.

I'm using Indigo (3.7.2).

Try cleaning the project. I had the same problem, but it went away after cleaning.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM