You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
hi, i'm refering to instant app codelab from google i/o, i moved the files from application module to base feature module (no feature module for now), but several times as i tried, the file is not generated. I'd like to know is there anyway i can make it work?
Thx
I have not tested it yet, but I'm pretty sure it should be compatible. You have to add the AndroidAnnotations processor and dependencies to each module that should use generated files.
@ealden i quickly read through the doc, and instant app module is pretty much the same as a library module. AA should work out of the box. Can you share an example project?
And adding a simple annotation @EView in one of its classes, it won't compile, it says:
e: error: Could not find the AndroidManifest.xml file, using generation folder [/Users/mrhabibi/Projects/android-topeka/topeka-base/build/generated/source/kapt/debugFeature])
:topeka-base:kaptDebugFeatureKotlin FAILED
I've been struggling for days and got stuck, actually I have other project that uses AA too and get the same problem, can anyone help me with this? Thanks.
I'm currently working on Android instant apps by using the android-topeka example project.
Everything works as expected, after I'm using AndroidAnnotations on my Activity:
@EActivity(resName = "activity_start")
public class StartActivity extends AppCompatActivity {
...
}
If I want to start the application(:installed) one, everything works, but for the instant-app(:instant), I get the following error:
:base:javaPreCompileDebugFeature UP-TO-DATE
error: The generated <applicationId>.R class cannot be found
1 error
:base:compileDebugFeatureJavaWithJavac FAILED
Additional Info:
If I remove the application project(':installed') in the base
build.gradle I can start the instant-app but with the wrong application-id (configured in the :installed project).
@ManuelSchmitzberger this only happens when AndroidAnnotations is added to the project? Looks strange to me, as from what you have posted as errors I'm not sure how AA could be involved in the issue. 🤔
@ManuelSchmitzberger this only happens when AndroidAnnotations is added to the project? Looks strange to me, as from what you have posted as errors I'm not sure how AA could be involved in the issue.
yes.
Can you provide an up to date demo project (ready for AS 3.2.1 and latest tooles)? then I can try to check what is worng or needs to be done.
I think i got a working build with instant app. not yet tested if the result runs, and if it works with split/flavours. so i have to do some more testing and cleanup but i'm confident to get it fully working. :)
@ManuelSchmitzberger can you test for your version of the project configuration if it works with the following config in your base\build.gradle
I migrated my project to gradle build plugin 3.2.1 and after fixing the Manifest Finder issues i got the error: The generated com.test2.R class cannot be found error but the given option fixed it for me. :)
Activity
dodgex commentedon Jun 18, 2017
I have not tested it yet, but I'm pretty sure it should be compatible. You have to add the AndroidAnnotations processor and dependencies to each module that should use generated files.
WonderCsabo commentedon Jun 27, 2017
@ealden i quickly read through the doc, and instant app module is pretty much the same as a library module. AA should work out of the box. Can you share an example project?
WonderCsabo commentedon Jul 20, 2017
jaswanthm commentedon Sep 1, 2017
The instant app config requires the app to be separated into 3 modules
Now, since we moved the code from application -> feature module, Android Annotations is not working at all.
I am having the same issue. If someone could help, it would be great.
So the question again : Is there an android annotations version which supports instant app ?
WonderCsabo commentedon Oct 30, 2017
@jaswanthm AndroidAnnotations fully support library projects. Please try to configure these as library projects.
mrhabibi commentedon Apr 3, 2018
Hi, I've followed google's instructions with example project to learn migrating ordinary project to instant-apps project, here's the link: https://codelabs.developers.google.com/codelabs/android-instant-apps
And it works fine.
But when I add AA dependency and kotlin in
build.gradle:And adding a simple annotation
@EViewin one of its classes, it won't compile, it says:I've been struggling for days and got stuck, actually I have other project that uses AA too and get the same problem, can anyone help me with this? Thanks.
ManuelSchmitzberger commentedon Oct 24, 2018
I'm currently working on Android instant apps by using the android-topeka example project.
Everything works as expected, after I'm using AndroidAnnotations on my Activity:
If I want to start the application(
:installed) one, everything works, but for the instant-app(:instant), I get the following error:Additional Info:
dodgex commentedon Oct 24, 2018
@ManuelSchmitzberger this only happens when AndroidAnnotations is added to the project? Looks strange to me, as from what you have posted as errors I'm not sure how AA could be involved in the issue. 🤔
dodgex commentedon Oct 24, 2018
Can you provide an up to date demo project (ready for AS 3.2.1 and latest tooles)? then I can try to check what is worng or needs to be done.
ManuelSchmitzberger commentedon Oct 24, 2018
@dodgex Thx for your response!
yes.
Here you can download the project setup.
How you can reproduce:
@EActivity(resName = "activity_start")annotation to theStartActivityclass (base-project)android:name="com.test.StartActivity"toandroid:name="com.test.StartActivity_"in the Manifest (also in the base-project)error: The generated com.test2.R class cannot be founddodgex commentedon Oct 25, 2018
@ManuelSchmitzberger not sure how you got to the r class error...
I updated the project to AS 3.2.1 - as requested - and with latest AA i get AndroidManifest cant be found, as mrhabibi posted in april.
i'll see if i find a way to fix the manifest finder issue and see if the build works then.
dodgex commentedon Oct 25, 2018
I think i got a working build with instant app. not yet tested if the result runs, and if it works with split/flavours. so i have to do some more testing and cleanup but i'm confident to get it fully working. :)
dodgex commentedon Oct 26, 2018
@ManuelSchmitzberger can you test for your version of the project configuration if it works with the following config in your
base\build.gradleI migrated my project to gradle build plugin 3.2.1 and after fixing the Manifest Finder issues i got the
error: The generated com.test2.R class cannot be founderror but the given option fixed it for me. :)ManuelSchmitzberger commentedon Oct 29, 2018
@dodgex Thank you very much! It's so strange, I've tested that several times and now it seems to work.
you saved my day!