Starting Activity from Android-Library-Project

前端 未结 2 1510
无人共我
无人共我 2021-01-04 09:58

after a long search I couldn\'t find any appropriate solution. I have a Android-Library Project with nearly all code for the application. From the main activity in the libra

2条回答
  •  轮回少年
    2021-01-04 10:09

    In your new project, you could use a different name, instead of AndroidActivity. If you don't want to do that, the second AndroidActivity's fully qualified name in the manifest file should solve your problem. You are perhaps messing up with packages a little bit, somewhere.

    activity android:name="de.app.library.activities.AndroidActivity"
    

    should be

    activity android:name="de.app.free.activities.AndroidActivity"
    

    I meant, the AndroidActivity. In some way, your are picking up the wrong activity class from the wrong package.

提交回复
热议问题