Android Question New Android SDK - Warning.

NJDude

Expert
Licensed User
Longtime 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
Longtime 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.
 
Upvote 0

ac9ts

Active Member
Licensed User
Longtime 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:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime 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:

SS-2014-06-29_09.11.21.png


This will be fixed in the next update.
 
Upvote 0

BowTieNeck

Member
Licensed User
Longtime 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
 
Upvote 0

Johan Schoeman

Expert
Licensed User
Longtime 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

  • Google Maps.png
    Google Maps.png
    13.7 KB · Views: 472
  • OPEN STREET MAPS.png
    OPEN STREET MAPS.png
    52.5 KB · Views: 470
Upvote 0

ac9ts

Active Member
Licensed User
Longtime 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.
 
Upvote 0

ac9ts

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

brelto85

Active Member
Licensed User
Longtime 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?
 
Upvote 0

canalrun

Well-Known Member
Licensed User
Longtime 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.
 
Upvote 0

brelto85

Active Member
Licensed User
Longtime 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
 
Upvote 0

Antony Danby

Member
Licensed User
Longtime 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 !!
 
Upvote 0

Beja

Expert
Licensed User
Longtime 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?
 
Upvote 0
Top