P PaulusPaulus Member Licensed User Longtime User Jun 6, 2019 #1 Hi Erel Just upgraded to v9. I have an app that produces an apk nicely. It relies heavily on saving text files to File.DirRootExternal and File.DirDefaultExternal. I have done some checking, especially https://www.b4x.com/android/forum/t...roid-permission-write_external_storage.90457/ Every time I try to upload to google play console I get the error mentioned above. ie: "Upload failed Duplicate declarations of permission android.permission.WRITE_EXTERNAL_STORAGE with different maxSdkVersions. Your app currently targets API level 23 and must target at least API level 26 to ensure it is built on the latest APIs optimized for security and performance. Change your app's target API level to at least 26. Learn how." My manifest begins: "AddManifestText( <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="23"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" />" Do you have any suggestions please how to overcome this? Thanks.
Hi Erel Just upgraded to v9. I have an app that produces an apk nicely. It relies heavily on saving text files to File.DirRootExternal and File.DirDefaultExternal. I have done some checking, especially https://www.b4x.com/android/forum/t...roid-permission-write_external_storage.90457/ Every time I try to upload to google play console I get the error mentioned above. ie: "Upload failed Duplicate declarations of permission android.permission.WRITE_EXTERNAL_STORAGE with different maxSdkVersions. Your app currently targets API level 23 and must target at least API level 26 to ensure it is built on the latest APIs optimized for security and performance. Change your app's target API level to at least 26. Learn how." My manifest begins: "AddManifestText( <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="23"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" />" Do you have any suggestions please how to overcome this? Thanks.
JohnC Expert Licensed User Longtime User Jun 6, 2019 #2 You need to change the targetSDK in your manifest from the "23" that you have now to at least "26" as the Google message says. Before: <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="23"/> After: <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="26"/> Upvote 0
You need to change the targetSDK in your manifest from the "23" that you have now to at least "26" as the Google message says. Before: <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="23"/> After: <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="26"/>
DonManfred Expert Licensed User Longtime User Jun 6, 2019 #3 android.jar / targetSdkVersion / minSdkVersion Upvote 0
P PaulusPaulus Member Licensed User Longtime User Jun 6, 2019 #4 Thanks. Android jar is version 28. Tried tip but apk installed but doesn't run and does not upload to play console... <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="26"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" />" Upvote 0
Thanks. Android jar is version 28. Tried tip but apk installed but doesn't run and does not upload to play console... <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="26"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" />"
Erel B4X founder Staff member Licensed User Longtime User Jun 7, 2019 #5 PaulusPaulus said: Hi Erel Click to expand... You shouldn't limit your questions to a single member. PaulusPaulus said: Android jar is version 28. Click to expand... This has nothing to do with targetSdkVersion. See the tutorial. PaulusPaulus said: Duplicate declarations of permission android.permission.WRITE_EXTERNAL_STORAGE with different maxSdkVersions. Click to expand... Remove this snippet: Code: Copy <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" />" It is not needed as your app adds the external storage permission for all version. Upvote 0
PaulusPaulus said: Hi Erel Click to expand... You shouldn't limit your questions to a single member. PaulusPaulus said: Android jar is version 28. Click to expand... This has nothing to do with targetSdkVersion. See the tutorial. PaulusPaulus said: Duplicate declarations of permission android.permission.WRITE_EXTERNAL_STORAGE with different maxSdkVersions. Click to expand... Remove this snippet: Code: Copy <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" />" It is not needed as your app adds the external storage permission for all version.
P PaulusPaulus Member Licensed User Longtime User Jun 8, 2019 #7 The manifest snippet removal and targetSdkVersion change worked! Thank you so much Upvote 0