SimpleUsbTerminal icon indicating copy to clipboard operation
SimpleUsbTerminal copied to clipboard

Cannot find symbol variable APPLICATION_ID

Open pratikgup opened this issue 5 years ago • 1 comments

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

pratikgup avatar Jan 31 '21 05:01 pratikgup

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";

kai-morich avatar Jan 31 '21 13:01 kai-morich