ThomasSechak
Aspiring developer
Profile
Posts: 59
Reg: Jul 10, 2011
Charlottsville
10,690
04/23/14 08:03 PM (10 years ago)

Eclipse Warnings and Errors

I have a new app that got approved on the Apple App Store a week ago and am working on converting it to a Android App now. I am new to android dev but have read a lot of instructions. I have downloaded and installed the Android Developer Tools package bundled with Eclipse so it had everything installed. I followed the instructions to enable Google Play Services and the latest version of the SDK. // Particularly I followed the instructions by Mark Fleming which was a great video at this link: http://www.youtube.com/watch?v=UgurXKgP2AE but I modified the version of the SDK chosen with the new one mentioned in the read me pdf file downloaded with the project. The problem that is happening is that there are 3 error and 15 warnings. This prevents it from working at all, even in a simulator. The errors have been talked about on this forum. But the solutions do not seem to fix the problems. The three errors are happening in the BT_screen_customHTML.java file and the BT_screen_customURL.java file. The error is the same for both "The method setPluginsEnabled(boolean) is undefined for the type WebSettings" I tried commenting out the lines of the two errors as was mentioned in at least one thread in the forum and it made those errors go away. But this made another problem come up. "Override cannot be resolved to a type" There are also a bunch of warnings. I am not sure what to do. Are the latest Buzz Touch projects compatible with the latest android SDK 19. I have a screen shot attached to this post showing the errors, with my folder structure open so you can see hopefully as much as needed for some advice. Screenshot link: http://synchronicity.org/images/apps/Eclipse-Error-Android-API-19.JPG Thanks
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
04/23/14 09:36 PM (10 years ago)
Howdy, For the Warnings, you can ignore them. They're simply saying there's some old code in the project, and they'd prefer you use newer methods and stuff. Everything should still work though. You shouldn't have to comment out any code for those couple of plugins to get things to work. I did notice that "@Override" was missing the trailing e in your image. That might take care of some part of it. Then try a Project > Clean, clean all projects, and see if that helps. Mark
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
04/23/14 09:43 PM (10 years ago)
You should enable line numbers. It'll come in handy later. And not much later. Window -> Preferences -> General -> Editors -> Text Editors -> Show line numbers You can also 'right click in the gutter' to accomplish the same thing. 'Override' is misspelled in the image. That will help slightly, but not everything. Above that, just under 'setPluginsEnabled' you have 'setWebViewClient(new WebViewClient(){' that seems like it is hanging as well. It would look a little better if it looked like '…setWebViewClient(new WebViewClient());' If you're not using the BT_screen_customURL or BT_screen_customHTML then you might be better off removing them from the project. But if you need to use them, then the errors need to go. The warnings are a bit annoying, but they're not deal breakers. The errors are. Clean up those issues, and see what's left. If it still causes a problem, let us know. Cheers! -- Smug
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
04/24/14 02:26 AM (10 years ago)
It can be tricky to set up Eclipse the first time, but I'm sure Marks documentation and video's are spot on, he has a great reputation for these. I'm intrigued by one of your comments "but I modified the version of the SDK chosen with the new one mentioned in the read me pdf file downloaded with the project. " I don't know the answer, but I can suggest a good course of action to help you get there is to make sure Eclipse is working and set up correctly. First, I would create the most simple of apps, download it with only the plugins you need and see if it can be compiled by Eclipse. If it can't, it is your Eclipse setup, possibly the google play services library? If you can compile OK, then I'd then repeat the above same app with all possible plugins - this may help you if it's a rogue plugin. Post back and let us know how you got on. Alan
 
ThomasSechak
Aspiring developer
Profile
Posts: 59
Reg: Jul 10, 2011
Charlottsville
10,690
like
04/24/14 05:16 AM (10 years ago)
Thanks everyone. I fixed the spelling of @Override, I must have click backspace without realizing on it. I removed the "commenting out" the line. Now the app had the original two errors as show in the screenshot from my opening post. Based on suggestions and to confirm that my setup is correct. I downloaded a simpler version of the project. Namely I downloaded the same project without the Custom.HTML and CustomURL plug-ins both of which have the errors. Doing so, I was able to run the app fine in the emulator and everything seems to be working as far as I can tell in the simulator. So I think the problem is with those two plug-ins in the latest version of Android. As shown in the screenshot. My app really needs the CustomHTML plug-in, but I could probably get away without the CustomURL plug-in. Though I suppose I could try the HTMLDoc plug-in instead. I tried using the using auto correction suggestions in Eclipse to fix the two errors but nothing that I could work out to use. Any ideas. Thanks again.
 
vtad
Aspiring developer
Profile
Posts: 40
Reg: Nov 17, 2013
Jettingen
8,700
like
04/24/14 05:49 AM (10 years ago)
I have a working Android (and IOS) App using the Menu Image Advanced, Custom HTML / Text and custom URL plugins. But I have the setting Android 4.0 for the google-play-services and the project - I had problems when this was Android 4.4.2 I am using, in SDK, Android 4.0 (Api 14)
 
ThomasSechak
Aspiring developer
Profile
Posts: 59
Reg: Jul 10, 2011
Charlottsville
10,690
like
04/24/14 05:53 AM (10 years ago)
Thanks, I saw someone else or perhaps you mention this in another thread. But I also heard that Android Apps wont get approved unless they are compatible with the latest framework. Is that not true, did you get it approved. And if so will this cause compatibility issues with people using the latest devices or are all devices backwards compatible for apps compiled with an older version of the api.
 
ThomasSechak
Aspiring developer
Profile
Posts: 59
Reg: Jul 10, 2011
Charlottsville
10,690
like
04/24/14 05:55 AM (10 years ago)
..
 
ThomasSechak
Aspiring developer
Profile
Posts: 59
Reg: Jul 10, 2011
Charlottsville
10,690
like
04/24/14 05:59 AM (10 years ago)
..
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
04/24/14 06:08 AM (10 years ago)
just "by the way". when you post in a topic, and you don't 'leave' the page before you refresh, it'll keep posting over and over. Don't sweat it; we've all done it. But that's what is happening. Cheers! -- Smug
 
ThomasSechak
Aspiring developer
Profile
Posts: 59
Reg: Jul 10, 2011
Charlottsville
10,690
like
04/24/14 06:16 AM (10 years ago)
Thanks.
 
vtad
Aspiring developer
Profile
Posts: 40
Reg: Nov 17, 2013
Jettingen
8,700
like
04/24/14 06:28 AM (10 years ago)
>>But I also heard that Android Apps wont get approved unless they are compatible with the latest framework. Is that not true, did you get it approved. I got my App (Fit4Trading) approved 2 weeks ago. I found no compatibility problems with Android 4+ - I used Genymotion to test 4.4 and 4.0 Devices and sony xperia with 4.1.2
 
ThomasSechak
Aspiring developer
Profile
Posts: 59
Reg: Jul 10, 2011
Charlottsville
10,690
like
04/24/14 06:32 AM (10 years ago)
Ok, thanks. That may be the solution then until the CustomHTML and CustomURL plug-ins are fixed. I will try it out.
 
vtad
Aspiring developer
Profile
Posts: 40
Reg: Nov 17, 2013
Jettingen
8,700
like
04/24/14 06:42 AM (10 years ago)
>>But I also heard that Android Apps wont get approved unless they are compatible with the latest framework. Is that not true, did you get it approved. I got my App (Fit4Trading) approved 2 weeks ago. I found no compatibility problems with Android 4+ - I used Genymotion to test 4.4 and 4.0 Devices and sony xperia with 4.1.2
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
04/24/14 07:23 AM (10 years ago)
I have an app on Android that I published yesterday is compatible with Android 2.2 / API 8, using BT 2.0. I also have one with BT 3.0 using API 14. And I use the plugins that are giving you trouble. I'm happy to be corrected here, but I think that and app that runs on a 'lower' version of Android ought to be be compatible with the latest. So I always set my Android SDK to be the lowest number I can get away with, not the highest. If you are using BT 3.0, try Android 4.0 or the next highest (4.03?). That on its own might eliminate your errors.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
04/24/14 09:29 AM (10 years ago)
@AlanMac is correct in everything he said above. And Google has no "compatible with latest framework" rule that I'm aware of. The only limitation in not making it compatible with the latest is that you eliminate a potential pool of users. But there's nothing to prevent you from doing that if you choose. I'm still concerned as to why any errors are showing up for those plugins at all. I downloaded a new package yesterday that included those plugins, and didn't have any issues. Mark
 
kingelessar
Lost but trying
Profile
Posts: 155
Reg: Mar 10, 2014
UK
6,500
like
04/25/14 08:47 AM (10 years ago)
I'm also getting the same error in the BT_screen_customURL.java in Eclipse. I haven't tried using 4.0 instead of the latest SDK version but certainly looks like there might be an issue. "The method setPluginsEnabled(boolean)is undefined for the type WebSettings"
 
ThomasSechak
Aspiring developer
Profile
Posts: 59
Reg: Jul 10, 2011
Charlottsville
10,690
like
04/25/14 05:30 PM (10 years ago)
Thanks for all the help. I suppose in the mean time I will use an earlier version. Which seems to be perfect. I tired several versions back to use the most recent version that does not make the errors appear. The problem seems to happen beginning with api version 18 and up. It seems to be in both BT_screen_customURL and BT_screen_customHTML and perhaps other things. Again thanks for the help.
 
kingelessar
Lost but trying
Profile
Posts: 155
Reg: Mar 10, 2014
UK
6,500
like
04/29/14 08:13 AM (10 years ago)
By the way, I'm also seeing this error with smug's html android plugin in SW_androidHTML.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.