Tuesday, April 12, 2016

ignore wechat app signature validation 微信不跳转的问题

微信分享的时候,只是闪了一下!无法,分享!


04-12 18:18:19.147 12775-12775/com.meiliwu.avengeragent D/MicroMsg.SDK.WXApiImplV10: ignore wechat app signature validation
04-12 18:18:19.147 12775-12775/com.meiliwu.avengeragent D/MicroMsg.SDK.WXApiImplV10: ignore wechat app signature validation
04-12 18:18:19.362 12775-12775/com.meiliwu.avengeragent D/MicroMsg.SDK.WXApiImplV10: ignore wechat app signature validation

04-12 18:18:19.397 12775-12775/com.meiliwu.avengeragent D/MicroMsg.SDK.MMessageAct: send mm message, intent=Intent { flg=0x18000000 cmp=com.tencent.mm/.plugin.base.stub.WXEntryActivity (has extras) }




微信SDK不跳转的原因:
1.有可能没有审核通过(基本上,填写了就可以使用的)
2.有可能发布的SDK和运行的SDK签名不一致。(没有使用签名打包的APK)


Error:Execution failed for task ':app:transformClassesAndResourcesWithRelease'. > java.io.IOException: Please correct the above warnings first.

奇葩的问题,
debug 的时候,没有问题,但是打release 包的时候,报错,因为proguard.pro 代码混淆的锅



我找到一个关键子:
com.jcraft.jzlib.ZInputStream

原来是XMPP  Smack 搞的鬼。我只需要 不会笑 Smack 就可以了
resolve method:
# XMPP smack start
-keep class org.jivesoftware.smack.** { *; }
-keep class org.jivesoftware.smackx.** { *; }
# XMPP smack end


You can see detail:
http://stackoverflow.com/questions/29678908/what-are-the-recommended-proguard-rules-for-smack-4-1




Android studio 如何实现多版本的处理

这个很蛋疼呀,  现在发现,当你的APP 很多同名的资源的时候, Android Studio 是不会根据不同的环境,进行自动的匹配的。她只是建立所有Image的索引。 所以,导致了这个问题,
对于,一家公司的外包,真的是很蛋疼的一件事情。很多事情,并不是你想象的那么简单的。很多的时候,是你的工具并不支持,你需要做更多的技术上的支持!

解决:
解决原则:
你需要讲   各个 Faver 版本共用的东西提取出来,要不然就会出现混乱!

共用的动心不仅仅是java class.  Image resource, String resource And so on!

Thanks to:
http://developer.android.com/tools/building/configuring-gradle.html#workBuildVariants



很多时候,根本就没有答案,需要自己的去寻找,就算是官方文档,也仅仅只是一个Demo.  在真正的开发展,还是需要自己去思考和探索,举一反三的实践。实践出真知!


我的 Token 问题?

每次登陆,都会重置Token的信息。


我怀疑的是debug环境的问题,然后我用 正式的打包

出现了这个问题:

Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForMseRelease'.
> java.io.IOException: Please correct the above warnings first.

昨天的时候,似乎动了带你IM 的 smack

Monday, April 11, 2016

android adb command to install apk Failure [INSTALL_FAILED_ALREADY_EXISTS]?



adb install -r rent.apk

Thanks To

http://stackoverflow.com/questions/4449540/failure-install-failed-already-exists-when-i-tried-to-update-my-application

Ubuntu how add gradle to PATH

Step-by-step instructions
Gradle is a Java build system. It uses a clean, simple configuration syntax and is used by Android as the default build system. For API development, Gradle is supported by Spring.
Installation is quick and simple. We are going to install a private copy so that root permissions are not required during development.

Download Gradle

mkdir -p ~/opt/packages/gradle && cd $_

wget https://services.gradle.org/distributions/gradle-2.3-bin.zip

unzip gradle-2.3-bin.zip

Install and setup Gradle

Next, we will create a symlink that provides a shorter path to the specific Gradle version. The symlink will allow us to upgrade Gradle later without changing any other configuration.
ln -s ~/opt/packages/gradle/gradle-2.3/ ~/opt/gradle
Open your .profile file in vi, emacs, or gedit.
gedit ~/.profile
Paste the following at the bottom of your .profile file.
# Gradle
if [ -d "$HOME/opt/gradle" ]; then
    export GRADLE_HOME="$HOME/opt/gradle"
    PATH="$PATH:$GRADLE_HOME/bin"
fi
Finally, source your .profile and test gradle.
source ~/.profile

which gradle

gradle -version
Congratulations, you now have a working Gradle installation.




THanks to:
http://exponential.io/blog/2015/03/30/install-gradle-on-ubuntu-linux/

ubuntu how to install gradle

sudo add-apt-repository ppa:cwchien/gradle
sudo apt-get update
sudo apt-get install gradle