Android Question New Android SDK - Warning.

NJDude

Expert
Licensed User
Google has issued a new update for the Android SDK to API 20 and the upcoming "L" version, however, it breaks B4A, the file 'zipalign.exe' found in the TOOLS directory has been REMOVED, so, if you decide to upgrade, make a back up of that file BEFORE you go ahead and get the latest and greatest or your B4A apps won't compile.

If you re-install a FRESH copy of the SDK then the zipalign.exe file will be in the "<SDK_DIRECTORY>\sdk\build-tools\android-4.4W" directory or "<SDK_DIRECTORY>\build-tools\20.0.0"
 
Last edited:

Pendrush

Well-Known Member
Licensed User
You can also install Android SDK Build-tools v19.1, and zipalign.exe will be in folder
<YOUR_SDK_PATH>\sdk\build-tools\19.1.0\zipalign.exe
copy file in
<YOUR_SDK_PATH>\sdk\tools\zipalign.exe

I have just tested solution and working fine for me.
 

ac9ts

Active Member
Licensed User
Can someone check if Take Screenshot (under Tools menu in the IDE) is also broken? I upgraded this morning and now only get a white screen when taking a screen shot.

Added note: I can take a screen shot from the emulator (which, I believe was also upgraded) but not my phone (HTC EVO, rooted, Android v2.3.5)

More Info: I can take a screen shot using DDMS and Monitor but I still can not take one through the IDE.
 
Last edited:

NJDude

Expert
Licensed User
The tool that seems to work is the old DDMS, Monitor seems to have issues. I can take screenshots using the B4A IDE, no problem there.
 
Last edited:

BowTieNeck

Member
Licensed User
Unfortunately, I updated to version 20 before reading this. I've now downloaded 19.1 and done the copy as suggested by Pendrush to avoid the zipalign problem.
My app now compiles but when it tries to go to Google maps it crashes with:
java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4323000 but found 4452000. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />

Here's the relevant part of my manifest file:
AddApplicationText(<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyDKkUPwbzx10h4Er8SgXVh1uNzqZcltyms"/>
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
<activity
android:name="com.tapfortap.TapForTapActivity"/>
)

Any ideas?
Thanks
 

Johan Schoeman

Expert
Licensed User
Unfortunately, I updated to version 20 before reading this. I've now downloaded 19.1 and done the copy as suggested by Pendrush to avoid the zipalign problem.
My app now compiles but when it tries to go to Google maps it crashes with:
java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4323000 but found 4452000. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />

Here's the relevant part of my manifest file:
AddApplicationText(<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyDKkUPwbzx10h4Er8SgXVh1uNzqZcltyms"/>
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
<activity
android:name="com.tapfortap.TapForTapActivity"/>
)

Any ideas?
Thanks

Experiencing probably "related" problems. Google maps loading up to here (see png attached) and no further. Changed to OPENSTREETMAPS and map displays without any problem
 

Attachments

ac9ts

Active Member
Licensed User
I have found that I can take a screen shot of the phone using both DDMS and Monitor but still can't take one through the IDE.
 

NJDude

Expert
Licensed User
You have to copy the "hprof-conv.exe" file from <SDK_DIRECTORY>\platform-tools to <SDK_DIRECTORY>\tools and Monitor will work again.
 

ac9ts

Active Member
Licensed User
I discovered that when I tested Monitor. Once I copied it over, Monitor also was able to do screen shot.
 

brelto85

Active Member
Licensed User
I've B4A 3.82
I've just installed the last SDK updates (play service ecc... not Android L. I've installed the 19 sdk version)
now when compiles, gets this error

...
Found 25 resource files.
Signing package file (private key) 1.04
ZipAlign file. Error
Cannot find:
Please configure paths (Tools - Configure Paths).

i searched zipalign.exe in the all folders and didn't find it
can you help me?
 

canalrun

Well-Known Member
Licensed User
I had the same problem.

The SDK Manager seems to remove zipalign.exe in version 19.

I found this other thread that describes the fix.

Using the Android SDK Manager I installed version 20 of the SDK Build Tools. Zipalign is in the build-tools directory. I copied it to the tools directory.

Barry.
 

brelto85

Active Member
Licensed User
I've installed the "Android SDK Build Tools" (20.0.0) and copied the zipalign.exe file into <ANDROID_SDK>\tools path, the problem has resolved
 

Antony Danby

Member
Licensed User
You can also install Android SDK Build-tools v19.1, and zipalign.exe will be in folder
<YOUR_SDK_PATH>\sdk\build-tools\19.1.0\zipalign.exe
copy file in
<YOUR_SDK_PATH>\sdk\tools\zipalign.exe

I have just tested solution and working fine for me.
Worked fine for me too, thanks mate !!
 

Beja

Expert
Licensed User
Screenshots work here too. The solution for now is to copy zipalign.exe from one of the build-tools folder into the tools folder:
Thanks Erel, but it's too late for me to do that..

Now how should I precede?
 
Top