abstract: android studio not recognize packagename of package imported via .jar file, though know classes
what have done: have built .jar file source files executing command jar cf jar-file input-file(s) (see javadoc) in windows command prompt. want use classes packed in jar project in android studio. therefore, added libs folder app folder , copied .jar in there.
furthermore, added dependencies in app's build.gradle file:
dependencies { compile filetree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:appcompat-v7:22.2.0' compile files('libs/cermit.jar') } the problem: when try import class package statement like:
import com.hsulm.pfischer.cermitprototype.packagename.specificclass; it says cannot resolve symbol 'cermitprototype' , when compiling throws error: package com.hsulm.pfischer.cermitprototype.controller not exist.
the weird thing: when start typing in editor, e.g. specif want autocomplete , if allow gives me com.hsulm.pfischer.cermitprototype.packagename.specificclass guess knows classes not know package.
additional info: .jar file contains multiple packages multiple classes, respectively , manifest file. tried restarts, gradle syncs , other stuff found on stack overflow.
edit:
i've fixed problem not building jar via command prompt using netbeans. guess reason might have been ugly dependency issues between classes ignored.
Comments
Post a Comment