Error if "Can Install to External Storage" enabled for v1.15/v1.16

WZSun

Member
Licensed User
Longtime User
Hi,
I've noticed that with v1.15/v1.16, the frequency of having the connection status as "Disconnected" is high. In many cases, when I tried to compile the project, I do get error suggesting that disabling the 'Can Install to External Storage" option may help.


There is no problem with v1.2..

Anyone having the same symptom?

Rgds
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
the frequency of having the connection status as "Disconnected" is high
Are you referring to the status of the designer?

I do get error suggesting that disabling the 'Can Install to External Storage" option may help.
Does it help when you disable this option? Can you post the whole compilation text?
 

WZSun

Member
Licensed User
Longtime User
Hi Erel,
Yes, it's the designer. The 'connection dropped' from the emulator is more frequent than v1.2.

Yes, disabling the "Can Install to External Storage" does allows the project to be compiled most of the time.


The compilation text is as follows:

Compiling code. 0.31
Generating R file. 0.00
Compiling generated Java code. 1.86
Convert byte code - optimized dex. 4.60
Packaging files. 0.79
Signing package file (private key) 0.67
ZipAlign file. 0.07
Installing file to device. Error
pkg: /data/local/tmp/project1.apk
Failure [INSTALL_FAILED_CONTAINER_ERROR]
Unchecking "Project - Can Install To External Storage" may solve this problem.

Rgds
 
Last edited:

WZSun

Member
Licensed User
Longtime User
Hi Erel,
OK.. will try changing them again, even though I have not done any changes to it, and it works well on v1.2. Hopefully it works.

Rgds
 

WZSun

Member
Licensed User
Longtime User
Hi Erel,
I tried all means and it's still the same. Now it gets worst, 9 outof 10 times I could not even do any layout design on the emulator. The emulator simply shows black screen. Each time I tried to connect, it's disconnected.

Hopefully it's on my side...

Anyone encounter any problem with the Designer? Are you able to adjust the controls/views through the Emulator?
 
Last edited:

agraham

Expert
Licensed User
Longtime User
It's not clear to me what you mean by "and it works well on v1.2." However I have never been able to use an emulator running Andorid 1.6 on my computer as it always randomly disconnects. It has always been like this from the earliest days of using Eclipse to later using various versions of Basic4android.

I need to use Android 2.1 in the emulator for it to be reliable.
 

klaus

Expert
Licensed User
Longtime User
I have been working with the emulator since the beginning of B4Android.
And it works.
The problems I have encoutered are:
- When there are more than one layout files, and connecting the emulator to the designer I get a black screen and have to load one of the layout files.
- Sometimes, when compiling, I get an error message that the compilation fails, even though the Designer is connected correctly. The first time I got this message I uninstalled the whole stuff and installed it again and it worked OK for a certain time. The second time I had this, I launched another Emulator from the AVD Manager with another resolution and this one worked. So now when this happes I remove the given emulator in the AVD Manager and install a new one with the same parameters and it works again. I suspect that when this happens it could be a memory problem in the emulator, because all the different programs I test are saved in the emulator, and it is very boring to remove applications, but I haven't checked yet if this is really the problem.

The emulator is Android 2.2 level 8.

Best regards.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
When there are more than one layout files, and connecting the emulator to the designer I get a black screen and have to load one of the layout files.
When you have more than one layout file the IDE doesn't load any layout automatically till you choose one the first time. So you see a black screen which is an empty layout.
 

WZSun

Member
Licensed User
Longtime User
Hi Erel,
I've thought about the blank screen before, and have loaded an activity (before attempting to connect, and after the black screen). This is the symptom - it shows my activity for a split second before turning black. I tried to reload some Activity layout, but it still shows blank.

I tried to use my device for B4A Designer too, but the symptom remains the same.

Over to Agraham,
Prior to v1.15, I had no problem loading the Activity layout to Designer, either through Emulator or device. The no. of times it gets disconnected or fail is low, at most, around 5% for me. That is to say, in most cases, it works well for me.

But from v1.15 onwards, all these have changed. I'm hoping that it's an isolated case, but reading some of the comments here, I wondered why some of you'd encountered worst scenario than me, even prior to v1.15.

I'll try to uninstall the SDK and see whether it works for me. If it does, at least I can say that it could be due to data corruption on my sde.


Sidenote to Erel,..
How about a dedicated Designer, independent of Java. As the IDE is .NET, how about a .Net Designer. Currently, the speed of loading the layout and adjusting the controls/views are subjected to the PC processor speed and memory.

Rgds
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
There were no changes in the designer in this version.

How about a dedicated Designer, independent of Java. As the IDE is .NET, how about a .Net Designer. Currently, the speed of loading the layout and adjusting the controls/views are subjected to the PC processor speed and memory.
This is not possible without drawing all the Android views manually.

The designer usually works good. Once it is connected it should stay connected and work fluently.
The Android emulator is not perfect and does require creating a new one from time to time.
 

WZSun

Member
Licensed User
Longtime User
Hi,
I have tried to reinstall Android SDK and the disconnection issue still persists.
After some persistent attempts, I managed to resolve the issue. Here’s what I did.

1) As mentioned in previous postings, the black screen remains and the Designer gets disconnected, even after I tried to load one of the Activity page.

2) I have 7 Activity pages in my project. All the while, I have tried to load Tab1 Activity. Then by chance, I decided to load Tab3, and it shows up on the Emulator. I then load Tab1 again, and again, it shows the contents for a split second before turning black.

3) After a while, I thought it could be the panel view (PanelMemo) that I have loaded onto the Tab1 page. I then manually select PanelMemo from the Designer, and select ‘Remove View’. I then select Cancel. Then, the entire views I have placed on Tab1 are now displayed correctly without the black screen.

I could have added PanelMemo after updating to v1.15 at that time. Somehow, selecting ‘Remove View’ and cancelling it works for me. I suspect it could be a bug in the Designer but it may be difficult to simulate at the moment unless Erel happens to encounter similar symptom during his development in near future.

Rgds
 
Top