cookie-information / android-release

0 stars 3 forks source link

[question] error: cannot find symbol findViewById(R.id.display_always).setOnClickListener(v -> ((MyApplication) getApplication()).getSdk() #52

Closed StefanZivkovic closed 4 months ago

StefanZivkovic commented 5 months ago

I am trying to copy/paste MainActivity from android-release->javasample to my MainActivity.java. But i am having issues with

error: cannot find symbol
        findViewById(R.id.display_always).setOnClickListener(v -> ((MyApplication) getApplication()).getSdk()
                      ^
  symbol:   variable id
  location: class R

I am also having issues for rest of R.id.display_if_needed, R.id.reset_all_consents and R.id.get_with_type. Somehow with setContentView(R.layout.activity_main); i dont have issue.

We are actually building app with capacitor, and maybe what i am trying to achieve is not possible, but i was curious if I could work-around this, somehow.

Also, do i need to provide something else from cookie-information - template or something which is related to this and which is might required for this to work? Also at the moment i still use some dummy clientId, clientSecret and solutionId.