I am using the example for AppAuth-Android from this github repository
The gradle configuration I am using is
compile 'net.openid:appauth:0.5.1'
The error thrown is for the lines below:
AuthorizationServiceConfiguration config = new AuthorizationServiceConfiguration(
mConfiguration.getAuthEndpointUri(),
mConfiguration.getTokenEndpointUri(),
mConfiguration.getRegistrationEndpointUri());
mAuthStateManager.replace(new AuthState(config));
The error states that AuthState(AuthorizationServiceConfiguration) constructor not defined.
Is the example not updated for the library version or is there any other error.
Lead maintainer of AppAuth here - I believe I added that method after the release of 0.5.1, you'll need to wait for the 0.6.0 release to use it.
Related
I'm developping a NativeScript application and want to use the WonderPush SDK. I've already used this SDK into a native Android application, so I tried to create a new plugin to wrap the SDK.
I imported the library in the gradle file, and I tried to call the library from the NativeScript plugin. But the library is empty, if I tried to log it with console.dir, the only result is an quasi-empty object:
export class NativescriptWonderpush extends Common {
init() {
console.dir(com.wonderpush);
// com.wonderpush.sdk.Wonderpush.initialize(app.android.context);
}
}
JS: ==== object dump start ====
JS: sdk: {}
JS: ==== object dump end ====
(The second line com.wonderpush.sdk.Wonderpush.initialize() crash because com.wonderpush.sdk is empty)
Thanks for your help
Native objects may not always be traceable in console like JS objects.
Though you could refer their docs and call the methods you like Or even generate typings if you are using TypeeScript by following the steps given here. The typings ensure that the classes, methods, properties etc., are public and accessible to the JS runtime.
Hello I cannot create code impl., error like in title
Transformations.switchMap(mLiveData, listOfDamages -> { doSth()})
or
Transformations.map(liveData){
doSth()
}
I cannot applied lambda function as second parameter. Full error states
Cannot access class "android.arch.core.util.Function". Check your module classpath for missing or conflicting dependencies
I haven't any visible confilicts - mean that project is compiling
EDIT
downgrading support library from 26.1.0 to 26.0.2 and it started working
I've opened issue here:
https://issuetracker.google.com/issues/66894924
I have an android app with Realm and some Realm Module that help me to isolate synced Realm and i decide to migrate from Java to Kotlin.
#RealmModule(classes = arrayOf(Category::class, Product::class))
private class ShopModule
fun getShop(user: SyncUser, path: String): RealmConfiguration {
return SyncConfiguration.Builder(user, path)
.modules(ShopModule())
.build()
}
function getShop return RealmConfiguration to use in Realm.getInstance().
After some converting show me some error when build() has occurred:
io.realm.exceptions.RealmException: Could not find io.realm.ShopModuleMediator
please help me to continue my migration. I can't understand what's wrong because this method works for me in java.
UPDATE:
After good Q&A in comments and so many change and try in my project i found when using kotlin in my project ShopModuleMediator was not generated and when convert app project from Java to Kotlin project has worked befor clean Project.
🎉🎉 Congratulation with release Realm Java 4.1.0 this problem has been resolved and i share my test project you can see result but an important note that for using in instant app you must use https network and can't use http in instant app and i share another app that work when run in app mode but when run in instantapp has occurred an error : not permitted by network security policy this is because using http in authentication url.
After I successfully integrated flurry SDK into the library by using this code in my build.gradle file.
compile 'com.flurry.android:analytics:6.2.0'
I created java Class to integrate my API Key into my code, but I faced this probleme and I have no clue what should I do to successfully integrate it
-cannot resolve symbol FlurryAgent
-cannot resolve symbol flurrylistener
PS: I'm new to Flurry analytics and Android Studio
For now just remove the withListener() line.
It's not necessary to initialize Flurry.
Once you have your integration working, you can go back and set it up if you want, I've found it only to be necessary if you need to send events before Flurry completes initialization.
Flurry is working to get this corrected. Joel Duggan is correct the listener is "only necessary if you need to send events before Flurry completes initialization."
We will be removing this line of code from the basic instructions:
.withListener(flurryListener)
And here is the correct syntax for those who need it:
import com.flurry.android.FlurryAgentListener;
....
FlurryAgent.Builder()
.withLogEnabled(true)
.withListener(new FlurryAgentListener() {
#Override
public void onSessionStarted() {
// Session handling code
}
})
.build(this, 'your_api_key');
I was facing same problem, I have updated gradle and my problem is solved. Use latest gradle as follows,
//Flurry
compile 'com.flurry.android:analytics:7.0.0#aar'
for more reference use this url
for reporting my Application Crashes use Acra library via Android Studio Gradle Dependencies in this form :
dependencies {
compile 'ch.acra:acra:4.6.2'
}
Now in Bebug version it work and return crash report goodly but after export Release version of application not work and return this error in logcat :
Not adding buildConfig to log. Class Not found : " + className + ". Please configure 'buildConfigClass' in your ACRA config
Then i use acra-4-6-2.jar file instead dependencies but not work still!
Too before saw this link but was not helpful fore me.
With thanks for your attention
It sounds like you are Proguardng your app on release but have not added the relevant ACRA classes to your Proguard config.
See https://github.com/ACRA/acra/wiki/ProGuard
None of the other answers actually provided the fix.
To fix this issue, assign your BuildConfig.class to the buildConfigClass field on your ReportsCrashes annotation declaration.
#ReportsCrashes(
buildConfigClass = BuildConfig.class )
public class YourApplication extends Application { ... }
If you are using so called "dynamic" configuration you are probably having "empty" annotation like #ReportsCrashes().
In that case it turns out that ACRA does not create proper default config. The solution is simple: just add some fake property there like:
#ReportsCrashes(formUri = "placeholder")
which you will later override in the dynamic config...