Android Question Inline Java

ykucuk

Well-Known Member
Licensed User
Longtime User
Hello,

i am trying work with AdditionalJar

everyhing is fine until write below code to inside

#If JAVA

import android.app.enterprise.license.EnterpriseLicenseManager;


end if


mContext = this.getApplicationContext();
mLicenseMgr = EnterpriseLicenseManager.getInstance(mContext);
String key = "XXXXXXXXX" ;
mLicenseMgr.activateLicense(key);

i got error :


javac 1.7.0_65
src\b4a\example\main.java:492: error: cannot find symbol
mContext = this.getApplicationContext();
^
symbol: variable mContext
location: class main
1 error


i am sure there is something about java syntax or something else

can anyone help me about write exact code to inside Inline Java

best regards
 

ykucuk

Well-Known Member
Licensed User
Longtime User
there is # before end if. i just didnt copy as well . it s not solution for my problem
 
Upvote 0

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
well after that, the cannot find symbol and the compiler stating that the problem is the word "mContext", either you forgot the declare it, or if you declare it elsewhere it is private.
 
Upvote 0

ykucuk

Well-Known Member
Licensed User
Longtime User
same error

javac 1.7.0_65
src\b4a\example\main.java:490: error: cannot find symbol
Context mContext = this.getApplicationContext();
^
symbol: class Context
location: class main
1 error
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…