Category Archives: How to Fix

Failed to load AppCompat ActionBar with unknown error

Strong problem description:

In the preview of the xml corresponding to the activity in Android Studio, the layout design is not displayed properly, which gives an error.

The following classes cannot be instantiated:
– android.support.v7.widgetActionBarContainer (Open Class, Show Exception, Clear Cache)
– android.support.v7.widgetActionBarContextView (Open Class, Show Exception, Clear Cache)
– android.support.v7.appWindowDecorActionBar(open class, show exception, clear cache)
Tip: Use View.isInEditMode() in a custom view to skip code or display sample data in the IDE.
If this is an unexpected error, you can also try building the project and then manually refreshing the layout

Forced Modification Method:
In the style resource file, the

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
</style>

is changed to:

<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
</style>

then the test will show the corresponding layout!

gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildPr

骗取犯错!建立错误
gyp ERR!堆栈错误:make failed with exit code: 2
gyp ERR!在ChildProcess堆栈。onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR!在ChildProcess堆栈。emit (events.js:182:13)
gyp ERR!在Process.ChildProcess._handle堆栈。onexit (internal/child_process.js:239:12)
gyp ERR达尔文系统16.7.0
gyp ERR!命令“/ usr /地方/地窖/节点/ 10.9.0/bin /节点”“/ usr /地方/ lib/node_modules/npm node_modules/node-gyp/bin/node-gyp。js ” “重建” gyp ERR!cwd /Users/zhangying/Documents/www/kurento/kurento-client-js/node_modules/utf-8-validate gyp ERR!node-gyp -v v3.8.0
不ok
npm WARN [email protected]需要一个对等的grunt@~0.4.1,但没有安装。您必须自己安装对等依赖。

npm犯错!代码ELIFECYCLE
npm ERR!ERR!
npm [email protected]安装:node-gyp rebuild
npm ERR!退出状态1
npm ERR!
npm犯错!安装脚本[email protected]失败。
npm犯错!这可能不是npm的问题。上面可能有额外的日志输出

npm犯错!此运行的完整日志可在以下文件中找到:
npm ERR!/用户/ zhangying/.npm/_logs/2018 – 09 – 08 – t03_07_51_380z debug.log

方法一:
npm安装- g bcrypt
方法二:
删除~ /。node-gyp
方法三:
切换到当前项目下即可。

rm射频.node-gyp/

npm install -g node-gyp

rm射频项目/ node_modules

再次,npm安装即可。

About the problem I encountered: 226 transfer done but failed to open directory

encountered this problem in the following cases:

1, selinux is not disable.

setenforce 0 will not work either, mainly because selinux is still running and will protect network ports, whereas the ports of the FTP service are restricted by selinux.

Between the

the best solution is to the configuration file (/ etc/selinux/config), will be enforcing to disabled

2, user permissions, what user did you log in with, and then folder permissions allow this user to see the files in the folder

USES ls or dir to view folder permissions. If you do not have permissions to view this folder, you cannot view its contents.

, just like
,


Error:Failed to create provisioning profile. – iOS

long time no use, this time using the enterprise certificate package when compiling the project to throw the following exception and prompt:

Failed to create provisioning profile.
There are no devices registered in your account on the developer website. Plug in and select a device to have Xcode register it.



No profiles for 'com.xxxxxx.Distribution' were found
Xcode couldn't find any iOS App Development provisioning profiles matching 'com.xxxxxx.Distribution'.

basically looked at the project has nothing to do with itself, then directly locked on the enterprise account and certificate, for a long time without touching enterprise certificate, opened the official website of apple developers to log in and check the status, as expected, need to reconfigure a series of certificates and other configuration files;

Certificates

the basic range is in the People and Certificates range, where Certificates have roughly the same number of ways as those in the personal certificate configuration.

the above two circled red boxes can be understood as one for development and one for packaging and publishing, respectively make configuration certificates and install them on the machine;

and the figure above is an example of the successful certificate related configuration;

People

configuration after the above certificate configuration file is completed, the following personnel related configuration needs to continue to be set;

add the above new administrator user information, the list will be shown in the following example, there will be some administrator levels, different levels of the corresponding permissions will also be different, according to the team needs to add the configuration.

after configuring and installing the certificate to the computer, restart Xcode project, log in the corresponding account in People in the configured account, and then compile the project again;


above is the content of this sharing, I hope to help you!

cv2.error: OpenCV(3.4.2) error: (-215:Assertion failed) !empty() in function ‘detectMultiScale‘

cv2。错误:(-215:断言失败)!empty()函数’ detectMultiScale ‘

报错信息

cv2.error: OpenCV(3.4.2) /Users/travis/build/skvark/opencv-python/opencv/modules/objdetect/src/cascadedetect.cpp:1698: error: (-215:Assertion failed) !empty() in function 'detectMultiScale'

solution

cv2.CascadeClassifier('**/**/**.xml')

check the above path, in any case similar to check the path is correct

React Missing class properties transform.

缺少类属性变换。

描述:

ERROR in ./app/components/MsgComponent/msgAdd.js
Module build failed: SyntaxError: Missing class properties transform.

  73 |  }
  74 |
> 75 |     handleClearContent = () => {
     |     ^
  76 |         this.setState({
  77 |             editorState:''
  78 |         })

address:

Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.* signatures do not match the previously

problem description:

Performing Streamed Install
adb: failed to install app-debug.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.*.app signatures do not match the previously installed version; ignoring!]

encountered this problem when installing the phone application from the command line adb install-r app-debug.apk.

reason: the previous version is already installed on the phone, and the application may not be found on the desktop, but there are directories and cache files in the phone system. Many other approaches were tried, and the problem was eventually solved by executing the uninstall command.

solution: run the command adb uninstall com.*. App uninstall the program, and then execute adb install-r app. debug.apk, the program is installed successfully.

Lenovo x3650 M5 installation esxi-5.5.0u3 failed to resolve circular relocation

error resolution failed to resolve circular relocation

is installed with IBM custom esx images.

https://www-01.ibm.com/marketing/iwm/iwm/web/preLogin.do?source=stg-esxi5& S_TACT=101J533W& Lang = en_US

or you can try my lenovo customised version VMware ESXi – 5.5.0 – Update3-3116895 – LNV – 20151125. Iso (lenovo)

link: http://pan.baidu.com/s/1c12Hg68 password: peku

Error reported by ISE simulator: ERROR:Simulator : 861 – failed to link the design solution

ISE built-in Simulator ERROR: ERROR:Simulator:861 — Failed to link the design solution

10 64 – bit Win the measured effective
reproduced from: https://blog.csdn.net/sd10086/article/details/53046401
I use the Windows 10 64-bit professional version, and the computer is equipped with ISE14.7 version. When I use the ISE’s built-in Simulator ISIM to simulate, the Simulator always reports ERROR:Simulator:861 — Failed to link the design.
checked the Verilog code for many times and confirmed that there was no error, but the simulation was still the same problem, so I searched with Google and found that this problem would occur in any system with Windows 8 version or above, but I still did not know how to solve it. Finally, I found a solution in a foreign forum on electronic engineering. Although I did not know the principle of solving the problem, I gave it a try and it worked.
to prevent the problem from recurring in the future, the solution is specifically documented.

solution:
find the X disk
“X\Xilinx\14.x\ISE_DS\ISE\gnu\MinGW\5.0.0\nt\libexec\ GCC \mingw32\3.4.2\collect2.exe” and delete it, rerun the emulator, the problem is solved!

Javabinder:

JavaBinder: !!! FAILED BINDER TRANSACTION !!! Solution analysis for exceptions

is the cause of

I have been in charge of the development of the company’s mobile multimedia app. Recently, I was in charge of A project: in an Activity, I read the picture files in the external usb disk and encapsulated them as

public class MediaFileBean implements Serializable {
private static final long serialVersionUID = 1L;
private String name = "";
private String time = "";
private String path = "";
private Bitmap bitmap;//图片第一帧,即缩略图
private String fileName = "";
private int isLove = -1;
private FileFormat fileFormate;
private String sortLetters;

    ......
}

and display thumbnails in a list, when you click on the display image, pass all the data to B (dedicated to display the image) :

AActivity.java:
private void enterBActivity(ArrayList<MediaFileBean> mPhotoList, int position) {
    Intent intent = new Intent(mActivity, BActivity.class);
    intent.putExtra(Constants.PHOTO_ITEM_LIST, mPhotoList);//将扫描出来的图片文件传递给B
    intent.putExtra(Constants.PHOTO_CURRENT_POSITION, position);
    startActivity(intent);
}

B receives data from A:

//onCreate()中调用initData()
public void initData() {
    ......
    mPhotoList = (ArrayList<MediaFileBean>) getIntent().getSerializableExtra(Constants.PHOTO_ITEM_LIST);
    currentPosition = getIntent().getIntExtra(Constants.PHOTO_CURRENT_POSITION, -1);
    ......
}

but if the usb disk contains a lot of pictures, no matter how point, is not into the B page, the program does not crash, background print logcat, found JavaBinder:!!! FAILED BINDER TRANSACTION !!! Error

cause of occurrence

online search, the general reason is that the Bitmap should not be more than 40KB for data delivery with intents. According to the official website, data delivery with intents is limited, the maximum size is about 1M

solution

1. Try not to pass the Bitmap in intents. saves the bitmap to be passed in the SD, instead of the url in the Intent.

2. If you really want to pass the Bitmap, to its compression

`/**
 * 压缩图片
 * 该方法引用自:http://blog.csdn.net/demonliuhui/article/details/52949203
 * @param image
 * @return
 */
public static Bitmap compressImage(Bitmap image) {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    image.compress(Bitmap.CompressFormat.JPEG, 100, baos);//质量压缩方法,这里100表示不压缩,把压缩后的数据存放到baos中
    int options = 100;
    while (baos.toByteArray().length/1024 > 100) {  //循环判断如果压缩后图片是否大于100kb,大于继续压缩
        baos.reset();//重置baos即清空baos
        image.compress(Bitmap.CompressFormat.JPEG, options, baos);//这里压缩options%,把压缩后的数据存放到baos中
        options -= 10;//每次都减少10
    }
    ByteArrayInputStream isBm = new ByteArrayInputStream(baos.toByteArray());//把压缩后的数据baos存放到ByteArrayInputStream中
    Bitmap bitmap = BitmapFactory.decodeStream(isBm, null, null);//把ByteArrayInputStream数据生成图片
    return bitmap;
}`

3. data to be passed to the global variable

is not helpful if you have a large amount to pass. In my example above, even if I remove the bitmap variable from the bean, I still get an error because the array I’m passing is too large! Another way to think about it is that the data to be passed will be placed in a fixed value in the life cycle and assigned to value at any time. When you think about it, it is appropriate to put it in the Application:

public class MediaApplication extends Application {
    // 用于传递的图片数据
    private List<MediaFileBean> mPhotoList;
    private static MediaApplication mInstance;
    @Override
    public void onCreate() {
        super.onCreate();
        mInstance = this;
    }

    public synchronized static MediaApplication getInstance() {
        return mInstance;
    }

    public void setPhotoList(ArrayList<MediaFileBean> list){
        this.mPhotoList = list;
    }

    public List<MediaFileBean> getPhotoList(){
        return this.mPhotoList;
    }

}

when A jumps to B:

private void enterBActivity(ArrayList<MediaFileBean> mPhotoList, int position) {
    MediaApplication.getInstance().setPhotoList(mPhotoList);
    Intent intent = new Intent(mActivity, BActivity.class);
    intent.putExtra(Constants.PHOTO_CURRENT_POSITION, position);
    startActivity(intent);
}

B received A data:

@Override
public void initData() {
    mPhotoList = (ArrayList<MediaFileBean>) MediaApplication.getInstance().getPhotoList();// 解决异常:JavaBinder: !!! FAILED BINDER TRANSACTION !!!
    currentPosition = getIntent().getIntExtra(Constants.PHOTO_CURRENT_POSITION, -1);
}

Installation failed with message Invalid File:

The installation failed, the message file is invalid:D: AS_workspace\AS3.0\as3_workpro\phzzys_pro\phzzys0117\app\build\intermediates\split-apk\debug\slices\slice_9.apk if The apk exists, uninstalling the existing version of the apk and reinstalling it may solve the problem

Warning: Uninstalling will delete application data!

Do you want to uninstall an existing application?

The project has been moved and the runtime error appears, solution: Clean the project.

 

Installation failed with message Invalid File

Installation failed, message file is invalid:K: Project \app\build\intermediates\split-apk\with_ImageProcessor\debug\slices\slice_0.apk It is possible to fix the problem by uninstalling the existing version of the apk and reinstalling it.

Warning: Uninstalling will delete application data!

Do you want to uninstall an existing application?

 

The Android project running into the emulator is reporting this problem:

Click the Build tab -> Clean Project

Click on the Build tab – in Building APKs

Translated with www.DeepL.com/Translator (free version)