setting up ACRA 5.5.1 in ReactNative 0.61.2 - react-native

I am trying to setup ACRA for my react native project which using 0.61.2 version. I followed the basic setup tutorial from https://github.com/ACRA/acra/wiki/BasicSetup .
But while building the project I got errors
/android/app/src/main/java/com/agentnativeapp/MainApplication.java:36: error: cannot find symbol
CoreConfigurationBuilder builder = new CoreConfigurationBuilder(this)
^
symbol: class CoreConfigurationBuilder
location: class MainApplication
I don't understand what am I missing. I thought I might be missing the jar file, but there are no instructions showing the requirement of jar file.
I am new to JAVA side of programming so I am new to all these jar stuff

Turns out it was all importing problem.
import org.acra.;
import org.acra.annotation.;
The above statement doesn't actually import every class, so I have to CoreConfigurationBuilder separately
import org.acra.config.CoreConfigurationBuilder;

Related

R file not generated for androidTests when using AGP 4.2.0 or 7.0

I have tried migrating to a new Gradle Plugin, but since we have some custom layouts for AndroidTests, it fails with an error saying "R class was not found" for the android tests.
I could not find any source saying about any behaviour changes in this area.
The error looks like this and seems to be related to view inding or simply to the fact the R class is not generated.
/pathToTheApp/build/generated/data_binding_base_class_source_out/debugAndroidTest/out/com/package1/test/databinding/CustomViewActivityBinding.java:12: error: cannot find symbol
import package.name.test.R;
^
symbol: class R
location: package package.name.test
I had this problem in our Android tests after upgrading to AGP 7.0. Our test R class could not be found. I managed to fix it by duplicating the testApplicationId into the seemingly new testNamespace field.
android {
testNamespace = "com.example.tests"
defaultConfig {
testApplicationId "com.example.tests"
}
}
I think it should work without it, so maybe this is a plugin bug, but the docs say:
The namespace used by the android test and unit test components for the generated R and BuildConfig classes

Vite Migration: error does not provide an export

I'm trying to migrate from vue-cli to Vite using Vue 2.0.
I've some JavaScript-generated files for GRPC communication; alongside each file, there is a declarative file because I'm using Vue with TypeScript. When running Vite, I get this error:
Uncaught SyntaxError: The requested module '/src/proto/admin_config_grpc_web_pb.js' does not provide an export named 'AdminConfigurationServicePromiseClient'
However, I've a corresponding declaration file which contains this line:
export class AdminConfigurationServiceClient {
Anybody has encountered this issue and has a solution?
Thanks
This error is similar to the vite issue https://github.com/vitejs/vite/issues/2117.
Do not re-export typescript type or interface in vite. You can just export it in file A and import it in file B. Don't try to export it in file B again
BTW,
https://github.com/originjs/webpack-to-vite
This is a github project that I found when I searched for error messages when I was converting an old project. It lists some conversion items and error repair methods. It can even convert an old project to a vite project with one click. It’s great, I recommend it!
A workaround can be if you declare a new interface that inherits from the one that you want to re-export.
a.vue
export interface AItem extends ItemModel {}
b.vue
export interface A2Item extends ItemModel {}

Error while importing NativeMobileSDKBridgePackage when using amazon chime integration into existing react-native project

While following the documentation provided on github to integrate chime into existing react-native project, this line
packages.add(new NativeMobileSDKBridgePackage());
throwing error. Even after adding import as
package com.abc.mainFolder;
import com.abc.mainFolder.NativeMobileSDKBridgePackage;
NativeMobileSDKBridgePackage.kt file is present in the above import path.

How to resolve ESLint error unable to resolve path to module 'react-native'

New to react native and trying to setup ESLint in my project. I am getting this specific error:
Unable to resolve path to module 'react-native'. (import/no-unresolved)
I searched on SO and found similar threads, but nothing seems to work. I tried cleaning the npm cache as well.
import { AppRegistry } from 'react-native';
There is a red underline on my index.js file in the project root (using Atom editor) and under the word react in the above code snippet.
As per the react native guide
AppRegistry should be required early in the require sequence to make
sure the JS execution environment is setup before other modules are
required.
If you are struggling with es-lint configuration and guess that it's showing false error then you can add .eslinrc file at the root of the project and configure eslint rule as required. I suggest airbnb standard, this guide show full setup here

Robot not able to import .java library

I am trying to import the 'SwingLibrary' into my Robot project and have had a lot of issues with it. I was able to work around my first error that seems very common by removing the version number from the file name:
Importing test library 'SwingLibrary' failed: ImportError: No module named SwingLibrary
Now everything is named SwingLibrary (jar & xml included) so I got a little further but I am now seeing the error:
Importing test library 'SwingLibrary' failed: Expected class or module, got javapackage.
I know Robot is supposed to know when it's trying to import a python or jython package but for some reason it doesn't seem to be working here. I did not have an issue importing the java version of Selenium or any of the standard libraries.