Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

ValidationHelper: Internet Permission required in a library module #784

@toshe

Description

@toshe

Our team wanted to try out the new Interceptors introduced in 3.0 however we stumbled upon this problem:

When processing
@rest(converters = { MappingJacksonHttpMessageConverter.class })
the ValidatorHelper throws the following error:
"Your application must require the INTERNET permission."

Now of course we have the correct permissions set in AndroidManifest.xml .

The issue arises because we're compiling an android library, and libraries, although having an AndroidManifest as well do not need to have permissions set. Even if you set permissions they are then clearly ignored by AA. The project.properties has the flag android.library=true.

I'll try to give more details:
We're using IntelliJ IDEA / Android Studio.
Our project consists of an Android application and a Rest Module (A module is an entity that can be compiled separately) - a library that uses Android Annotations. The way it works is - our application depends on this Rest Module (library) and compiles it when building. AA generates everything nicely in the library and then the generated classes are used in the main project. Everything works perfect in 2.7.1 with that setup.

Is there any way to turn off the permission validations? Those should not take place if the files are generated from a library.

We've tested the SNAPSHOT bundle from https://oss.sonatype.org/content/repositories/snapshots/org/androidannotations/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions