Android Question APK can not run after rebuild at new pc

kilat kosasih

Member
Licensed User
Longtime User
Dear Anybody

Do you have experience with switching pc for build apk like me?
First, I use pc with intel celeron 4 gb memory, then I move to use pc with intel i7 16 gb memory, to rebuild the same application source and library.
But APK result can not run at Android device as before.
the error at Android device is:
..... runtime exception
.... is experiencing crashes.

.... is about my application name

How to resolve this problem?

Thankyou
regards
kilat kosasih
 

DonManfred

Expert
Licensed User
Longtime User
No one can help with this LESS Informations you provided!

What is the complete and exact Error?
 
Upvote 0

kilat kosasih

Member
Licensed User
Longtime User
I use library zxScannerLiveView
and at "Sub Activity_Create" I place line command:
zxslv.Initialize("zxslv")

if I remark that command, APK can run at Android device, event I build with my new pc.

may be this is can help
 
Upvote 0

kilat kosasih

Member
Licensed User
Longtime User
this is my source:

Sub Activity_Create(FirstTime As Boolean)
zxslv.Initialize("zxslv")
If FirstTime Then
Printer1.Initialize(Me, "Printer1")
End If
If CheckConnection Then
ExecuteRemoteQuery("SELECT selisihjam,aktif FROM version", select_db)
Else
MsgboxAsync("Perangkat tidak tersambung ke Internet", "Ada kesalahan")
Activity.Finish
End If
End Sub

when I build APK at old pc (celeron 4gb), the result is running well at my android device
but can not run when I rebuild it with my new pc (i7 16gb)

after I make remark like this:

Sub Activity_Create(FirstTime As Boolean)
'zxslv.Initialize("zxslv")
If FirstTime Then
Printer1.Initialize(Me, "Printer1")
End If
If CheckConnection Then
ExecuteRemoteQuery("SELECT selisihjam,aktif FROM version", select_db)
Else
MsgboxAsync("Perangkat tidak tersambung ke Internet", "Ada kesalahan")
Activity.Finish
End If
End Sub

then I build APK with my new pc (i7 16gb), the APK result can running at my Android device,
but can not make scan barcode at other module

the question is: may be need to change at my source or setting at my manifest:

'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
'<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="22"/>
AddManifestText(
<uses-sdk android:minSdkVersion="20" android:targetSdkVersion="31"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
AddManifestText(<uses-feature android:name="android.hardware.camera" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.camera.flash" android:required="false" />)

AddApplicationText(<activity android:name="com.jaknet.rumahparfum"
android:screenOrientation="landscape"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:windowSoftInputMode="stateAlwaysHidden">
</activity>)

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

AddManifestText(<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />)

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,
<files-path name="name" path="shared" />)

AddPermission("android.permission.ACCESS_NOTIFICATION_POLICY")
AddPermission("android.permission.PERMISSION_READ_PHONE_STATE")
AddPermission("android.permission.CAMERA")
AddPermission("android.permission.FLASHLIGHT")
AddPermission("android.hardware.camera")

Sorry about not complete the information, because I do not know what happen about my computer setting or my b4a setting?
Please advice me
Thankyou

Regards
kilat kosasih
 
Upvote 0

kilat kosasih

Member
Licensed User
Longtime User
no error at build time
but error at run time, as show in image
 

Attachments

  • WhatsApp Image 2023-03-10 at 21.29.00.jpeg
    WhatsApp Image 2023-03-10 at 21.29.00.jpeg
    18.5 KB · Views: 72
Upvote 0
Top