Tag Archives: release

[error record] Android application release package error handling (turn off syntax check log processing release configuration)

1. Turn off grammar checking


 

When Android applications are packaged, there will be a series of syntax checks, such as the placement of a layout file, which is cumbersome;

In build. Gradle under the module, configure as follows: check the syntax and ignore some minor syntax errors;

android {
    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }
}

 

 

 

 

2. Log processing

According to the compilation type buildconfig.debug in the current compilation configuration, select whether to print the log;

public final class BuildConfig {
  public static final boolean DEBUG = Boolean.parseBoolean("true");
  public static final String APPLICATION_ID = "cn.zkhw.midi";
  public static final String BUILD_TYPE = "debug";
  public static final int VERSION_CODE = 1;
  public static final String VERSION_NAME = "0.1";
}

If the current version is release, the value of buildconfig.debug is false;

 

Example of development log tool class log:

public class L {

    public static void i(String TAG, String msg) {
        if (BuildConfig.DEBUG)
            Log.i(TAG, msg);
    }
}

 

3. Release compiler optimization configuration

In general, the release release version needs the following configuration;

android {
    buildTypes {
        debug {
        }

        release {
            zipAlignEnabled true     
            shrinkResources true    
            minifyEnabled true      
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

Pcl1.9 + vs2017 + win10 installation instructions and MFC adaptation

At the time of this writing, the latest version of PCL is 1.9.1, and the address is here. But from all the indications on GitHub, 1.10 should be coming soon.
This article is done on the installation of PCL, and it is very detailed, so there is no need to repeat it.
The reason for this post is to explain that if you are using “AllInOne”, please do not select 1.9.1!!
Otherwise, when compiling release x64, it will report an error (x86 has not tried it, it will probably be enough). After a few hours of investigation, I saw someone mention this problem on GitHub, but the owner said that it is not recommended to use “AllInOne”, instead, use CMake, and then there is no such thing. After a long struggle, the guy decided to give up and use CMAKE to solve the problem.
After using Debug version n for a long time, I finally want to fix this problem today, so I want to try 1.9.0 instead of CMake, and then the problem will be solved…
 
Also, in some cases, PCL may need to be used with MFC, and its configuration is basically the same as if it were used on the console. However, there are a few issues that need to be noted, otherwise it will not compile.
1. Turn off SDL check: C/C++-> SDL check – & gt; No (/ SDL -)
2. Properties – & gt; Advanced – & gt; Use of MFC ->; Use MFC in a shared DLL, otherwise the following error will occur

3. VTKATOMIC. H with “::” before three “detail”