小编Ana*_*eem的帖子

在Fire TV Stick上侧载应用程序时失败[INSTALL_FAILED_DEXOPT]错误

当我通过Android Studio安装应用程序时,我的应用程序运行正常,但是当我尝试使用adb安装应用程序时,我收到INSTALL_FAILED_DEXOPT错误.我尝试了很多东西,比如清洁,无效等,但一切都失败了.

这只发生在操作系统版本为5.1.1的Fire TV Sticks上,反之在Fire TV上,无论操作系统如何(即使在5.1.1 Fire TV上),该应用程序也能正常运行.

Gradle版本:4.4(回到4.1没有帮助)
Android插件版本:3.1.2(回到3.0.1没有帮助)
构建工具版本:27.0.3
minSdkVersion:21
compileSdkVersion:26
targetSdkVersion:26

我假设这是我在安装Live App Testing应用程序时未在棒棒糖设备上安装我的构建的原因.

请让我知道如何解决此错误.

附加Logcat输出:https://gist.github.com/anas-incedo/64992269a1734061a2f739a5887e809c

android build.gradle android-gradle-plugin amazon-fire-tv

7
推荐指数
1
解决办法
970
查看次数

如何在没有互联网连接时提醒用户

我需要用以下条件提醒用户;

  1. 请求超时
  2. 没有网络连接
  3. 无法访问服务器

这是代码; 如何在发生时捕获以下条件并提醒用户?

failure: function (response) {
    var text = response.responseText;
    console.log("FAILED");
},success: function (response) {
    var text = response.responseText;
    console.log("SUCCESS");
}
Run Code Online (Sandbox Code Playgroud)

我尝试了以下代码来检查互联网是否可以访问,但它不起作用

var networkState = navigator.network.connection.type
    alert(states[networkState]);
    if (networkState == Connection.NONE){
        alert('No internet ');
    };
Run Code Online (Sandbox Code Playgroud)

更新**

我在index.html中添加了以下内容,但是,当我禁用WIFI时,我看不到弹出警报.

<script>
function onDeviceReady() {
    document.addEventListener("offline", function() {
        alert("No internet connection");
    }, false);
}
</script>
Run Code Online (Sandbox Code Playgroud)

extjs sencha-touch sencha-touch-2 cordova

6
推荐指数
2
解决办法
1万
查看次数

如何解决内部错误:重试接收器类尚未设置和GCMBaseIntentService:SERVICE_NOT_AVAILABLE错误

我在Micromax Canvas 2上运行我的应用程序时获得此logcat,我的手机配置为Google服务和谷歌帐户,这里我没有获得GCM注册ID,而我在模拟器中获取它.有什么建议吗?Thanx提前.

07-11 13:52:48.145: V/InputMethodManager(16539): focusOut: android.widget.AutoCompleteTextView{41990460 VFED..CL .F....ID 0,53-480,113 #7f070024 app:id/txt_sitename} 

mServedView=android.widget.AutoCompleteTextView{41990460 VFED..CL .F....ID 0,53-480,113 #7f070024 app:id/txt_sitename} winFocus=false
07-11 13:54:05.461: V/GCMBroadcastReceiver(16539): onReceive: com.google.android.c2dm.intent.REGISTRATION
07-11 13:54:05.461: V/GCMBroadcastReceiver(16539): GCM IntentService class: dotsandcoms.android.siteuplitenew.GCMIntentService
07-11 13:54:05.463: V/GCMBaseIntentService(16539): Acquiring wakelock
07-11 13:54:05.469: V/GCMBaseIntentService(16539): Intent service name: GCMIntentService-677416186780-1
07-11 13:54:05.470: D/dalvikvm(16539): create interp thread : stack size=32KB
07-11 13:54:05.470: D/dalvikvm(16539): create new thread
07-11 13:54:05.470: D/dalvikvm(16539): new thread created
07-11 13:54:05.470: D/dalvikvm(16539): update thread list
07-11 13:54:05.471: D/dalvikvm(16539): threadid=13: interp …
Run Code Online (Sandbox Code Playgroud)

android google-cloud-messaging

4
推荐指数
1
解决办法
8638
查看次数

SlidingMenu:显示活动的第二个菜单

我现在用的是真棒库SlidingMenu通过jfeinstein10.所以,一切都是正确的,但有一点.

我可以使用toggle()事件处理程序中的方法打开主菜单.但是我也希望在按钮点击等某些事件上打开二级菜单.

我做了类似的事情

SlidingMenu right = getSlidingmenu();
right.setSecondaryMenu(rightMenuView)
Run Code Online (Sandbox Code Playgroud)

并且正在考虑做,right.toggle(); 但上面的第二个语句抛出了NullPointerException.

编辑:发布onCreate

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    inflater = (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    leftMenuView = inflater.inflate(R.layout.left_menu, null, false);
    rightMenuView = inflater.inflate(R.layout.right_menu, null, false);
    customActionBarView = inflater.inflate(R.layout.custom_actionbar,null);

    findAllViews();
    setFontAwesome();

    ab = getSupportActionBar();
    ab.setDisplayShowCustomEnabled(true);
    ab.setDisplayHomeAsUpEnabled(false);
    ab.setDisplayShowHomeEnabled(false);
    ab.setDisplayUseLogoEnabled(false);
    ab.setCustomView(R.layout.custom_actionbar);
    ivHome = (ImageView) findViewById(R.id.ab_home); 
    ivHome.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            Log.d("TAG", "Tag");
            toggle();
        }
    });


    leftSlidingMenu = getSlidingMenu();
    leftSlidingMenu.setMode(SlidingMenu.LEFT_RIGHT);
    setBehindContentView(leftMenuView);
    leftSlidingMenu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
    leftSlidingMenu.setBehindOffset(100); …
Run Code Online (Sandbox Code Playgroud)

android slidingmenu

3
推荐指数
1
解决办法
2297
查看次数

如何从左向右移动/滑动图像

我想从左到右滑动或移动图像

http://rajeevkumarsingh.wix.com/pramtechnology

阅读五角形框,移动好!

我尝试了一下但没有这样做我使用下面的代码

<script type="text/javascript">

<!--
var imgObj = null;
var animate ;
function init(){
   imgObj = document.getElementById('myImage');
   imgObj.style.position= 'absolute'; 
   imgObj.style.top = '240px';
   imgObj.style.left = '-300px';
   imgObj.style.visibility='hidden';
   moveRight();
} 
function moveRight(){
if (parseInt(imgObj.style.left)<=10)
{
   imgObj.style.left = parseInt(imgObj.style.left) + 5 + 'px';
   imgObj.style.visibility='visible';
   animate = setTimeout(moveRight,20); // call moveRight in 20msec
   //stopanimate = setTimeout(moveRight,20);
  }
else
  stop();
  f();
}

function stop(){
   clearTimeout(animate);
}
window.onload =init;
//-->
</script>
<img id="myImage" src="xyz.gif" style="margin-left:170px;" />
Run Code Online (Sandbox Code Playgroud)

Firefox和IE也存在某种解决问题.如何解决它们.此外,我无法如此清楚地移动这些东西.这可能吗?我希望它与javascript而不是闪存.

javascript javascript-events motion

1
推荐指数
1
解决办法
6万
查看次数

Appcelerator leftImage

我正在尝试使用Appcelerator创建我的第一个移动应用程序.当我尝试使用"leftImage"将本地图像加载到数组中时,图像不会显示.但是,当我将路径更改为不存在的东西时,它告诉我它无法找到路径.我已经google了很多,似乎无法找到我做错了什么.有什么帮助吗?

var win1 = Titanium.UI.createWindow(
    {
        title:'test',
        className:'win1',
        backgroundColor:'#000000'
    }
);

var vdata = [
        {leftImage:'appicons/cloudy.gif',title:"Schedule"},
        {leftImage:'appicons/shows.png',height:60, title:"Shows"},
        {leftImage:'appicons/search.png', title:"Search"},
        {leftImage:'appicons/friends.png',title:"Friends"},
        {leftImage:'appicons/settings.png',title:"Settings"}
    ];

var table1 = Titanium.UI.createTableView({
    data:vdata
});
win1.add(table1);
win1.open();
Run Code Online (Sandbox Code Playgroud)

android titanium appcelerator appcelerator-mobile titanium-mobile

0
推荐指数
1
解决办法
1037
查看次数