I've researched this pretty thoroughly and so far as I can tell, all that you should have to do is use portions of the Android API the devices you're supporting will recognize, and to specify a version range in your Manifest file. I've done both of these things. (See below these paragraphs for the full Manifest file contents.)
My client has Android version 4.0.4, which should be compatible, but when she tries to download the beta via Google Play, the link says that her device (a Samsung of some sort) is incompatible.
I'm not sure what else I need to do at this point, so any advice will be a huge help.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.osu.expandablelistviewtest1" >
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="Expandable List Test 1"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="Expandable List Test 1" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activities.CoreConversationsActivity"
android:label="Book 2: Core Conversations (ver. 0.1)" >
</activity>
<activity
android:name=".activities.DrillsActivity"
android:label="Book 2: Drills (ver. 0.1)" >
</activity>
<activity
android:name=".activities.StreamAudioActivity"
android:label="Book 2: Streaming Audio (ver. 0.1)" >
</activity>
<activity
android:name=".activities.StreamVideoActivity"
android:label="Book 2: Streaming Video (ver. 0.1)" >
</activity>
</application>
</manifest>
As suggested in comments, the issue was with the build.gradle file. Improbably, Android Studio still doesn't update the following segment on the basis of the information in the Manifest file:
defaultConfig {
applicationId "edu.osu.expandablelistviewtest1"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
In my case, minSdkVersion had been set to 16 rather than 14, leading to issues of compatibility
Related
I'm trying to use the react-native-youtube package to display a youtube video in my app. When I try to render the youtube video to the screen, I get the following popup:
The github README states this:
IMPORTANT! (Android Only): The Android implementation of this component needs to have the official YouTube app installed on the device. Otherwise the user will be prompted to install / activate the app, and an error event will be triggered with SERVICE_MISSING/SERVICE_DISABLED.
First, I am positive that the latest version of the YouTube app is installed on my emulator. Just to note, I tried this on a real Amazon Fire Stick and had the same problem. This link explains that Android 11 requires you to indicate in the AndroidManifest.xml which packages you intend to reference. I have tried all of the recommendations there but have had no success.
Here is my current AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.digitalsignageplayer">
<uses-permission android:name="android.permission.INTERNET" />
<uses-feature android:name="android.hardware.screen.portrait" android:required="false"/>
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
<application
android:name=".MainApplication"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
My compiled and target SDK:
ext {
buildToolsVersion = "29.0.3"
minSdkVersion = 21
compileSdkVersion = 29
targetSdkVersion = 29
ndkVersion = "20.1.5948944"
}
I've upgraded my Android Studio, since this I get an error "AAPT2 error: check logs for details"
In the internet I didn't find a solution.
My androidmanifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ch.workouttracker"
android:versionCode="1"
android:versionName="1.0" >
<!--
The ACCESS_COARSE/FINE_LOCATION permissions are not required to use
Google Maps Android API v2, but you must specify either coarse or fine
location permissions for the 'MyLocation' functionality.
-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_maps_key" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".TrackActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ProfileActivity"
android:label="#string/title_activity_profile" >
</activity>
<activity
android:name=".TrackCardioActivity"
android:label="#string/title_activity_track_cardio">
</activity>
<activity
android:name=".TrackWorkoutActivity"
android:label="#string/title_activity_track_workout" >
</activity>
<activity
android:name=".LogoutActivity"
android:label="#string/title_activity_logout">
</activity>
<activity
android:name=".SettingsActivity"
android:label="#string/title_activity_settings" >
</activity>
<activity
android:name=".DashbordActivity"
android:label="#string/title_activity_dashboard" >
</activity>
<activity
android:name=".CreatePlanActivity"
android:label="#string/title_activity_create_plan" >
</activity>
<activity
android:name=".CreateExerciseActivity"
android:label="#string/title_activity_create_exercise" >
</activity>
<activity
android:name=".EditActivity"
android:label="#string/title_activity_edit" >
</activity>
<activity
android:name=".LoginActivity"
android:label="#string/title_activity_login" >
</activity>
<activity
android:name=".WorkoutDetailActivity"
android:label="#string/title_activity_workout_detail" >
</activity>
<activity
android:name=".PlanDetailActivity"
android:label="#string/title_activity_plan_detail" >
</activity>
<activity android:name=".CalendarActivity" >
</activity>
<activity android:name=".EditExerciseActivity">
</activity>
</application>
</manifest>
I tried a reinstall and downgrad of the android sdk. I deleted .gradle. I set the property android.enableAapt2=false in gradle.properties
What else can I try? What other information do you need?
I ran into this problem a while ago, after updating my Android Studio to the latest version. After searching for a long time, this answer was my savior.
As this answer suggests, the problem might be messed up XML files in your project. You can look for the messed up part by yourself, or run the assembleDebug command in your terminal (like this), which can find the exact line that should be fixed.
Based on Google's documentation:
If you are experiencing issues while using AAPT2, you can disable it by setting android.enableAapt2=false in your gradle.properties file and restarting the Gradle daemon by running ./gradlew --stop from the command line.
When you set the android.enableAapt2=false you have to restart the Gradle daemon.
You should restart the Daemon and then Click on
Also ensure that you are using latest buildToolsVersion
I also got same problem.By changing build.gradle file like as follows i resolved that.
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
}
I also solved the issue as per Paila Khagesh suggestion. I had
compileSdkVersion 26
and
targetSdkVersion 25
After changing targetSdkVersion to 26 and sync gradle error was gone.
Many ways to create this problem! Here is one that we created and had no idea why it happened. By accident we pasted our favorite color.xml file int the styles.xml folder. We had no warning when we did the paste and not while continuing to design the app. BUT when we closed the app and it needed to rebuild when loaded the fun began. We guess the solution might be to build before you close the app or review all your XML files before you build or close better yet LOOK WHERE YOU ARE PASTING
I have made an app which is pre-installed on android device of particular manufacturer. After this I have release an upgrade of application for example initial version 1.0.0.0 to upgrade version of 1.2.0.0. After upgrading the app if user restarts its phone then my application goes to the initial version of 1.0.0.0.
Don't know why this is happening ? Is there a problem in bundling the application to devices ?
Note: I am updating my app via my server and not from play store and this issue is reproducible only when app is pre-installed on devices.
In mainfest file of both the versions I forgot to change android:versionCode value, in both the versions android:versionCode=3. Is it creating problem because of this?
I have also changed the package name of Application class so is this is creating the problem ?
Manifest for first version:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xxx.apps.spinr"
android:versionCode="1"
android:versionName="1.0.0.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="11" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application
android:icon="#drawable/app_icon"
android:label="#string/app_name"
android:theme="#style/SpinrTheme"
android:name="com.abc.xyz.GDApplication">
<activity
android:name=".SplashActivity"
android:label="#string/title_activity_splash" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Mainfest for second version:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xxx.apps.spinr"
android:versionCode="1"
android:versionName="1.2.0.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="11" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application
android:icon="#drawable/app_icon"
android:label="#string/app_name"
android:theme="#style/SpinrTheme"
android:name="com.xxx.apps.GDApplication">
<activity
android:name=".SplashActivity"
android:label="#string/title_activity_splash" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Thanks for the suggestion. As #Mahmoud in comment suggested that "google play never release update for the app with the same version code", so I incremented version code of app and it worked fine. #Rat-a-tat-a-tat Ratatouille as I said in question I am not updating my app via google play neither my app is on play store so I was not able to figure this out initially. Anyways thanks for help.
So conclusion is
whenever you want to send upgrade of app always increase version code
of the app
Here is my manifest file which shows error string types not allowed at android:configChanges please help me in rectification of the error.
below is my manifest file.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ifahja.banner"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="10"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:name=".MyBannerActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
</manifest>
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
screenSize & smallestScreenSize attributes are not available in SDK 10.They are been introduced in API level 13.
http://developer.android.com/guide/topics/manifest/activity-element.html#config
Make sure you have the latest copy of the Android SDK and that you're
compiling against at least Android v3.2 (set target in
project.properties to android-13).
The Google Mobile Ads SDK for Android requires a run-time of Android 2.3 or later (set
android:minSdkVersion to at least 9 in your AndroidManifest.xml).
This means you can develop with the latest version of the Android SDK
and your app will still run on an earlier Android version (2.3
minimum).
I am trying to upload an apk to slidme.org
http://slideme.org/node/add/mobileapp
But I get this validation failing
Your application must have a valid sdkVersion set. You need to edit
your AndroidManifest.xml file to fix this, and then upload again the
.apk file.
What is the problem with my manifest ?
<application
android:screenOrientation="portrait"
android:icon="#drawable/icon"
android:label="#string/app_name" >
<activity
android:screenOrientation="portrait"
android:label="#string/app_name"
android:name=".Start" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk
android:minSdkVersion="4"
android:targetSdkVersion="7" />
I had similar problem and solve it by:
remove:
minSdkVersion 15
targetSdkVersion 28
from gradle.
and adding :
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="26" />
to manifest.
It seems slideme isn't up to date...
Solved it by removing minSdkVersion. and refered targetSdkVersion to min version.
So in your case it will become