I want to add flutter_sound_lite to my application, Currently my Android API level is 16 and iOS target is 9.0
Flutter Sound requires an iOS 10.0 SDK and Android API level 21
I want to keep my API level (16) and iOS target(9.0), and add Flutter Sound too, just don't use it on old devices, How can I do it?
For android I add the following line in manifest
<uses-sdk tools:overrideLibrary="com.dooboolab.fluttersound, com.dooboolab.TauEngine" />
But in android log cat I have error
04-17 10:27:08.182 2973-2973/ir.karget E/dalvikvm: Could not find class 'android.media.AudioAttributes$Builder', referenced from method androidx.core.app.NotificationCompat$Builder.setSound
Related
Background
I'm working to make my app supporting 2.3.3 version (Api level 10), but i got the below error.
Log
Could not find class 'android.app.Notification$Builder', referenced from method
com.google.android.gms.common.GooglePlayServicesUtil.showErrorNotification
Notification.Builder was added in API level 11. For earlier versions, NotificationCompat.Builder should be used instead.
Since the error comes from Google Play Services, use google_play_services_froyo instead of google_play_services for pre-11 targets.
This is a Marmalade based question
I am building my android extension which is using symbols added in API level 16 and above.
When building it I get the "cannot find Symbol" error for those new classes.
How do i tell the MKB to take the set the new API level as the target sdk when building an extension
running following command
mkb AndroidNotification_android_java.mkb --rebuild
and i get
if (currentapiVersion >= android.os.Build.VERSION_CODES.JELLY_BEAN){
^
../source/android/C2DMReceiver.java:216: cannot find symbol
You'll have to change target API level from Android Manifest.xml file Make the target at highest API level available (currently 19)
Some Java library methods like DecimalFormat.setRoundingMode have a #since 1.6 entry in their documentation.
/**
...
* #since 1.6
*/
public void setRoundingMode(RoundingMode roundingMode) {
...
}
When I tried to use this method compiled under Android 4.2.2 and JDK 1.6 with my android:minSdkVersion set to 7 as shown,
myNumberFormat.setRoundingMode(RoundingMode.DOWN);
Android Lint underlined setRoundingMode in red for me and told me that
Call requires API level 9 (current min is 7): java.text.NumberFormat#setRoundingMode
How and why can the Android API restrict which Java library methods I can and cannot use? I cleaned my project and the Lint error disappeared. My project compiled with no errors and ran on a device running Android 2.2.3 (API 8).
My program crashed with:
05-09 11:32:38.436: E/AndroidRuntime(2074): Caused by: java.lang.NoSuchMethodError: java.text.NumberFormat.setRoundingMode
The Android documentation confirms that setRoundingMode, copySign, and others were added in API level 9. Does that mean that devices running Android OS level 8 and below are specifically compiled/built with JDK 1.5?
And I can understand that. But is it impossible for the Android Support Library (or anything else) to allow us to use these methods?
Related to Rounding Half Up with Decimal Format in Android
I am trying to run the Arduino ADK + Android examples (analogRead, digitalWrite, etc.) But I am getting the following compile error:
-compile:
[javac] Compiling 3 source files to C:\Users\???\AppData\Local\Temp\android7678598093798196219sketch\bin\classes
[javac] C:\Users\???\AppData\Local\Temp\android7678598093798196219sketch\src\processing\android\test\adk_analogRead.java:28: cannot access com.android.future.usb.UsbAccessory
[javac] class file for com.android.future.usb.UsbAccessory not found
[javac] arduino.connect( arduino.list()[0] );
[javac] ^
[javac] 1 error
I did some research and found this 9 months old post - http://forum.processing.org/topic/how-can-you-specify-the-target-api-level - where it talks about recompile Processing from source. However, I'm using version 2.0a5 and the team has already changed the source to use API level 10. (I also verified the generated code when I look inside the manifest xml file in temp folder.) Any idea how to fix this?
Just in case, I've successfully compiled and ran regular Processing app and deployed to Android (Nexus One.)
I think you need to use Google Android Api 3.1+
To use ADK, you can use API Level 10, but it needs to have the Google APIs attached (same thing you need to use Maps in your application).
If you're having trouble enabling the Google APIs, try switching to API level 12, where you no longer need the addon. However you'll now be using the android.hardware.usb library instead of com.android.future.usb.
Here's what I did to get the ArduinoAdkUsb examples to compile:
In Processing, switch to Android Mode
In Processing, go to Android -> SDK Manager
In SDK Manager, install Android 2.3.3 (API 10) -> Google APIs if not installed
Copy sdk/add-ons/addon-google_apis-google-10/libs/usb.jar to Processing/libraries/ArduinoAdkUsb/library/
Restart Processing
While running my application i am getting the below given warning and application went force close.
[2011-10-17 12:09:09 - LunarLander] WARNING: Application does not specify an API level requirement!
[2011-10-17 12:09:09 - LunarLander] Device API version is 9 (Android 2.3.1)
How to resolve this. I created another emulator with API level 10, then also i am getting the same error.
I am sure you forget to define the API level inside the AndroidManifest.xml file, define it as:
<uses-sdk android:minSdkVersion="5"
android:maxSdkVersion="10"
android:targetSdkVersion="8"/>
You should define the API level of your application in manifest file. I think you forgot to that. Launch the application according to that.
Just looking at that error you need to specify an API level for your application:
http://developer.android.com/guide/appendix/api-levels.html