Android Question [Solved] B4A - Unable to end compilation, error (timeout) on Dex optimization.

pompierecattivo

Member
Licensed User
Longtime User
Hello All,
as Erel ask, i purpose my question here. I paste all significative messages from wrong place to help rebuild the story...


Hello,
probably i did something wrong, but i dont know what...

After add parts as Erel describe on first post, i've tried to compile. Unfortunately compiling ends by a timeout. No explication about. The only thing i see is a over use (i think) of cpu and memory on activity manager window. I attach a screnshot.
Sorry for bad english, any idea appreciate.
Immagine.png

....
My timeout option was set at 180sec (in the past i updated this value from 1 minute). Now is set for 5 min waiting but still timing out.
The strange thing is my app compiled and run correctly before...
2020-02-29 (3).png

....
Ok,
appear to be something linked to manifest... I try to put my changes step by step. I'm started from manifest where i add the line Erel suggest on first post. The error appear just for this... (of course i also added Firebase AdMob library) I'll Attach my manifest, i know i'm not a good programmer, but any help appreciate.
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddPermission(android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS)
AddPermission(android.permission.FOREGROUND_SERVICE)
AddPermission(android.permission.CAMERA)
AddPermission(android.permission.FLASHLIGHT)
AddPermission(android.permission.ACCESS_WIFI_STATE)
AddPermission(android.permission.CHANGE_WIFI_STATE)
AddManifestText(
<uses-sdk android:minSdkVersion="16" />
<uses-sdk android:targetSdkVersion="29" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" android:protectionLevel="signature" />
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)

SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")

AddApplicationText(
  <provider
  android:name="android.support.v4.content.FileProvider"
  android:authorities="$PACKAGE$.provider"
  android:exported="false"
  android:grantUriPermissions="true">
  <meta-data
  android:name="android.support.FILE_PROVIDER_PATHS"
  android:resource="@xml/provider_paths"/>
  </provider>
)
AddApplicationText(
<uses-library
      android:name="org.apache.http.legacy"
      android:required="false" />
)
CreateResource(xml, provider_paths,
   <external-files-path name="name" path="shared" />
)
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)

'End of default text.

....
Hello Jorge
unfortunately still no news...
I've tryed #multidex: true on main module. And also download Dexer.jar as Erel suggest here but no luck.
I've search on b4a website for a running example for get advertsing id to check if its run and see difference, but nothing found..
 
Last edited:

pompierecattivo

Member
Licensed User
Longtime User
Done all your suggest,
Work like a charm!!!!!
Always many thanks, Erel.

Little note: I've many RAM on my PC so i put directly 4096 value on the MaxRamForDex parameter to havent to check increase values...
 
Upvote 0
Top