release

invalid key hash. the key hash does not match any stored key hashes facebook android

故事扮演 提交于 2019-11-30 10:58:52
I'm developing an Android application that uses Facebook Authentication. In debug mode, i use the debug key hash generated by the code: try { PackageInfo info = getPackageManager().getPackageInfo( "com.org.package", PackageManager.GET_SIGNATURES); for (Signature signature : info.signatures) { MessageDigest md = MessageDigest.getInstance("SHA"); md.update(signature.toByteArray()); String sign = Base64 .encodeToString(md.digest(), Base64.DEFAULT); Log.e("MY KEY HASH:", sign); } } catch (NameNotFoundException e) { } catch (NoSuchAlgorithmException e) { } Now I want to publish my app in Google

Configuring multiple upload repositories in Gradle build

♀尐吖头ヾ 提交于 2019-11-30 10:23:24
I want to upload my artifacts to a remote Nexus repo. Therefore I have configured a snaphot and a release repo in Nexus. Deployment to both works. Now I want to configure my build so I can decide in which repo I want to deploy: gradle uploadArchives should deploy to my snapshots repo gradle release uploadArchives should deploy to my release repo This was my try: apply plugin: 'war' apply plugin: 'maven' group = 'testgroup' version = '2.0.0' def release = false repositories { mavenCentral() mavenLocal() } dependencies{ providedCompile 'javax:javaee-api:6.0' } task release <<{ release = true;

How to release static Objective-C variables

非 Y 不嫁゛ 提交于 2019-11-30 08:28:14
The StackOverflow question "using static keyword in objective-c when defining a cached variable" references code from Example 4 of Xcode's TableViewSuite that defines a static NSDateFormatter and calls alloc but never calls release . Shouldn't static variables be released? If yes, where in the code should they be released? If no, why not? Shouldn't static variables be released? If yes, where in the code should they be released? If no, why not? It depends. If the variable is initialized only once, and should stay around for the lifetime of the application, then no, it shouldn't be released (its

How to put assert into release builds in C/C++

天大地大妈咪最大 提交于 2019-11-30 03:54:53
I need to only run ship build and I need to assert on certain condition in release build to see if the problem is fixed. How do I do it? Undefine the NDEBUG macro - you can do this locally around the asserts you want to remain in the build: #undef NDEBUG #include <assert.h> // reinclude the header to update the definition of assert() or do whatever you need to do so your build process does not define the NDEBUG macro in the first place. Baiyan Huang Why not just define your own assert: #define assert(x) MessageBox(...); Daniel Daranas Just call directly the part of the assert macro definition

Gson deserialize null pointer in released apk

安稳与你 提交于 2019-11-30 03:45:59
I'm writing an Android app need using gson to deserialize the json string: { "reply_code": 001, "userinfo": { "username": "002", "userip": 003 } } so I create two classes: public class ReturnData { public String reply_code; public userinfo userinfo; } public class userinfo { public String username; public String userip; } finally, my Java code in MainActivity.java: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Context context= MainActivity.this; //Test JSON String JSON="{\"reply_code\": 001,\"userinfo\

Android Studio Signed APK Not Installing

走远了吗. 提交于 2019-11-30 03:16:45
I am in Android Studio and signing an APK under Build > Generate Signed APK and using the wizard. Everything appears to sign fine and an .apk file is generated. When I go copy this file over to my device (either Nexus 7 or Moto X) it won't install. I get an "install failed" message. I can't figure out what's going wrong at all. I have put this .apk up in the google play developer console under "alpha testing" and it was accepted fine (I'm waiting for the tester link to become active to try and download / install from there). The instructions for the wizard here ( http://developer.android.com

iOS: optional code fragments for debug builds

帅比萌擦擦* 提交于 2019-11-30 03:15:56
for my App I'd like to have a debug view that I want to have only in debug-builds and not in release builds. I don't want to change my code though. Thats why i am wondering if I can check some compiler flag if this is a release build and exclude some code that i only want to have for debug builds. In your projects build settings, look for the preprocessor defines section, in there you can define a variable in your debug build only, such as DEBUG=1 , and then use this in your code: #if DEBUG NSLog(@"This will only print in debug!"); #endif Just make sure in your release configuration, that same

Django: auto minifying css/js files before release

与世无争的帅哥 提交于 2019-11-30 02:02:29
I have following case: I want to use uncompressed js/css files during development (to debug js for example) but on production I want to switch automatically to minified versions of that files. some simple solution is to put in your template: <script src="some_js.{% if not debug %}min.{% endif %}js".... but this require manully providing that such file exist and to do minifaction manullay after original file change. How do you accomplish this in your projects? Is there any tool for this? Pierre-Jean Coudert Did you try http://code.google.com/p/django-compress/ ? See http://djangopackages.com

Does Java have 'Debug' and 'Release' build mode like C#?

若如初见. 提交于 2019-11-29 23:34:34
In C#, we have 2 modes to build projects : Debug and Release , I wonder if Java has the same thing. I am using IntelliJ IDEA as Java IDE and so far I haven't seen anywhere to configure a build mode like in VS IDE. Thilo javac -g Generate all debugging info -g:none Generate no debugging info -g:{lines,vars,source} Generate only some debugging info You can choose to include debug symbols in the compiled classes (this is the default) or to not do so. There is not much benefit to not doing that. The jar files will be a little smaller , but the performance benefit is minimal (if any). Without these

SSM整合

爱⌒轻易说出口 提交于 2019-11-29 21:54:12
Springmvc Spring Mybatis整合的步骤 引入所有的jar文件 1. mysql数据库驱动jar      mysql-connector-java-5.1.46.jar 2. mybatis 的jar包   mybatis-3.2.2.jar 3. spring的核心jar。   commons-logging-1.1.3.jar   spring-beans-4.2.2.RELEASE.jar   spring-context-4.2.2.RELEASE.jar   spring-core-4.2.2.RELEASE.jar   spring-expression-4.2.2.RELEASE.jar 4. spring的注解。   spring-aop-4.2.2.RELEASE.jar 5. 事物处理。   spring-aspects-4.2.2.RELEASE.jar   spring-jdbc-4.2.2.RELEASE.jar   spring-tx-4.2.2.RELEASE.jar   com.springsource.org.aopalliance-1.0.0.jar   com.springsource.org.aspectj.weaver-1.6.8.RELEASE.jar 6. 数据源的jar包   c3p0-0.9.1.1.jar 7.