Appodeal android example errors - android

When I downloaded a Appodeal project and run it I got many popups (Error: xxxx not found) this links
After that it crashes showing this error in the log FATAL EXCEPTION: Process: com.appodeal.test, PID: java.lang.NoClassDefFoundError: com.appodeal.ads.g.t
Ps: everything is updated to the last versions.

I'm Alex from Appodeal support team.
It looks like you meet the problem with multidex. This technology works perfect on android 5+, but to use it on older android you need to perform some tricks.
Go to main build gradle, find dependencies for project(":android") and add new one: compile 'com.android.support:multidex:1.0.0'.
Go to AndroidManifest.xml file and add android:name="android.support.multidex.MultiDexApplication" to the application tag. If your app already uses(extends) the Application class, you can override the attachBaseContext() method and call MultiDex.install(this) to enable multidex.
If this will not help, here tird step:
Download special SDK buld, remove all Appodeal related jar files from your project (\android\libs) and past all jar files from special build.
Best regards, Alex Tinekov
Technical Support Specialist

Related

Resources imported from feature module not found when specified in XML

With reference to Sample project available
We have a base module and a feature module
From the feature module we do setContentView with a layout located in the base module.
Directly afterwards we manually inflate a layout (layout_a.xml) inside the base layout (see GoodbyeActivity.java in bye feature)
Inside this layout_a.xml we have a simple button with a background resource which is only available in the feature module.
App doesn't run, runtime crash. It compiles without errors.
It seems that the whole idea of splitting up resources is broken. Or am i doing something wrong here?
This error is happening also with anything pointing to feature resources. <include> statements, strings, dimensions etc. Very annoying that you don't see any build errors as well.
To reproduce this error clone the repo in the link above. Its a clone of the android instant app demo repository.
Open the hello-feature-module en run the instant app with url "http://hello-feature.instantappsample.com/goodbye/example"
In bye feature see the GoodbyeActivity and layout_a.xml in the res folder.
If you remove line 29 in the layout_a.xml file the app runs fine.
With reference to Google issue tracker, it has been fixed with Android SDK Built-Tools to 27.0.2
Please update your Android SDK Built-Tools to 27.0.2 And ensure you are on Android Studio 3.0.1 or newer.
If any issue persists, please report at Google issue tracker they will re-open to examine.

Android Studio - Canary 8: Can't access the resources in feature modules and library modules

I can't access to the feature module resources and the resources from another library which is included as an API in InstantApp. The only place where it recognises to get resources is the base feature class. I have the following sample: when I run the application there are several Fragment classes in the feature module which have to be loaded along with the layouts also located in that module, but it always fails with
Caused by: android.content.res.Resources$NotFoundException:
Tried to exclude Multi-Dexing, other modules, also disabled the aapt2, after which it has started to complain about not found views.
What could be the reason of this?
A bug is reported here.
With reference to Google issue tracker, it has been fixed with Android SDK Built-Tools to 27.0.2
Please update your Android SDK Built-Tools to 27.0.2 And ensure you are on Android Studio 3.0.1 or newer.
If any issue persists, please report at Google issue tracker they will re-open to examine.

Unable to build Android app FabricGenerateResourcesDebug

I'm trying to integrate twitter's sdk with my app. I'm following this guide.
Unfortunately, when I try to build my project, I keep receiving this error:
Error:Execution failed for task ':app:fabricGenerateResourcesDebug'.
Crashlytics Developer Tools error.
Unfortunately because I don't have 10 reputation, I can't post my build.gradle file because it has links in it. Just trust the fact that it looks just like the build.gradle example in the top link provided.
Is there something that I'm missing that I may have overlooked?
Your problem should be caused due to that you did not create a “crashlytics.properties” file which is required to contain API Key and Build Secret in your app directory.
The solution is quite simple that you don't even have to manually setup anything on your original project. Just following this link:
https://fabric.io/settings/organizations
It will lead you to the Fabric official website, which helps you to download and install Fabric plugins into your IDE (Android Studio, IntelliJ or Eclipse). This might be a new magical method to integrate twitter's SDK within your app, it will automatically configure your project. You will see the magic when you get there.
Hope it helps.
The fix I found is that I did not place the meta-data tag with the API Key INSIDE the application tag in the androidmanifest.xml.

NoClassDefFoundError: org.slf4j.LoggerFactory on an Android applicaton with Graphhopper

I am currently developing an Android application and I'd like to use Graphhoper 0.3 embedded in the application (I have no way of setting up a server).
I am working with Android 4.0, Eclipse Kepler, Maven 3.2.1, Android for Maven Eclipse 1.0.1.
I first tried to pull branch 0.3 and set the "core" folder up as an Eclipse project, then adding it in the Build Path of my android project. I also tried to use the graphhopper-0.3-android.jar directly.
Android Project Main Activity onStart():
GraphHopper hopper = new GraphHopper().forMobile();
Unfortunately, everytime I got the following error:
java.lang.NoClassDefFoundError: org.slf4j.LoggerFactory
It does not pop in a regular Java project; only in Android.
I've tried to add the slf4j JAR's to the build path, with no success.
Any help would be greatly appreciated! It's my first post here, and I really don't know what I could try more. If you need any more information on my setup or anything, please ask!
Edit
Complete solution in comments of the validated answer.
Because you are trying to use Graphhopper directly, the Maven is not downloading all the dependencies of the Graphhopper. In order to fix this, you should either add the Graphhopper as Maven dependency, or try to resolve the dependencies 'by hand' - i.e. by adding missing classes to the build path and exporting them to the APK (if you are using Maven, then simply add the dependencies to the pom.xml without scope tag).

Issue with ActionBarActivityDelegate class.....app doesn't run

Hello i hope someone can help me with his
I was planning to put an action bar in my test app, so I did exactly as said in the developers API guide.
But when i tried to compile it it throw this error (logcat):
java.lang.ExceptionInInitializerError
at android.support.v7.app.ActionBarActivityDelegate.createDelegate()
at android.support.v7.app.ActionBarActivity.onCreate().....
.....
Caused by: java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$attr
at android.support.v7.app.ActionBarActivityDelegateBase.<clinit>
What happens is that the app is correctly installed into my phone but even before it shows any UI, it throws the error and closes.
I even tried with the most simple app ("hello world example") and says the same thing
I tried it in both real phone and simulator, and same result
Any ideas how to fix that???? Seems that there is no definition for the class ActionBarActivityDelegateBase, but i cannot find any reference to that class in the guides or any other website
I had that error, and the problem was that I hadn't added the lib with the resources.
You can't just add the jars, because it will not add the resources. You have to create a project from thoses libs and then add the project as a library to your own project.
Here's the instructions how to:
Go to this link and go to the "Adding libraries with resources" section
http://developer.android.com/tools/support-library/setup.html
This fixed the problem for me.
Cheers
I had the same issue about 20 minutes ago. I fixed it in the Manifest by changing the theme from "AppTheme" to "Theme.AppCompat"
<application
...
android:theme="#style/Theme.AppCompat" >
I'm using Android-Studio 1.0.2 and I had the same problem. I fixed the issue removing compile 'com.google.android.gms' from build.gradle. Not too sure about the cause of the problem.
I spent a whole day trying to fix this. I am using eclipse on debian. I ended up adding the library android-support-v7-appcompt and my app into one working set and built the "working set" to resolve the issue. This eventually created the necessary files in android-support-v7-appcompat/bin folder.

Categories

Resources