Problem with IDE sending .adk to phone.

mramos

Member
Licensed User
Longtime User
I downloaded and installed the basic4android compiler, added the two lines for the hello world test. Hit F5 and received this error. I could not paste the whole thing for some reason, the the error in question is below:

Failure [INSTALL_FAILED_DEXOPT]

Seems it's unable to move the app to the emulator. I am able to adb push it on the emulator by hand and run it. Can anyone tell me how to fix this issue?

I have re-installed java, android-sdk and b4a. Same problem. The emulator and adb work fine by hand. I googled and see lot of people with the issue, not just with b4a.

I am running the latest java, sdk and b4a, even updated the sync manager.

Thanks in advance for any direction.
 

moster67

Expert
Licensed User
Longtime User
Try to use API level 8. The other day I reinstalled B4A and installed API level 9 (1.9) and I got the same error. Deleting 1.9 and installing 1.8 resolved my problems.
 
Upvote 0

mramos

Member
Licensed User
Longtime User
Erel and Moster67,

I was using 9, but had tried 8. Went back to 8 and the same error. I will build a new device with 8 and a small SD and see if that works. But so far no go with API 8.
 
Upvote 0

mramos

Member
Licensed User
Longtime User
Built a new API 8 and small SD. Still get the error.

Will try a manual push again and see if that works.
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
I am not 100% sure but I think the problem is that the file "dx.bat" cannot be found. I also believe that in the latest SDK-releases, Google changed its position. It could be either in "android-sdk-windows\platforms\android-8\tools" or in "android-sdk-windows\platform-tools". What I did was to add said paths as an enviroment-variable. You can find a guide how to do it in this post:

http://www.b4x.com/forum/39412-post1.html
 
Upvote 0

mramos

Member
Licensed User
Longtime User
Added the platform-tools to the path, no go there and the dx.bat was in there.

Saw the adb logcat and ran it and did a compile. I captured this. Opps, for some reason I can not paste in my post and can not add an attachment.

But I have a line that says the failure is because my .apk does not include classes.dex ?? Got me as to what the means.
 
Last edited:
Upvote 0

mramos

Member
Licensed User
Longtime User
Can you zip the apk file and send it to me: [email protected] ?

Just sent it. Here is the text, I updated firefox 4 beta and now I can cut and paste again..

B4X:
D/AndroidRuntime(  442): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime(  442): CheckJNI is ON
D/AndroidRuntime(  442): --- registering native functions ---
D/dalvikvm(  293): GC_EXPLICIT freed 167 objects / 11568 bytes in 170ms
D/PackageParser(   66): Scanning package: /data/app/vmdl11566.tmp
D/PackageManager(   66): Scanning package com.google.hello
I/PackageManager(   66): /data/app/com.google.hello-1.apk changed; unpacking
D/installd(   35): DexInv: --- BEGIN '/data/app/com.google.hello-1.apk' ---
W/dalvikvm(  449): DexOptZ: zip archive '/data/app/com.google.hello-1.apk' does
not include classes.dex
W/installd(   35): DexInv: --- END '/data/app/com.google.hello-1.apk' --- status
=0xff00, process failed
E/installd(   35): dexopt failed on '/data/dalvik-cache/data@[email protected]
[email protected]' res = 65280
W/PackageManager(   66): Package couldn't be installed in /data/app/com.google.h
ello-1.apk
D/dalvikvm(   66): GC_EXPLICIT freed 3382 objects / 191912 bytes in 265ms
D/AndroidRuntime(  442): Shutting down VM
I/AndroidRuntime(  442): NOTE: attach of thread 'Binder Thread #3' failed
D/jdwp    (  442): adbd disconnected
D/SntpClient(   66): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
 
Upvote 0

mramos

Member
Licensed User
Longtime User
Did you send the apk file or the source code?
Does it fail only with a specific program?

I sent the test.apk in a zip.

I reloaded the jdk and android-sdk again. I still get the error. Made sure all the paths were good. And added the platrom-tools in there too.

I did not try another sample program, I took the default template you had and added the two lines to the activity. And hit F5, it seems to all work but getting it on the emulator or phone. I send a dump from the adb catlog too, it mentioned a missing class of some kind.

I also tried it on another machine and same error? Weird.

Check your spam folder maybe, I sent it yesterday and today. Could be grabbing me.
 
Last edited:
Upvote 0

agraham

Expert
Licensed User
Longtime User
Normally you need to do File -> Export as Zip in the IDE to get the whole project to post. Just posting the b4a file is not enough as we don't then get the layout or any other files required for the project.

In this case it would be the apk that would be of interest as that seems to be where your problem lies.
 
Upvote 0

mramos

Member
Licensed User
Longtime User
Thanks agraham,

Here is the whole project. New to basic4android and the community.
 

Attachments

  • test.zip
    4.8 KB · Views: 199
Upvote 0
Top