Expand my Community achievements bar.

Join us for our next community Coffee Break on February 28th! Four of our Analytics Champions will be joining us to discuss Summit tips, best practices, and any of your Analytics questions!
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 3

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

View solution in original post

2 Replies

Avatar

Correct answer by
Level 3

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