I am wandering if building a Flutter app with different java versions make any difference. Could the version influence if the app crashes or not in an old device, for example?
Generally, It won't effect anything. However, if you're using some plugin/package that require specific java version, it might cause a problem. If your app crashes, read the log and see if it is caused by a package/plugin and if so, that particular package might need a specific version.
Related
I've installed and set up Java JDK 17 as well as Android SDK (the manual way) on my Ubuntu 22.04.
From there, is it possible to develop an Android application in Java WITHOUT Android Studio ?
Developing through the command line or through a light IDE is fine by me, but there are very few guidance and information out there.
Thanks to enlighten me.
Sure you can! You'll need to type an awful lot of stuff though, that Android Studio does for you automatically:
You'll need to create gradle files to build your project, you'll need to create an Android manifest to describe your Android components and your app (permissions, themes, target SDK, etc.).
You'll need to create the code files containing your Android components (Activity, Fragment, Service, BroadcastReceiver, etc.). You'll need to create all your UI definition files in XML (layouts and other resources).
Then you can use gradle on the command line to run all the necessary preprocessors, code generators, compilers, linkers, resource builders and package builders to give you an APK which you can then install on your device for testing. And you can debug by writing lots of stuff to the logs and using adb commands to get the logcat off the device to see the log messages, exceptions and stack traces.
I want to develop usb application with usb4java for Android device. I'm using Android Studio as an IDE and Ubuntu 14.04 as an operating system. I have added usb4java-1.2.0 file to my project. I can use Libusb function in my application. Firstly I wrote LibUsb.init() function in my MainActivity but there is an error about native library. I'm getting classloader exception.
Caused by: org.usb4java.LoaderException: Native library not found in classpath: /org/usb4java/linux-armv7l/libusb4java.so
I have analyzed Unsupported Platform tag in http://usb4java.org/nativelibs.html website. But I couldn't solve my problem with this way. After that I read https://github.com/usb4java/libusb4java and again I couldn't solve my problem with this way. Can you help me please.
The problem you're seeing is that LibUsb is trying to find the .so file, rather using the android load library calls. So you'll need to edit that. After that it may or may not work. But it would probably be smarter to use the USB functionality built into Android rather than a lower level library trying to use the Linux OS underneath it- it might not work at all, or may have unusual bugs due to interacting with Android.
I was trying to run an application on my phone, when I got this error:
"This application caused an error and may not function correctly.
java.lang.NoClassDefFound
Error:
com/nokia/mid/ui/lcdui/DisplayStateListener"
Can anyone tell me how can I fix this error?
I am a noob to Java and I have just started learning it at my school. Basically, I am working to make an application compatible with my phone. I will be really grateful to you if you could guide me on how can I proceed.
Here is the link to the file: http://msoft9.com/site_down-java-apps.xhtml?get-file=1648
It looks like the application is using the socalled NokiaUI API.
This is a rather old API developed by Nokia containing User-Interface functionality for various things, such as keeping the screen alive or making the MIDlet use the whole screen (FullScreen). It was developed in the MIDP1.0 days before things like FullScreen became possible in MIDP2.0
I'm guessing that DisplayStateListener is a class in NokiaUI.
Your phone apparently doesn't support NokiaUI. Not all phones does. It is supported by other brands than Nokia though. I know that Sony Ericsson phones support the NokiaUI API.
Even today NokiaUI is still used by JavaME developers, because it is (surprisingly/sadly) still the only way to keep the screen alive. But mostly you won't notice it is used, because developers naturally use a try/catch block to utilize it.
That's obviously not what the developers has done in your case.
But you can probably find another version of the MIDlet that doesn't use NokiaUI.
More about NokiaUI API:
http://developer.nokia.com/community/wiki/Nokia_UI_API
I want to use ProGuard to obfuscate my app (using Eclipse). Unfortunately ProGuard is only enabled when exporting the release version. Is there any way to test the proguarded build on the development machine since I don't own an android device? I use a lot of native code etc., so I want to get sure nothing essential gets optimized away.
Thank you
I have written an app that appears to work faultlessly on android 2.3. I have just been told by email that my app crashes (immediately on startup) on android 3.0 tablets. Unfortunately I do not have access to such a device.
To try and make my app as crashproof as possible I have been employing Lint and FindBugs. My program does use more than one thread and Findbug reports several instance of "Inconsistent synchronization" because different threads may be reading certain data at the same time. I beleive this not to be a problem because at the times the data is being read it should not be in the process of being altered. It occurs to me though that perhaps android 3.0 has some built-in detection of such instances?
I am interested in any other thoughts on what kind of things would cause a program to work on 2.3 but not on 3.0.
I had a similar problem with an app.
My issue was due to the introduction of a new exception when I attempt to perform a networking operation on the main UI thread.
Please refer to How to fix android.os.NetworkOnMainThreadException? to have more explanation.
I also used the Android emulator with the Android 3.0 API to reproduce the bug.