mohsen programmer
Member
Hello,
I compile a source but it immediately force closes and no error is even printed! Even the first line of Activity_Create doesn't execute!
This is my manifest code:
This is also the Project Attributes section:
The project is successfully compiled and installed on the simulator, but it is force closed as soon as it is executed. What is the problem?
I compile a source but it immediately force closes and no error is even printed! Even the first line of Activity_Create doesn't execute!
This is my manifest code:
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="29"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
CreateResourceFromFile(Macro, Core.NetworkClearText)
SetApplicationAttribute(android:usesCleartextTraffic, "true")
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:theme, "@style/MyAppTheme")
CreateResource(values, theme.xml,
<resources>
<style name="MyAppTheme" parent="@style/Theme.AppCompat.Light">
<item name="colorPrimary">#ffffff</item>
<item name="colorPrimaryDark">#ffffff</item>
<item name="colorAccent">#130D6F</item>
<item name="android:navigationBarColor">#ffffff</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowLightStatusBar">true</item>
<item name="windowActionModeOverlay">true</item>
<item name="android:textColorLink">#4FA7CD</item>
</style>
</resources>
)
SetApplicationAttribute(android:requestLegacyExternalStorage, true)
AddApplicationText(<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
)
'************ Google Play Services Base ************
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
'************ Google Play Services Base (end) ************
'************ Firebase Base ************
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
'************ Firebase Base (end) ************
'************ Firebase Notifications ************
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
'************ Firebase Notifications (end)************
'************ Firebase Auth ************
CreateResourceFromFile(Macro, Core.NetworkClearText)
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseAnalytics.FirebaseAnalytics)
'************ Firebase Auth (end) ************
AddPermission(android.permission.INTERNET) ' Allows applications to open network sockets.
AddPermission(android.permission.ACCESS_NETWORK_STATE) ' Allows applications to access information about networks.
SetApplicationAttribute(android:usesCleartextTraffic, "true")
AddPermission(android.permission.READ_EXTERNAL_STORAGE)
AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)
AddPermission(android.permission.RECORD_AUDIO)
AddPermission("android.permission.READ_CONTACTS")
AddPermission("android.permission.WRITE_CONTACTS")
AddPermission(android.permission.SEND_SMS)
'''''''''''''''Add This Line For Start EasyStartCropperEngine''''''''''''''''''''''''''''''''''''''''''''
AddApplicationText(<activity android:name="com.theartofdev.edmodo.cropper.CropImageActivity" android:theme="@style/Theme.AppCompats"/>)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''Theme AppCompat'''''''''''''''''''''''''''
'SetApplicationAttribute(android:theme, "@style/Theme.AppCompats")
CreateResource(values, themeesajb.xml,
<resources>
<style name="Theme.AppCompats" parent="Theme.AppCompat.Light">
<item name="colorPrimary">#FFFFFF</item>
<item name="colorPrimaryDark">#FFFF</item>
<item name="colorAccent">#5B5B72</item>
<item name="windowNoTitle">false</item>
<item name="windowActionBar">true</item>
<item name="android:textColorPrimary">#5B5B72</item>
<item name="android:windowLightStatusBar">true</item>
<item name="android:windowDisablePreview">true</item>
</style>
</resources>
)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
AddActivityText(LoginEmail,"<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="https" android:host="MyDomain.com"/>
</intent-filter>")
'************ Required with GetSafeDirDefaultExternal ***********
AddManifestText(<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
)
'**************************************
'******************** Required for file provider *************************
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>
)
CreateResource(xml, provider_paths,
<external-files-path name="name" path="shared" />
)
'***************************************************************
B4X:
#Region Project Attributes
#ApplicationLabel: My App :)
#VersionCode: 15
#VersionName: 1.4.5
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False
#AdditionalJar: com.android.support:support-compat
#Extends: android.support.v7.app.AppCompatActivity
#AdditionalRes: ..\Resource
#AdditionalRes: ..\resources
#Extends : androidx.appcompat.app.AppCompatActivity
#AdditionalRes:../res
#AdditionalRes:../res_icon
#AdditionalJar : androidx.appcompat:appcompat
#MultiDex : true
#Extends: de.amberhome.materialdialogs.MaterialDialogsActivity
#AdditionalRes:../res_icon2
#BridgeLogger:true
#End Region