i am using this tutorial to make android as a Rest client . The problem which i am facing is "The API level for the selected SDK target does not match the Min SDK Version." while calling the source code which is provided over there .For the other project its working well can support upto SDK 10 . The other query i want to ask is that for org.restlet.jar i have to download it and set a path for it ???
If you're using Eclipse, Adding a JAR file to an Android application may help.
Did you set min-sdk-level higher than target-sdk-level?
Related
I am getting a compile error in the following code in Android Studio.
Path fileName = Path.of("demo.txt");
String content = "hello world !!";
Files.writeString(fileName, content);
String actual = Files.readString(fileName);
As 'writeString' and 'readString' were instroduced in Java 11, my first guess was it has something to do with that.
I'm using the latest version of Android Studio and have Java 11 installed. Used to have Java 8 as well but I have deleted that already. I'm certain it is just some setting issue or some stucked cache stuff as in IntelliJ it works fine.
I have tried:
invalidate cache and restart
removing the .idea and .gradle folders
I also let Adroid Studio to download Java 11 for itself and not using the one specified by me.
Any guesses?
Thanks in advance!
What Java runtime you have installed on your PC is not relevant. The Java app code is compiled using the JRE API from Android.jar of the targetSDK you have selected in build.gradle in your project. And even more important for executing a method it has to be present in the framework.jar installed on the device you execute your app (which is part of the Android OS).
Using latest Android Studio you can use Java 11 code features but the Android API is still not on the same level as Java 11, therefore you can't use Java 11 specific methods.
Please look at the Android Java API documentation of java.nio.Files which API methods you can use in an Android app.
i was trying to update my xamarin.forms via nuget to 4.6.xx i'm currently using 4.2.xx. as i update the xamarin forms, it just update the shared and ios only. the android left behind with the same version (4.2.xx) of xamarin.forms. any idea? thank you.
an error during update appears. see the image below.
Through the message in the console,
Xamarin.Android.Support.Core.Utils 28.0.0.1 needs Xamarin.Android.Support.Loader 28.0.0.1
while
Xamarin.forms 4.0.6.726 needs Xamarin.Android.Support.Loader 28.0.0.3
So update your Xamarin.Android.Support.Core.Utils to version 28.0.0.3 first and then you can update your Xamarin.forms in Android project.
Thanks for the reply Jack Hua, I never had a chance to apply your suggestion because I've manage to update Xamarin.Forms 4.6.xx to my android See Picture. What I did is on Android SDKs and Tools (Platform) tab under Android 10.0.Q, I downloaded Android SDK Platform 29 and Source for Android 29 See Picture. Then in my android project properties. I set my Target Framework to Android 10.0Q See Picture. Lastly, I go to Manage Nugets Packages again then update to Xamarin.Forms 4.6.xx. After a clean and rebuild, it runs smoothly without error See Picture. I think Android 10.0.Q is equal to Android.x.
I am trying to use the code template provided by android in eclipse and I set my min SDK to API 8. I tried to choose the "blank activity with scrollable tab" for using the swipe feature but it wouldn't let me continue and complaining that this code template support version 11 and more.
However, I thought that's why the support library of version 4 is! To support Api 4 and above.
Am I missing the point here or is there something I need to do?
Thank you
Use the android.support.v7 compatibility libraries (which work together with the v4 libraries).
When you create the project in eclipse set the minimum API version to 11 but once the project is created, edit AndroidManifest.xml to set minSDKVersion to 8.
From time to time when building the project, eclipse may complain about min SDK version being required for certain things - in this case just Clean the project and it will build without problems.
I have gotten it to work using ActionBarSherlock and ViewTabPager. Look into those
I would like to change Google API level for my app project in Eclipse. I have seen numerous responses to this question on other forums that state to Right-Click on Project, select Android and edit the API level. However in my version of Eclipse (Classic) the Target API level can not be edited in this way. The box can not be edited.
I have tried the other common method of updating the manifest file but this doesnt seem to work without completing the required step mentioned above.
Any solutions would be very welcome.
Open the Android SDK Manager and download the API of the version that you wanna work on .
Now you can follow the other steps.
I am developing an android application in which i have to implement a full url in android device.I have made the application in android 3.2.Now acc to client requirement he wants the same code to be runned in android 2.1. But its crashing when i try to run the same code in android 2.1 updated 1. I have done r & d and done all the formulas suggested,i have changed the sdk version in the manifest file.Added configuration code in java file,,but still crashing.Is dere any way in which the same app can run on android 2.1 updated 1 .What i think is 2.1 updated 1 does not support tab bars.......if anyone has faced the same issue,,can he guide me
Thanks in advance
Tushar
Follow the bellow link
https://github.com/johannilsson/android-actionbar
It provides the Sample ActionBar(TabBar) which will run on lower versions also.
By using this code into your project only little bit modifications are enough. good luck...