Ekta
Ekta

Reputation: 438

Import a custom class in another folder in Android Studio

I have created a folder caller logging and a Java class called AppLogger in it. How do I import the class Applogger into MainActivity?

enter image description here

Upvotes: 0

Views: 5010

Answers (3)

mitesh viradiya
mitesh viradiya

Reputation: 66

try this way:

import package_name.folder_name.java_class_name;

for you try this:

import mobileaccess.hid.com.hidmobileaccess.logging.AppLogger;

Upvotes: 2

Asim Roy
Asim Roy

Reputation: 10226

I think it should be:

import logging.AppLogger;

Upvotes: 0

Rakesh
Rakesh

Reputation: 756

Try this

import packkage.AppLogger;

Or if static

import static packkage.AppLogger;

Upvotes: 0

Related Questions