Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8690909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:00:28+00:00 2026-06-13T00:00:28+00:00

I’m trying to add AndroidAnnotations to my maven/idea project. Here is what I have

  • 0

I’m trying to add AndroidAnnotations to my maven/idea project. Here is what I have now:

Manifest

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="ua.avtopoisk"
      android:versionCode="1" android:versionName="0.5">

<uses-sdk android:minSdkVersion="1"
          android:targetSdkVersion="8"/>


<uses-permission android:name="android.permission.READ_PHONE_STATE"/>

<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.INTERNET"/>

<application android:name=".AvtopoiskApplication" android:icon="@drawable/icon"      android:label="@string/app_name">
    <activity android:name=".activites.SearchActivity_"
              android:screenOrientation="portrait"
              android:configChanges="keyboardHidden|orientation">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>
    <activity android:name=".activites.SearchResultActivity"
              android:screenOrientation="portrait"
              android:configChanges="keyboardHidden|orientation"
              android:label="@string/app_name"/>
</application>

maven dependencies

<dependency>
            <groupId>com.googlecode.androidannotations</groupId>
            <artifactId>androidannotations</artifactId>
            <version>2.6</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.googlecode.androidannotations</groupId>
            <artifactId>androidannotations</artifactId>
            <classifier>api</classifier>
            <version>2.6</version>
        </dependency>

start activity

@EActivity(R.layout.search)
    public class SearchActivity extends Activity {
    }

I also edited my project settings as shown here https://github.com/ealden/android-annotations-idea-test/blob/master/project-settings-guide.png

It compiles fine, but when i try to run this application i recive this:

10-16 16:39:49.789: ERROR/AndroidRuntime(15972): FATAL EXCEPTION: main
            java.lang.RuntimeException: Unable to instantiate activity    ComponentInfo{ua.avtopoisk/ua.avtopoisk.activites.SearchActivity_}:   java.lang.ClassNotFoundException: ua.avtopoisk.activites.SearchActivity_ in loader   dalvik.system.PathClassLoader[/data/app/ua.avtopoisk-2.apk]
            at   android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1573)
            at    android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
            at android.app.ActivityThread.access$1500(ActivityThread.java:117)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:130)
            at android.app.ActivityThread.main(ActivityThread.java:3687)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:507)
            at   com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
            at dalvik.system.NativeStart.main(Native Method)
            Caused by: java.lang.ClassNotFoundException:   ua.avtopoisk.activites.SearchActivity_ in loader   dalvik.system.PathClassLoader[/data/app/ua.avtopoisk-2.apk]
            at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
            at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
            at   android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1565)
            ... 11 more

If you can give me any hint I would be thankful.

UPDATE

I’ve found that when i build my application by maven everything is ok, but when i buld it by IDEA i still have ClassNotFoundException.
I still have no idea what is wrong

UPDATE 2

I’ve tryed to build my project with eclipse and I’ve got same error.
I also tried to build android annotations sample project (HelloWorldEclipse), I also have same error

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:00:29+00:00Added an answer on June 13, 2026 at 12:00 am

    I’ve found the problem! Folder gen with generated sources was excluded by IDEA (Settings->Compiler->Excludes). Now works fine, but I’m still intrested is it true way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
This could be a duplicate question, but I have no idea what search terms
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to loop through a bunch of documents I have to put
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.