Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find symbol variable APPLICATION_ID #26

Open
pratikgup opened this issue Jan 31, 2021 · 1 comment
Open

Cannot find symbol variable APPLICATION_ID #26

pratikgup opened this issue Jan 31, 2021 · 1 comment

Comments

@pratikgup
Copy link

pratikgup commented Jan 31, 2021

Hi there,
Thanks a lot for this app source code, much appreciated.
I was wondering if this app can read and show serial data from a serial device like the Serial USB Terminal app.

I tried to open the app source code package on Mac OS X based Android Studio 4.1.2 and have got this classpath set in the build.gradle for the project: com.android.tools.build:gradle:4.1.2

But The Constants.java file returns this build failed error

/SimpleUsbTerminal-master/app/src/main/java/de/kai_morich/simple_usb_terminal/Constants.java:8: error: cannot find symbol
static final String INTENT_ACTION_GRANT_USB = BuildConfig.APPLICATION_ID + ".GRANT_USB";
^
symbol: variable APPLICATION_ID
location: class BuildConfig

This occurs for the Constants.java file lines 9-11 also.

What should be the gradle plugin version to use? It seems some solutions stated online by others for other projects states to downgrade the gradle version. But does not help, same issue occurs.

Would be grateful if there is a solution for this as I would like to run and edit the app using Android Studio or any other IDE.

Thanks, Pratik

@kai-morich
Copy link
Owner

the BuildConfig file is generated when you build the project. I checked again with Android Studio and latest Gradle version.
If you still have issues, you could replace the constant with it's value:
public static final String APPLICATION_ID = "de.kai_morich.simple_usb_terminal";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants