Bug Issue: Can't generate APK


Pages: 1

cgilbertson

  • Junior Stencyler
July 28, 2021, 10:15:12 am
I run into an error every time I try and generate an apk. 
My logs are posted in the forums under:
cgilbertson "Can't generate APK - unity ads?" July 21, 2021, 06:06:39 am





Justin

  • Master Stencyler
  • *
August 03, 2021, 02:00:41 am
Here's the referenced post: Can't generate APK - unity ads?

Here's the error from the logs:
Code: [Select]
uses-permission#android.permission.READ_PHONE_STATE
IMPLIED from /Users/ChaseGilbertson/stencylworks/games-generated/RashyRabbit/Export/android/bin/app/src/main/AndroidManifest.xml:2:1-30:12 reason: org.haxe.extension has a targetSdkVersion < 4

To figure out why some part of the manifest has a targetSdkVersion < 4, the manifest merger blame file should be checked.

Code: [Select]
/Users/ChaseGilbertson/stencylworks/android-builds/RashyRabbit/app/outputs/logs/manifest-merger-release-report.txt

edit: got the path to the manifest merger wrong the first time.
« Last Edit: August 03, 2021, 09:34:33 am by Justin »


Justin

  • Master Stencyler
  • *
August 03, 2021, 09:33:19 am
I took another look at the logs and noticed a different error. This seems to be the actual problem.

Code: [Select]
Merging result: ERROR
/Users/ChaseGilbertson/stencylworks/games-generated/RashyRabbit/Export/android/bin/app/src/main/AndroidManifest.xml Error:
     uses-sdk:minSdkVersion 14 cannot be smaller than version 19 declared in library [com.unity3d.ads:unity-ads:3.5.1] /Users/ChaseGilbertson/.gradle/caches/transforms-3/7884508b43c02d90f79bd93634568ff9/transformed/jetified-unity-ads-3.5.1/AndroidManifest.xml as the library might be using APIs not available in 14
     Suggestion: use a compatible library with a minSdk of at most 14,
         or increase this project's minSdk version to at least 19,
         or use tools:overrideLibrary="com.unity3d.ads" to force usage (may lead to runtime failures)

The problem with READ_PHONE_STATE being added as an implied permission is a different issue.
« Last Edit: August 03, 2021, 09:58:19 am by Justin »


cgilbertson

  • Junior Stencyler
August 03, 2021, 10:29:15 am
Changing the minimum version required for Android from 14 to 19 (or higher) allowed me to generate an apk - thanks so much, Justin!


Pages: 1

Details

  • Reported
    July 28, 2021, 10:15:12 am
  • Updated
    August 03, 2021, 10:29:15 am

  • View Status
    Public
  • Type
    Bug
  • Status
    New
  • Priority
    Normal
  • Version
    (none)
  • Fixed in
    (none)
  • Assigned to
    (none)
  • Category
    Compiling/Testing Games

Tags