Skip to content

Error in importing a package #3

@Parshantpk

Description

@Parshantpk

i tried this code in my app but getting an error in android studio about the package in code
PandorabotsAPI.java file
import java.nio.File;
import java.nio.file.Paths;

import java.nio.File;
import java.nio.file.Paths;

/**
     * Upload a file.
     * 
     * @param botName
     *            name of bot
     * @param pathName
     *            path for upload file
     * @return status of response
     * @throws IOException
     * @throws ClientProtocolException
     * @throws URISyntaxException
     * @since 0.0.1
     */
    public String uploadFile(String botName, String pathName)
            throws ClientProtocolException, IOException, URISyntaxException {
        URI uri = fileUri(botName, pathName);
        Log("Upload botName=" + botName + " pathName=" + pathName + " uri="
                + uri);
        HttpResponse response = Request.Put(uri)
                .bodyByteArray(Files.readAllBytes(Paths.get(pathName)))
                .execute().returnResponse();
        return readResponse(response);
    }

and in this file MagicParameters.java
import java.nio.File;
import java.nio.file.Paths;

import java.nio.File;
import java.nio.file.Paths;

/**
     * Helper for reading file as list of lines.
     *
     * @param path
     * @param encoding
     * @return content of file as string
     * @throws IOException
     * @since 0.0.1
     */
    private List<String> readLines(String path, Charset encoding)
            throws IOException {
        List<String> lines = Files.readAllLines(Paths.get(path), encoding);
        return lines;
    }

sir can you please help me solve this error!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions