PropertyInfo.getName() ... and many other methods cannot be resolved - android

Here is a screenshot of my Project:
The lines hidden behind the error window are:
pi.setValue(namePart);
pi.setType(Integer.class);
as you can see I have included the ksoap-j2se-full-2.1.2.jar and also all the imports are in place.
Still pi.setName(""); (and all the ones below it) is giving resolution error! apparently no such method exists in class PropertyInfo... I have already googled this and no one else seems to have any such problem anywhere on the Net or on StackOVerflow! Please help I'm stuck at the very starting point of learning Ksoap and Web Services!

Seems like you are using ksoap2-j2se library which is wrong. You need to use ksoap2-android library in order to get it work.

Related

"cannot resolve symbol" 'show'

I'm a starting Android Studio user and have searched almost everywhere to find the answer to this problem but it seems i'm the only one with is problem. For some weird reason my android studio doesn't recognize the symbol 'show'.
If anybody thinks he knows the answer please react. I'm really struggeling with this.
Thanks
You should bring your writing code to a method. You should understand that :
- One package can contain many classes
- One class can contain many methods
- One method can contain many code statements
If you dont know about class, method, learn them first

How to use jcabi-aspects Loggable annotation in android?

I'm trying to keep track of the entire app flow so I figured using the Loggable annotation on every single method in my code would do the job.
My issue is that I can't seem to understand how to setup form scratch the Loggable option, including(to my limited understanding of it):
Importing all dependencies with gradle
Configuring the log4j properties , from inside the code or from a file
Using a PackageInfo class to log all methods in my project
A while ago I played around with Gradle and Android SDK in connection with AspectJ in order to help another user. Maybe you want to check this answer.
P.S.: Your question is very general, so my answer is too. This is StackOverflow, please show some code and/or configuration. Give the community a concrete problem to solve and make your own problem reproducible, ideally via an SSCCE.

Mobclix ADs inside Unity3D

I have lost much time solving this problem, and looks like I'm back at the beginning.
I want to run the full screen ADs from the Mobclix inside my Unity3D game. I found many tutorials but I can't get any of them working.
As far as I know, there are 2 approaches:
1.) extending unity player
2.) make JAVA side method for showing the AD's and just call it from the unity(c#)
Most important for me is to make it work, but I would prefer 2. approach.
Can somebody suggest me something and maybe give some hints/examples what am I missing?
I tried both ways. I made an JAVA plugin but when I try to call a method nothing happens or I got an error from JNI something like: "can't find that method", my manifest is not configured correctly, or my app crashes.
If I'm making a plugin (not extending UnityPlayer) do I need to add something to the manifest to support my activity/make my class able to call inside unity? How would the manifest look like? Can it be done that way?
If I'm extending the UnityPlayer how would mthe anifest file looks like and how can I call my method for that will show ADs?
I tried to call java/android methods from the unity/c# and that worked, but when I try to call my own simple method from the plugin it won't work. Looks like I'm missing something in that part. (connecting the JAVA plugin and the unity3d)
I'm experienced in the C#, but my JAVA knowledge is really at the minimum. I'm sure this can work (there are people that are selling solutions) but looks like I'm not smart enough and keep missing something :)
I tried many things, I stopped counting and deleted most of them. Can somebody tell me the right way to do this? A working example would be really useful...
Thanks for taking the time to read all of this, I hope there will be some useful responses because I'm starting to get depressed :)
Unfortunately, it looks like the absolute easiest way is to purchase a plugin, made just for this. I found one here, which costs $50, and it specifically stated it supports fullscreen Mobclix ads.
There is a free one developed by the staff at Unity3D forums, however, it seems more complex, in that you must run it on the actual android device, and I am not sure if it supports full screen. You can find the discussion thread here.
Hope these links helped!
Edit: I found a much more affordable £6.00 Unity3D plugin, which you can get here. It did not explicitly state support for fullscreen, however.
Note: I found a tutorial from the very same website that offers the £6 plugin. This tutorial might be worth checking into, however it involves compiling your own Unity Android plugin. Because it is from the same website, it may be worth checking into. It is specifically a plugin to display Mobclix ads on a Unity3D for Android app.

PhoneGap BarcodeScanner - ClassNotFound

UPDATE 2
I posted an answer that fixes my original problem. See that for more information.
UPDATE
FYI for anyone wondering, in the end I found this: http://github.com/commonsguy/zxingdemo/tree/master Exactly what I needed to get it rolling was a simple demo that worked! Also, thanks to Sean for pointing me in the right direction for my googling.
I am currently trying to build a simple android app that can scan in a barcode. I have looked through multiple tutorials, tried everything to a T, and re-tried and re-tried. Nothing worked. So now I am going to ask for assistance to see where I went wrong.
To list the tutorials I have followed:
https://github.com/phonegap/phonegap-plugins/tree/master/Android/BarcodeScanner
Tried this one first.
http://www.mobiledevelopersolutions.com/home/start/twominutetutorials/tmt3
http://simonmacdonald.blogspot.com/2011/12/installing-barcode-plugin-for-phonegap.html
Plus a couple others, but more or less hit the point to the same process. Some key points, when I add the LibraryProject to my project as a Library, the app will not compile until I create an AndroidManifest.xml I tried using the one found in the LibraryProject and tried creating a bare mininmal one, both would allow to compile, but the app ForceCloses.
When I load up the App and click "Scan" it ForceCloses and in the debug log of LogCat in Eclipse I get:
java.lang.RuntimeException: Unable to instantiate activity
ComponentInfo{com.myapp/com.google.zxing.client.android.CaptureActivity}: java.lang.ClassNotFoundException:
com.google.com.zxing.client.android.CaptureActivity in loader dalvik.system.PathClassLoader[/data/app/com.myapp-1.apk]
I have tried googling, found a few issues, but no real clear or solid answers, most just point to the tutorials above. I am not sure if the tutorials are just outdated or I am being stupid and am missing something key. Been working on this for a few days now and am at my wits end.
If you can help I would appreciate it. To avoid answers regarding if I have done X or X, here is what I have done.
When I test the application, I do briefly see it trying to load BarcodeScanner, but right after I see that it ForceCloses. I am not sure what I am missing, but for references I will post the code I currently have setup to test:
AndroidManifest.xml - http://pastebin.com/qq9q0ZU7
Plugins.xml - http://pastebin.com/dZ5eKPSU
index.html - http://pastebin.com/wvht4ken
If I need to post any other items let me know.
On Android, it is much much simpler than all this you're trying to do. Throw this out and restart from http://code.google.com/p/zxing/wiki/ScanningViaIntent
Ok, so for anyone having this problem, you have two choices. You can use the ScanningViaIntent, as Sean pointed out. It works great, if you need an example look at CommonsGuy. As for the tutorials I posted above to get this working with PhoneGap, my whole problem was, after I imported the LibraryProject I did not go back through and add the files. I am not sure if a setting in my Eclipse is bad. But I basically just right clicked on the LibraryProject, went to Import -> File Structure -> Library Project's original project path, and loaded all of it back in there.
There is probably something wrong with my Eclipse setup, but yea. I now have the BarcodeScanner plugin for PhoneGap working!

Does UCDetector work for android projects?

I've got an android project that I started from an old standard Java project, so because of the vast difference in target platform, I have a lot of dead code to cleanup.
I've seen UCDetector recommended for finding unused public methods in java projects in Eclipse. I installed it as directed, and it just doesn't show up on the menu, and I have no idea how to get it to work.
Has anyone got this combo to work, or have another recommendation? Or know how to get it to show up?
(I've tried Find Bugs which found some good stuff, but it doesn't find unused public code.)
Big warning!
It might partially work, but beware, cause it doesn't seem to know about XML-defined callback functions.
If you have installed a callback function on a widget, say a button in an XML Style Sheet, and it is not called in code, UCdetector will think it has 0 references, and suggest it deleted. This obviously is wrong, and will render your code uncompilable.
There might be other similar issues, related to Android specifics.
Viggo
Yes, UCDetector works for android projects. I just installed it and it works.
It's available in context menu of project in Package Explorer.

Categories

Resources