Android Question impossible to make an apk work for now

philippe MADELAINE

Member
Licensed User
Longtime User
Hi, I didn't work on program for several months (my version of B4a is 4.3) and I have re install all the package with windows 10. This week end i have tried to compile a new apk with no success, so I quickly discover that no more program accept to work with my computer.

My config is: windows 10, android API 23, Java 32 bits release 8_072.
Everytime I compile a program in b4a, everything seems ok, it install on phone or tablet but when it starts the program stops.I have tried to compile in debug mode. only legacy mode work but same error on tablet.

I have tried Kitkat and lollipop tablet.

Anybody got an idea of solution for my problem ?

I spend the last 2 days to reinstall java and google API with no success....
 

philippe MADELAINE

Member
Licensed User
Longtime User
Don't you get any error when the program stops?

Could you post a small project showing the problem?
So users having a similar configuration as yours could test it.

With any kind of program I have a dialogbox which indicate: "B4A Example Stopped ......oK" and that's all

Sample of program tested 3 minutes ago on galaxy note 10 (kitkat 4.4.2) / same with galaxy tab S2 (lollipop 5.02) :

#Region Project Attributes

#ApplicationLabel: B4A Example

#VersionCode: 1

#VersionName:

'SupportedOrientations possible values: unspecified, landscape or portrait.

#SupportedOrientations: unspecified

#CanInstallToExternalStorage: False

#End Region

#Region Activity Attributes

#FullScreen: False

#IncludeTitle: True

#End Region

Sub Process_Globals

'These global variables will be declared once when the application starts.

'These variables can be accessed from all modules.

End Sub

Sub Globals

'These global variables will be redeclared each time the activity is created.

'These variables can only be accessed from this module.

End Sub

Sub Activity_Create(FirstTime AsBoolean)

'Do not forget to load the layout file created with the visual designer. For example:

'Activity.LoadLayout("Layout1")

Msgbox ("test","essai")




End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed AsBoolean)

End Sub



I suspect the problem came from SDK manager. Currently I use API 23

here is my manifest editor:

'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

AddManifestText(

<uses-sdk android:minSdkVersion="11" android:targetSdkVersion="23"/>

<supports-screens android:largeScreens="true"

android:normalScreens="true"

android:smallScreens="true"

android:anyDensity="true"/>)

SetApplicationAttribute(android:icon, "@drawable/icon")

SetApplicationAttribute(android:label, "$LABEL$")

SetApplicationAttribute(android:theme, "@android:style/Theme.Holo")

'End of default text.





HELP ! ! ! ! ! !
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

philippe MADELAINE

Member
Licensed User
Longtime User
Today I have trie to reinstall completely from a proper PC with windows 10 where I have never installed B4A before.
First Java jre1.8.60 en 64bits pour win 10 64 Pro
second android sdk, API 23 et mise à jour
last B4A 4.30

installation of paths and private sign key
load hello world program
compilation ok but when it load on tablets (kitkat or lolipop), message box: B4A sample stopped.

What is wrong ?

Here is what I installed with android sdk.

Each time i compile a program it can't start.......
upload_2016-2-3_21-33-43.png
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
B4A sample stopped.
Connect your device with usb and hav usb debugging active, Post the complete error-messge from the log

Just saying app has stopped but not providing your code (Export as zip) and not providing any errormessage will not help us to help you.
 
Upvote 0

philippe MADELAINE

Member
Licensed User
Longtime User
Connect your device with usb and hav usb debugging active, Post the complete error-messge from the log

Just saying app has stopped but not providing your code (Export as zip) and not providing any errormessage will not help us to help you.

That's the problem if only I can have any log...... I have the error message on Phone or tablet but nothing on B4a even on the log........
It seems like the apk was not completely linked with any part of android code and it can't start

What can i give you more ? If you wana reproduce it i can produce the apk....
 

Attachments

  • test.apk
    105.7 KB · Views: 157
  • test.zip
    977 bytes · Views: 154
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Change your code to
B4X:
Sub Activity_Create(FirstTime As Boolean)
    Log("Hello world!")
End Sub

Sub Activity_Resume
    Msgbox("Hello world?", "First program")
End Sub

In activity_create yo cannot show any messagebox (the activity is not loaded a this time)
 
Upvote 0

philippe MADELAINE

Member
Licensed User
Longtime User
Sub Activity_Create(FirstTime As Boolean)
Log("Hello world!")
End Sub

Sub Activity_Resume
Msgbox("Hello world?", "First program")
End Sub
Sorry but no success ! I have tried to change the code but same problem. I think it is a problem during the compilation or linking with another piece of code. Still the same problem

Do you think my configuration and all the installation is correct ? (win 10+java+android jdk)
 
Upvote 0

mangojack

Expert
Licensed User
Longtime User
Your test project only installed correctly after changing the Package Name from default "b4a.example" ... IDE menu > Project > Build Configuration
This is a bit unusual as i have downloaded and installed numerous projects / examples with the same package name. ?
 
Upvote 0

lemonisdead

Well-Known Member
Licensed User
Longtime User
Hello Philippe,
Sad to read the troubles. Here is my config with Windows 10 x64 Pro


sdk.png

jdk.png

path.png

Edit: attached a sample hello world project you could uncompress and try to compile and install

That said : do you have that problem with a new blank project you would create ?
 

Attachments

  • HelloWorld.zip
    6 KB · Views: 165
Last edited:
Upvote 0

philippe MADELAINE

Member
Licensed User
Longtime User
Thanx a lot lemonisdead,
Your hello world sample compile and run on my kitkat tablet.
I still don't understand why yours and not mine.

I will make a deep analyse of your file and watch what is wrong.
What is sure is that my config seems ok, there may be a problem with my source code ?

I will give you the answer as soon as i discover what has happened....
 
Upvote 0

philippe MADELAINE

Member
Licensed User
Longtime User
Here we go ! Big up for Lemonisdead which didn't solve my problem but gave me all that I need to discover what doesn't work.
In fact, all my sources and directories are on a synology drive. The sample of lemonisdead was compile from C: and it worked correctly. When I move the directory to synology drive, It doesn't work. So I use synology cloud station with a directory on Drive C and since now everything is ok !

We can closed this thread. Thanx to all for your help.
 
Upvote 0
Top