I am getting a new errors and a warning after that for the same application!
Some general advices for those warnings:
These errors look like you can solve them by choosing project > clean from the menu or simply by restarting eclipse (please try both). Also have a look at AndroidManifest.xml.
There should be lines which looks something like this:
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
Set minSdkVersion to an API level you want to support at least. Nowadays, this is API level 8 in most cases, if you want to support very old devices, set it to 4 or something. targetSdkVersion should be set to the android version of your test device you use for development. Also, be aware you need to download the matching sdk (in this case API level 18) through Android SDK Manager which you can find in the Window menu entry of eclipse.
Make sure you have The correct build target set in eclipse: right click project > properties > Android > Project Build Target should have a correct check.
Related
I am trying to run the app on my Android 10 device from the Android Studio and the following error is shown -
10/17 09:16:05: Launching 'app' on Physical Device.
Installation did not succeed.
The application could not be installed: INSTALL_FAILED_OLDER_SDK
List of apks:
[0] 'C:\Users\WELCOME\AndroidStudioProjects\BottomNav2\app\build\outputs\apk\debug\app-debug.apk'
The application's minSdkVersion is newer than the device API level.
Retry
I think I have to change the minSdk value, but in which file and how to do it?
The device you are using has lesser API than minimum required API set by you. So, either you can create another physical device with API 30, or you can create another project with lesser API.
If you wish to change it in the already existing project, you can go to build:gradle(app). There under default config, you will find minSDKVersion, you can change it from there and then sync project with gradle files. You will see the sync button on top right of the editor after making changes.
hi sir hope you are right. I am working on app that contain fingerprint feature in it at one point and which fingerprint sdk i enabled its min minSdkVersion is 23 and i want to allow this app to run on all devices when i changed minSdkVersion to 16 then its not running. here is the error mesage below which it shows
Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 23 declared in library [me.aflak.libraries:fingerprint:2.5.3] C:\Users\Zahid Iqbal\.gradle\caches\transforms-2\files-2.1\0f64be97807f594934240311bd0e96bb\jetified-fingerprint-2.5.3\AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 23,
or use tools:overrideLibrary="me.aflak.libraries" to force usage (may lead to runtime failures)
here is he manifest for the jetified-fingerprint
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.aflak.libraries"
android:versionCode="37"
android:versionName="2.5.3">
<uses-sdk
android:minSdkVersion="23"
android:targetSdkVersion="27" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
You can't use a library with minimum Sdk version above your own minimum Sdk version. Omar Aflak (https://github.com/OmarAflak/Fingerprint) uses minSDK 23 in his library. You have to raise your minimum version or use another library.
I just read in this article https://jaxenter.de/fingerprint-sensor-in-android-das-muessen-entwickler-wissen-36481 (sorry, it's german) that fingerprint support was added in SDK 23 (Marshmallow Android). So you do not even need to support older versions.
Maybe this can help you further Run app with higher SDK on lower SDK
Receiving the following message when uploading my latest APK:
You need to use a different version code for your APK because you already have one with version code 1.
I am setting the android:versionCode and android:versionName correctly (in /app/src/main/AndroidManifest.xml):
android:versionCode="2"
android:versionName="1.1"
Also, I am using the same keystore that the project was initialized / originally built with
This is my 5th app and I've never encountered this issue before.
Is there some other place within a typical Android app project that could override the versionCode found in the AndroidManifest.xml file? Or maybe some kind of "de-linter" tool that'll help?
The path names suggest you're using Android Studio. Android Studio is using the Gradle build system. Possibly the build.gradle files specify version name/code that override whatever you set in manifest. So, to change it, edit your build.gradle file(s) and check for overridden versionCode / versionName.
Clean your app. Then save all files and then build
I am currently developing an Android app using cordova 2.0. Obviously the plugins.xml has been depreciated and everything is now housed in config.xml. I was just wondering if anyone has managed to get the Phonegap Screenshot plugin working in Eclipse and Cordova 2.0 working on android.
Plugin can be found:
https://github.com/josemando/phonegap-plugins/tree/master/Android/Screenshot
I have added:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
to my Android manifest xml. And made sure that:
<plugin name="Screenshot" value="org.apache.cordova.Screenshot"/>
is added to my config.xml (that now contains all plugin information from plugin.xml)
Screenshot.js is added to the directory:
assets/www/js/
However I am unsure where exactly to place the Screenshot.java file. The example has it in:
src / org / apache / cordova /
However as I did not have this directory I simply placed it in:
src/uk.co..appname1.appname2/
When I did this however it produced errors, the first one being:
The declared package "org.apache.cordova" does not match the expected package "uk.co.mysitename.appname1.appname2" Screenshot.java /Project Name/src/uk/co/mysitename/appname1/appname2line 8 Java Problem
This refers to this line in the Screenshot.js:
package org.apache.cordova;
The two suggested actions to fix this are to:
Move 'Screenshot.java' to package 'org.apache.cordova' (this directory doesn't exsist atm)
Or change package directory to 'uk.co.mysitename.appname1.appname2'
The second error says:
The method run() of type new Runnable(){} must override a superclass method
The suggested action for this being to "remove '#override' annotation"
I have tried to do every possible combination of these however I cannot seem to make progress and get it all to link up. Usually because it thinks that CordovaRef isn't referenced. I am unsure if the plugin even works on Cordova 2.0.0. I have some experience with Phonegap/Cordova but only in ios with Xcode and Objective C plugins. I am new to Java, Eclipse and Android. Any help or clarification on any of these matters would be greatly appreciated.
Answer resolved by:
Phonegap Screenshot plugin in Cordova 2.0.0
Answer/solution provided by Simon MacDonald
I'm trying to add admob into my app but i'm not having much luck.
I'm following the examples in the tutorial and using the XML method to create the banner. Everything seems to work fine and compile without error except for 1 part... (when I try to declare the activity in the manifest.)
Here is the entry i'm attempting:
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
and here is the error i'm getting:
error: Error: String types not allowed (at 'configChanges' with value
'keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize').
In addition to this, if I attempt a clean and build with this entry present in the manifest, the R.file disappears and won't come back. I'm puzzled. I'm not very knowledgeable yet but i'm wondering if this error has something to do with an outdated syntax. The entry is copied word for word, but eclipse seems to be saying it doesn't know how to read it? Thoughts?
The newest AdMob jar requires being build against the 13 SDK. I added this to the manifest
<uses-sdk
android:maxSdkVersion="13"
android:minSdkVersion="8"
android:targetSdkVersion="13" />
You'll get a warning in the manifest that the minSdkVersion is less than the targetSdkVersion, but I haven't seen that cause any issues.
You also need to change the line in default.properties or project.properties to
target=android-13
Hope this helps.