Hi,
I have encountered weird error. My applications works fine on Android 4.0.1, but the same application on Android 4.4.2 throws following error:
05-28 16:30:22.478 7667-7667/com.example.myapp E/TextView﹕ get resource from application failed.
05-28 16:30:22.478 7667-7667/com.example.myapp W/System.err﹕ android.content.pm.PackageManager$NameNotFoundException:
05-28 16:30:22.480 7667-7667/com.example.myapp W/System.err﹕ at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:227)
05-28 16:30:22.481 7667-7667/com.example.myapp W/System.err﹕ at android.app.ApplicationPackageManager.getResourcesForApplication(ApplicationPackageManager.java:786)
05-28 16:30:22.482 7667-7667/com.example.myapp W/System.err﹕ at android.widget.TextView.<init>(TextView.java:1309)
05-28 16:30:22.483 7667-7667/com.example.myapp W/System.err﹕ at android.widget.TextView.<init>(TextView.java:646)
05-28 16:30:22.483 7667-7667/com.example.myapp W/System.err﹕ at android.widget.TextView.<init>(TextView.java:642)
05-28 16:30:22.484 7667-7667/com.example.myapp W/System.err﹕ at com.example.myapp.MainActivity$$anonfun$1.apply(MainActivity.scala:16)
there is this code on line 16:
w[TextView] <~ text("hi")
exactly the isolated code looks like:
package com.example.myapp
import android.app.Activity
import macroid.Contexts
import android.os.Bundle
import macroid.FullDsl._
import android.widget.TextView
import macroid.contrib.Layouts.VerticalLinearLayout
class MainActivity extends Activity with Contexts[Activity]{
override def onCreate(savedInstanceState: Bundle) = {
super.onCreate(savedInstanceState)
val lay = l[VerticalLinearLayout](
w[TextView] <~ text("hi")
)
setContentView(getUi(lay))
}
}
The application displays the TextView properly. In real application similar code is used in DataSetAdapter and ListView. The list is displayed properly but listing is not smooth and after some time whole app hangs. On 4.0.1 no exceptions are raised and the listing is smooth, on 4.4.2 the errors are raised.
Do you have any idea, what could be the problem?
Thank you for any hints.
Ales