Expand my Community achievements bar.

Announcement: Adobe Analytics Mentorship Program 2023! Join now to prepare to get an Adobe Analytics certification with an expert mentor!
SOLVED

Mobile SDK - Android - Problem while importing SDK

Avatar

Level 2

I am trying to implement mobile sdk on android, basically following the standard steps 
1. Created an empty activity in android studio with Java 
2. Created mobile property in launch

3. Copied the dependencies and pasted in gradle

4. Copied and pasted the import code. 

 

Issue i am facing is the Lifecycle, Signal and few others are showing as red when trying to import, and error says cannot resolve symbol. MicrosoftTeams-image (9).pngMicrosoftTeams-image (8).png

SirishKaushik_0-1672731448168.png

 

1 Accepted Solution

Avatar

Correct answer by
Level 2

Hey, @V_Sirish_Kaushik, I think this could be a temp issue; I tried a build using my test app with a similar configuration, and I didn't get any errors. Can you check if your file is importing the right BuildConfig class? Sometimes if you have other project libraries or modules, it may import the wrong buildConfig or try - 

Build -> Clean Project;

File -> Invalidate Caches / Restart...

Build -> Rebuild Project

2 Replies

Avatar

Correct answer by
Level 2

Hey, @V_Sirish_Kaushik, I think this could be a temp issue; I tried a build using my test app with a similar configuration, and I didn't get any errors. Can you check if your file is importing the right BuildConfig class? Sometimes if you have other project libraries or modules, it may import the wrong buildConfig or try - 

Build -> Clean Project;

File -> Invalidate Caches / Restart...

Build -> Rebuild Project

Avatar

Level 2

Hi @f_husain , 
Yeah it did seem like a temporary issue. Invalidating cache and restarting made it work. Thanks 🙂