[android-developers] Re: Zipalign does not work!

2016-06-15 Thread MarKco
Yes, as I stated above you can downgrade your gradle plugin from 
build.gradle without downgrading Android Studio and thus you'll be able to 
build zipaligned APKs.

"n build.gradle I changed gradle plugin version from

classpath 'com.android.tools.build:gradle:2.2.0-alpha3'

to

classpath 'com.android.tools.build:gradle:2.1.2'

Rebuild, sign, upload - no more zipalign errors." 
(from 
http://stackoverflow.com/questions/37783751/android-apk-not-zip-aligned-when-uploading-to-google-play/37786864#37786864)

Regards

Il giorno mercoledì 15 giugno 2016 11:19:32 UTC+2, Sun Light ha scritto:
>
> I tried to:
> - zipalign once, not working, still same problem.
> - zipalign twice, not working - You uploaded an APK with invalid or 
> missing signing information for some of its files. You need to create a 
> valid signed APK.
> - reinstall Android Studio to last stable version include SDK - still same 
> problem
> Any other idea what I can do?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/a5830e6c-f8e0-4baa-9cfa-07f516222c69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Zipalign does not work!

2016-06-15 Thread MarKco
I was able to build a correctly zipaligned APK by downgrading gradle plugin 
from classpath com.android.tools.build:gradle:2.2.0-alpha3 
to com.android.tools.build:gradle:2.1.2 as suggested 
here: 
http://stackoverflow.com/questions/37783751/android-apk-not-zip-aligned-when-uploading-to-google-play/37786864#37786864

Il giorno martedì 14 giugno 2016 12:22:30 UTC+2, MarKco ha scritto:
>
> Hello Fabs,
> thank you for your suggestion. I zipaligned the zipaligned file and got a 
> "Verification succesful" exit code. Then, when I loaded it on play store, I 
> got the "not zipaligned" error again. I zipaligned again, still got failure 
> :-/
>
> Il giorno lunedì 13 giugno 2016 15:48:36 UTC+2, Fabs ha scritto:
>>
>> Very interesting everyone! I just verified that if I take the output of 
>> the first attempt to zipalign (which fails), the zipaligned zipaligned file 
>> worked for me too! It looks like this is a pretty widespread issue that 
>> thankfully has an easy workaround, and I guess that this will be eliminated 
>> when the problem is identified and resolved.
>>
>> To clarify: zipalign your signed APK, and then take that aligned file and 
>> zipalign it again.
>>
>> Cheers everyone!
>>
>> On Friday, 10 June 2016 02:15:15 UTC+10, Fabs wrote:
>>>
>>> Hello all.
>>>
>>> I have never encountered this issue before, despite developing several 
>>> apps. When I build a signed production APK using Android Studio, I get an 
>>> app-release.apk file but it is rejected by Google Play, saying it needs to 
>>> be zipaligned. When I verify the alignment using zipalign tool, I receive 
>>> output like this:
>>>
>>>  1876394 res/layout/design_bottom_sheet_dialog.xml (OK - compressed)
>>>  1876935 res/layout/design_layout_snackbar.xml (OK - compressed)
>>>  1877313 res/layout/design_layout_snackbar_include.xml (OK - compressed)
>>>  1877936 res/layout/design_layout_tab_icon.xml (OK - compressed)
>>>  1878215 res/layout/design_layout_tab_text.xml (OK - compressed)
>>>  1878540 res/layout/design_menu_item_action_area.xml (OK - compressed)
>>>  1878804 res/layout/design_navigation_item.xml (OK - compressed)
>>>  1879186 res/layout/design_navigation_item_header.xml (OK - compressed)
>>>  1879517 res/layout/design_navigation_item_separator.xml (OK - 
>>> compressed)
>>>  1879844 res/layout/design_navigation_item_subheader.xml (OK - 
>>> compressed)
>>>  1880231 res/layout/design_navigation_menu.xml (OK - compressed)
>>>  1880609 res/layout/design_navigation_menu_item.xml (OK - compressed)
>>>  1881116 res/layout/notification_media_action.xml (OK - compressed)
>>>  1881527 res/layout/notification_media_cancel_action.xml (OK - 
>>> compressed)
>>>  1882005 res/layout/notification_template_big_media.xml (OK - compressed)
>>>  1882747 res/layout/notification_template_big_media_narrow.xml (OK - 
>>> compressed)
>>>  1883472 res/layout/notification_template_lines.xml (OK - compressed)
>>>  1884347 res/layout/notification_template_media.xml (OK - compressed)
>>>  1884968 res/layout/notification_template_part_chronometer.xml (OK - 
>>> compressed)
>>>  1885372 res/layout/notification_template_part_time.xml (OK - compressed)
>>>  1885772 res/layout/select_dialog_item_material.xml (OK - compressed)
>>>  1886199 res/layout/select_dialog_multichoice_material.xml (OK - 
>>> compressed)
>>>  1886700 res/layout/select_dialog_singlechoice_material.xml (OK - 
>>> compressed)
>>>  1887202 res/layout/support_simple_spinner_dropdown_item.xml (OK - 
>>> compressed)
>>>  1887559 res/menu/menu_login.xml (OK - compressed)
>>>  1887906 res/mipmap-hdpi-v4/ic_launcher.png (BAD - 2)
>>>  1891092 res/mipmap-mdpi-v4/ic_launcher.png (OK)
>>>  1893113 res/mipmap-xhdpi-v4/ic_launcher.png (BAD - 1)
>>>  1897545 res/mipmap-xxhdpi-v4/ic_launcher.png (BAD - 1)
>>>  1904619 res/mipmap-xxxhdpi-v4/ic_launcher.png (BAD - 3)
>>>  1914156 resources.arsc (OK)
>>> Verification FAILED
>>>
>>> Indeed it is not aligned. But when I try to re-align it, I get this:
>>>
>>>  1881710 res/layout/notification_media_action.xml (OK - compressed)
>>>  1882121 res/layout/notification_media_cancel_action.xml (OK - 
>>> compressed)
>>>  1882599 res/layout/notification_template_big_media.xml (OK - compressed)
>>>  1883341 res/layout/notification_template_big_media_narrow.xml (OK - 
>>> compressed)
>>>  1884066 res/layout/notification_t

[android-developers] Re: Zipalign does not work!

2016-06-14 Thread MarKco
Hello Fabs,
thank you for your suggestion. I zipaligned the zipaligned file and got a 
"Verification succesful" exit code. Then, when I loaded it on play store, I 
got the "not zipaligned" error again. I zipaligned again, still got failure 
:-/

Il giorno lunedì 13 giugno 2016 15:48:36 UTC+2, Fabs ha scritto:
>
> Very interesting everyone! I just verified that if I take the output of 
> the first attempt to zipalign (which fails), the zipaligned zipaligned file 
> worked for me too! It looks like this is a pretty widespread issue that 
> thankfully has an easy workaround, and I guess that this will be eliminated 
> when the problem is identified and resolved.
>
> To clarify: zipalign your signed APK, and then take that aligned file and 
> zipalign it again.
>
> Cheers everyone!
>
> On Friday, 10 June 2016 02:15:15 UTC+10, Fabs wrote:
>>
>> Hello all.
>>
>> I have never encountered this issue before, despite developing several 
>> apps. When I build a signed production APK using Android Studio, I get an 
>> app-release.apk file but it is rejected by Google Play, saying it needs to 
>> be zipaligned. When I verify the alignment using zipalign tool, I receive 
>> output like this:
>>
>>  1876394 res/layout/design_bottom_sheet_dialog.xml (OK - compressed)
>>  1876935 res/layout/design_layout_snackbar.xml (OK - compressed)
>>  1877313 res/layout/design_layout_snackbar_include.xml (OK - compressed)
>>  1877936 res/layout/design_layout_tab_icon.xml (OK - compressed)
>>  1878215 res/layout/design_layout_tab_text.xml (OK - compressed)
>>  1878540 res/layout/design_menu_item_action_area.xml (OK - compressed)
>>  1878804 res/layout/design_navigation_item.xml (OK - compressed)
>>  1879186 res/layout/design_navigation_item_header.xml (OK - compressed)
>>  1879517 res/layout/design_navigation_item_separator.xml (OK - compressed)
>>  1879844 res/layout/design_navigation_item_subheader.xml (OK - compressed)
>>  1880231 res/layout/design_navigation_menu.xml (OK - compressed)
>>  1880609 res/layout/design_navigation_menu_item.xml (OK - compressed)
>>  1881116 res/layout/notification_media_action.xml (OK - compressed)
>>  1881527 res/layout/notification_media_cancel_action.xml (OK - compressed)
>>  1882005 res/layout/notification_template_big_media.xml (OK - compressed)
>>  1882747 res/layout/notification_template_big_media_narrow.xml (OK - 
>> compressed)
>>  1883472 res/layout/notification_template_lines.xml (OK - compressed)
>>  1884347 res/layout/notification_template_media.xml (OK - compressed)
>>  1884968 res/layout/notification_template_part_chronometer.xml (OK - 
>> compressed)
>>  1885372 res/layout/notification_template_part_time.xml (OK - compressed)
>>  1885772 res/layout/select_dialog_item_material.xml (OK - compressed)
>>  1886199 res/layout/select_dialog_multichoice_material.xml (OK - 
>> compressed)
>>  1886700 res/layout/select_dialog_singlechoice_material.xml (OK - 
>> compressed)
>>  1887202 res/layout/support_simple_spinner_dropdown_item.xml (OK - 
>> compressed)
>>  1887559 res/menu/menu_login.xml (OK - compressed)
>>  1887906 res/mipmap-hdpi-v4/ic_launcher.png (BAD - 2)
>>  1891092 res/mipmap-mdpi-v4/ic_launcher.png (OK)
>>  1893113 res/mipmap-xhdpi-v4/ic_launcher.png (BAD - 1)
>>  1897545 res/mipmap-xxhdpi-v4/ic_launcher.png (BAD - 1)
>>  1904619 res/mipmap-xxxhdpi-v4/ic_launcher.png (BAD - 3)
>>  1914156 resources.arsc (OK)
>> Verification FAILED
>>
>> Indeed it is not aligned. But when I try to re-align it, I get this:
>>
>>  1881710 res/layout/notification_media_action.xml (OK - compressed)
>>  1882121 res/layout/notification_media_cancel_action.xml (OK - compressed)
>>  1882599 res/layout/notification_template_big_media.xml (OK - compressed)
>>  1883341 res/layout/notification_template_big_media_narrow.xml (OK - 
>> compressed)
>>  1884066 res/layout/notification_template_lines.xml (OK - compressed)
>>  1884941 res/layout/notification_template_media.xml (OK - compressed)
>>  1885562 res/layout/notification_template_part_chronometer.xml (OK - 
>> compressed)
>>  1885966 res/layout/notification_template_part_time.xml (OK - compressed)
>>  1886366 res/layout/select_dialog_item_material.xml (OK - compressed)
>>  1886793 res/layout/select_dialog_multichoice_material.xml (OK - 
>> compressed)
>>  1887294 res/layout/select_dialog_singlechoice_material.xml (OK - 
>> compressed)
>>  1887796 res/layout/support_simple_spinner_dropdown_item.xml (OK - 
>> compressed)
>>  1888153 res/menu/menu_login.xml (OK - compressed)
>>  1888500 res/mipmap-hdpi-v4/ic_launcher.png (OK)
>>  1891688 res/mipmap-mdpi-v4/ic_launcher.png (OK)
>>  1893712 res/mipmap-xhdpi-v4/ic_launcher.png (OK)
>>  1898144 res/mipmap-xxhdpi-v4/ic_launcher.png (OK)
>>  1905220 res/mipmap-xxxhdpi-v4/ic_launcher.png (OK)
>>  1914757 resources.arsc (BAD - 1)
>> Verification FAILED
>>
>> Ultimately, it appears that my APK cannot be aligned by zipalign? I am 
>> using these options: -f -v 4 to align and -c -v 4 to verify.
>>
>> Is this a known issue 

[android-developers] Re: Zipalign does not work!

2016-06-13 Thread MarKco
I'm experiencing the exact same issue since I upgraded to Android Studio 
2.2 preview 3

Il giorno giovedì 9 giugno 2016 18:15:15 UTC+2, Fabs ha scritto:
>
> Hello all.
> (...)
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/bc2ad354-f990-4ac6-b4f5-90ccb4d03104%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Android app indexing and deep links: did I get it wrong all the time?

2016-02-12 Thread MarKco
Hello everyone. I'm implementing app indexing in my android app and I think 
I'm missing something, but I don't know what.

Following the guide (
https://developers.google.com/app-indexing/android/app?utm_source=wnc_546902_medium=gamma_campaign=wnc_546902_content=msg_731912=en)
 
I added my intent-filters to the app and implemented what's needed in my 
activity.

my application's package is com.towers.hotelsclick and the associated 
website (where I didn't put the link rel meta-tag yet, since I'm just 
testing) is www.hotelsclick.com

I saw the following intent-filter example in the guide












so I wrote mine in this way:









Also, I wrote a content provider in order to parse the URI



which should map the URIs as follows:

private static final String BASE_PATH = "https";
private static final String AUTHORITY = "com.towers.hotelsclick";

public static final Uri CONTENT_URI = Uri.parse("android-app://" + AUTHORITY
+ "/" + BASE_PATH);

I'm testing the implementation via command line using the following adb 
command:

adb shell am start -a android.intent.action.VIEW -d "
https://hotelsclick.com?hotel_id=135738 
" com.towers.hotelsclick
and it works. The app gets automatically opened with the right activity and 
the right parameters. When the app starts the onNewIntent method gets 
called:

protected void onNewIntent(Intent intent) {
String action = intent.getAction();
String data = intent.getDataString();
if (Intent.ACTION_VIEW.equals(action) && data != null) {
String recipeId = data.substring(data.lastIndexOf("/") + 1);
Uri contentUri = HotelDetailsContentProvider.CONTENT_URI.buildUpon()
.appendPath(recipeId).build();
bundle = new Bundle();
bundle.putString("pictureUrl", "");

//showRecipe(contentUri);
}
}

(I got it of course from the examples, that's why it talks about recipes 
and not hotels)

But I wonder: what should I do? Get data from the intent with a

getIntent().getData().getQuery()
or use the ContentProvider and get them from the URI?

Also, I'd like to test with the Google Search Console and the "View as 
google" funcionality if everything is okay. I uploaded my APK and saw an 
URI is requested.

Now, in the "testing your app" section of the documentation I saw that the 
links like http://hotelsclick.com?hotel_id=135738 
 are referred as "deep links" 
while those like android-app://com.towers.hotelsclick/https/
hotelsclick.com?hotel_id=135738  
are referred as "URI". Am I right?

The "View as google" funcionality asks for a URI but I don't know how to 
create one. Also, I wonder how this URI is passed to the app and I'm pretty 
sure I'm getting very confused about this all URI/deepLink thing, and can't 
find relief in the documentation.

Where and when should I use the URI? Where and when should I use the 
deepLink? I guess that since I'm going to put the link rel=URI in my 
webpages then the app will be called in the app indexing with the URI and 
not with the URL of the page. But if it's so... why is the adb shell am 
start -a android.intent.action.VIEW -d command used for testing with the 
URL and not the URI? Should my app be able to get and handle URIs or URLs? 
And how?

I thought I had understood something about app indexing, but today I'm 
starting to think I got it all wrong since I started. That's why I ask you 
for help in answering the questions above, and possibly sheding a light on 
all this URL/URI/intent-filter/ContentProvider mess.

Thank you everybody

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/f6a16ffd-2a1c-43c5-928c-b92fbeec2e30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Importing a project using com.android.internal.* packages

2011-09-21 Thread MarKco
I answer to myself. I found a branch in the directory tree where the 
previous developer had been copying the used part of com.android.internal 
that is used into the project.
Importing that branch I solved my dependancy issued. I just hope that this 
won't bring the app to have mismatches with future Android versions...

Cheers

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Importing a project using com.android.internal.* packages

2011-09-19 Thread MarKco
Hello to everybody,
my name is Marco, I'm a newbie as a forum user and as a Android developer.
The issue I'd like to share with you is - I think - quite simple for 
somebody who already have some experience with Android. What happens is that 
I need to work in a previously developed project, which contains references 
to com.android.internal subclasses. I installed GTK and NDK on my Mac OSX 
but couldn't import those packages. After googling a while I realized that 
those packages should not be imported, since they are internal Android 
packages.
What happens now is that I'd like to run the project at least once, in order 
to debug it and discover whether those packages are really needed or not. I 
got to know that the only way to import those packages is to build Android 
from the source code, so I downloaded the branch from GIT and tried to build 
it. I'm not sure I succeeded, I saw some error messages but couldn't see 
anything like building interrupted, so I don't know. Anyway now I don't 
know how I should use the compiled Android code I (hopefully) have provided 
myself. Should I import it in the project in any way? Are there others way 
to import the com.android.internal.* packages?

Thank you very much in advance, and sorry if it's a silly question, as 
probably is.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en