Y ykucuk Well-Known Member Licensed User Longtime User Jul 31, 2015 #1 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
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
EnriqueGonzalez Expert Licensed User Longtime User Jul 31, 2015 #2 the end if should begin with # too... Upvote 0
Y ykucuk Well-Known Member Licensed User Longtime User Jul 31, 2015 #3 there is # before end if. i just didnt copy as well . it s not solution for my problem Upvote 0
EnriqueGonzalez Expert Licensed User Longtime User Jul 31, 2015 #4 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
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.
Y ykucuk Well-Known Member Licensed User Longtime User Jul 31, 2015 #5 how can i declare mcontext in this java code. i am not familiar with java Upvote 0
warwound Expert Licensed User Longtime User Aug 1, 2015 #6 Try: Code: Copy Context mContext = this.getApplicationContext(); Upvote 0
Y ykucuk Well-Known Member Licensed User Longtime User Aug 1, 2015 #7 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
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
warwound Expert Licensed User Longtime User Aug 2, 2015 #8 Try adding an import for the Context class: Code: Copy import android.content.Context; Upvote 0